Cascade Operations

class cascade_at.cascade.cascade_operations._CascadeOperation(upstream_commands=None, executor_parameters=None)[source]

Bases: object

The base class for a cascade operation.

Parameters
  • upstream_commands (Optional[List[str]]) – A list of commands that are upstream to this operation. This means that it will be run before this operation.

  • executor_parameters (Optional[Dict[str, Any]]) – Optional dictionary of execution parameters that updates the execution parameters DEFAULT_EXECUTOR_PARAMETERS

static _script()[source]
_make_template()[source]
_make_command(**kwargs)[source]
_make_name()[source]
_validate(**kwargs)[source]
_make_template_kwargs(**kwargs)[source]

Takes kwargs like model_version_id=0 and turns it into kwargs dict that looks like {‘model_version_id’: –model-version-id 0}.

For boolean args, it will look like {‘do_this’: ‘–do-this’}. And for arguments from self.arg_list that have defaults, it will fill in the default value if it is not passed in the kwargs (unless it’s None).

Used for converting things into Jobmon TaskTemplates.

Parameters

kwargs – Keyword arguments

Return type

Dict[str, str]

Returns

  • Dictionary of keyword arguments similar to what was passed but with

  • values that have been converted to what the TaskTemplate in Jobmon expects. Also

  • filling in default arguments that are not passed but are listed in

  • the ArgumentList for self.

_configure(**command_args)[source]

Validates the keyword arguments passed in and creates the command, job name, and task template kwargs.

Parameters

command_args – Keyword arguments to be passed to the cascade operation

Return type

None