solo_agents_gi.py

solo_agents_gi.py#

Test solo graph isomorphism agents using a grid of hyperparameters.

A solo agent is one that does not interact with any other agents, but instead tries to solve the graph isomorphism problem on its own. Solo agents are trained using supervised learning instead of RL.

This script runs through a grid of hyperparameters, specified in the param_grid dict. If the MULTIPROCESS variable is set to True, the experiments are run using a pool of workers (specified by the --num-workers command line argument). Otherwise, the experiments are run sequentially.

Additional settings, like whether to log to W&B can be set via command line arguments. Run the script with the --help flag to see all available arguments.

scripts/solo_agents_gi.py#

Run hyperparameter experiments in parallel

usage: scripts/solo_agents_gi.py [-h] [-d] [-v] [-q] [--run-infix RUN_INFIX]
                                 [--use-wandb] [--wandb-project WANDB_PROJECT]
                                 [--wandb-entity WANDB_ENTITY] [--tag TAG]
                                 [--gpu-num GPU_NUM] [--ignore-cache]
                                 [--no-pretrain] [--num-workers NUM_WORKERS]
                                 [--max-tasks-per-child MAX_TASKS_PER_CHILD]
                                 [--num-skip NUM_SKIP]
-h, --help#

show this help message and exit

-d, --debug#

Print debug messages

-v, --verbose#

Print additional info messages

-q, --quiet#

Print less output

--run-infix <run_infix>#

The string to add in the middle of the run ID

--use-wandb#

Whether to use W&B to log the experiment

--wandb-project <wandb_project>#

The name of the W&B project to use

--wandb-entity <wandb_entity>#

The name of the W&B entity to use

--tag <tag>#

An optional tag for the W&B run

--gpu-num <gpu_num>#

The (0-based) number of the GPU to use

--ignore-cache#

Ignore the dataset and model cache and rebuild from scratch.

--no-pretrain#

Don’t pretrain the agents, regardless of the hyperparameters

--num-workers <num_workers>#

The number of workers to use for multiprocessing

--max-tasks-per-child <max_tasks_per_child>#

The maximum number of tasks each worker can run before being replaced

--num-skip <num_skip>#

The number of initial tasks to skip. Useful to resume an experiment