skeltorch.Skeltorch

class skeltorch.Skeltorch(data, runner)

Skeltorch project initializer class.

skeltorch.Skeltorch class is responsible for creating the objects required to run a project. It also contains the links between command-line interfaces and Python commands, which can be used to run both default and custom pipelines.

execution

Execution object.

Type:skeltorch.Execution
experiment

Experiment object.

Type:skeltorch.Experiment
configuration

Configuration object.

Type:skeltorch.Configuration
data

Data object.

Type:skeltorch.Data
runner

Runner object.

Type:skeltorch.Runner
logger

Logger object.

Type:logging.Logger
create_command(self, command_parser, command_handler, command_args_keys)

Creates a new command-method association.

Associates command_parser with command_handler. Every time that the command of command_parser is executed, command_handler will be run with the parameters given in command_args_keys.

Parameters:
  • command_parser (argparse.ArgumentParser) – Argument parser which executes command_handler.
  • command_handler (Callable) – Method to run when calling command_name.
  • command_args_keys (list) – List containing the names of the command arguments passed to command_handler.
create_parser(self, command_name)

Creates and returns a new parser.

Creates a new parser associated with command_name. You can this parser to add custom arguments and customize the behavior of your pipeline.

Parameters:command_name (str) – Name of the command associated with the returned parser.
Returns:Argument parser associated to command_name.
Return type:argparse.ArgumentParser
get_parser(self, command_name)

Gets an already-created parser.

Returns the parser associated with command_name. You may use this parser to add custom arguments or even modify the existing ones.

Parameters:command_name (str) – Name of the command associated to the returned parser.
Returns:Argument parser associated to command_name.
Return type:argparse.ArgumentParser
run(self)

Runs a Skeltorch project.