Shortcuts

run_experiments module

Helper script that allows to create multiple config files and sbatch scripts.

run_experiments.create_config_files(config_file_path, output_dir)[source]

This function takes the path of a config file as input. The input config file can contain lists for the dataset_config, the strategy_config and the random_state config options. For each combination of the specified datasets, strategies and random states, this function will create a separate config file in the specified output_dir.

Parameters
  • config_file_path (string) – Path of a config file that may contain lists of configs / values for the dataset_config, the strategy_config and the random_state options.

  • output_dir (string) – Path of the directory in which the created config files are to be saved.

run_experiments.create_sbatch_jobs_from_config_files(config_dir, sbatch_dir, run_scripts=True, partition='gpu', memory=50)[source]

This function takes folder containing multiple config files, creates an sbatch script for each config file and optionally starts the sbatch runs.

Parameters
  • config_dir (string) – Path of a directory containing multiple config files for which sbatch runs are to be started.

  • sbatch_dir (string) – Directory in which the sbatch scripts are to be saved.

  • run_scripts (bool, optional) – Whether the sbatch runs should be started by this function. Defaults to True.

  • partition (string, optional) – Partition on which the slurm job is to be run. Defaults to “gpu”.

  • memory (int, optional) – Memory to be requested for the slurm job in giga bytes. Defaults to 50.

run_experiments.start_sbatch_runs(sbatch_run_dir, sbatch_finished_dir)[source]

This function starts multiple sbatch runs.

Parameters
  • sbatch_run_dir (string) – Path of a directory containing multiple sbatch scripts to be started.

  • sbatch_finished_dir (string) – Path of a directory to which the sbatch scripts are to be moved when the corresponding sbatch runs finished.

Docs

Access comprehensive developer documentation for Active Segmentation

View Docs