Skip to content

plkit.runner

module

plkit.runner

Run jobs via non-local runners.

Classes
abstract class

plkit.runner.Runner()

The base class for runner

Methods
  • run(config, data_class, model_class, optuna) (Trainer) Run the whole pipeline using the runner</>
abstract method

run(config, data_class, model_class, optuna=None)

Run the whole pipeline using the runner

Parameters
  • config (dict(str: any)) A dictionary of configuration, must have following items: - batch_size: The batch size - num_classes: The number of classes for classification 1 means regression
  • data_class (type of DataModule) The data class subclassed from Data
  • model_class (type of Module) The model class subclassed from Module
  • optuna (Optuna, optional) The optuna object
  • runner The runner object
Returns (Trainer)

The trainer object

class

plkit.runner.LocalRunner()

The local runner for the pipeline

Methods
  • run(config, data_class, model_class, optuna) (Trainer) Run the pipeline locally</>
method

run(config, data_class, model_class, optuna=None)Trainer

Run the pipeline locally

class

plkit.runner.SGERunner(*args, **opts)

The SGE runner for the pipeline

Parameters
  • opts The options for SGE runner, which will be translated as arguments for qsub. For example opts={'notify': True} will be translated as qsub --notify ... from command line.
    there are two special options qsub and workdir. qsub specified the path to qsub executable and workdir specifies a location to save outputs, errors and scripts of each job.
Attributes
  • qsub The path to qsub executable
  • workdir The path to the workdir
Methods
  • run(config, data_class, model_class, optuna) (Trainer) Run the job depending on the env flag</>
method

run(config, data_class, model_class, optuna=None)Trainer

Run the job depending on the env flag