subway.examples package

subway.examples.rgdslurm module

class subway.examples.rgdslurm.RgDChk(params=None, _from='conf', **kwargs)[source]

Bases: subway.plugins.dslurm.DSlurmChk

_abc_impl = <_abc_data object>
_render_input(jobid, checkid, param, prefix)[source]

DIY: depends. Generate input files based on jobid and param. The default impl can render param to input.template and similar to sbatch.template. But this is not general enough for all user case, the user can simply rewrite this method.

Parameters
  • jobid – str.

  • param – Unoin[Dict, List, Tuple].

Returns

None.

check_checking_main(jobid)[source]

DIY: must. Given jobid of job in state of checking, return params list for new jobs to be run.

Parameters

jobid – str.

Returns

List[Tuple[str, Dict[str, Any]]].

check_finished_main(jobid)[source]
Parameters

jobid – str.

Returns

List[Tuple[str, Dict[str, Any]]]. The length of the list must be 0 or 1. [(checkid, check_resource)]

class subway.examples.rgdslurm.RgDSub(**kwargs)[source]

Bases: subway.plugins.dslurm.DSlurmSub

_abc_impl = <_abc_data object>

subway.examples.rglocal module

class subway.examples.rglocal.RgChk(params=None, **kwargs)[source]

Bases: subway.framework.PlainChk

_abc_impl = <_abc_data object>
check_checking(outputpath)[source]

DIY: must. Check job whose state is checking. Jobs are sent to this method only when is_checked() returns True. Generate possible new jobs and inputs based on results from main task and possibly check task. The very core of checker class.

Parameters

jobid – str.

Returns

List[Tuple[str, Dict]]. [(jobid, resource dict), …]

check_kickstart()[source]

DIY: strongly recommended. Generate jobs with inputs at the beginning. The default impl does nothing. If the user doesn’t define this method in subclass, then the user must add inputs files and possible items in empty history.json by hand.

Returns

List[Tuple[str, Dict]]. [(jobid, resource dict)]

class subway.examples.rglocal.RgSub(resource_limit=None, _py='python3')[source]

Bases: subway.framework.PlainSub

__init__(resource_limit=None, _py='python3')[source]

Initialize self. See help(type(self)) for accurate signature.

_abc_impl = <_abc_data object>
submit_pending(jobid)[source]

DIY: must. The very core of submitter class. It describes how do you define submitting a job.

Parameters

jobid – str.

Returns

subway.examples.rgnh module

class subway.examples.rgnh.RgNChk(params=None, **kwargs)[source]

Bases: subway.plugins.nohup.NHSChk

_abc_impl = <_abc_data object>
check_checking_main(jobid)[source]

DIY:MUST.

Parameters

jobid – str.

Returns

List[Union[Dict, List]]. list of param for new jobs

class subway.examples.rgnh.RgNSub(**kwargs)[source]

Bases: subway.plugins.nohup.NHSSub

_abc_impl = <_abc_data object>

subway.examples.rgslurm module

class subway.examples.rgslurm.RgSChk(params=None, _from='conf', **kwargs)[source]

Bases: subway.plugins.sslurm.SSlurmChk

_abc_impl = <_abc_data object>
check_checking_main(jobid)[source]

DIY: must. Given jobid of job in state of checking, return params list for new jobs to be run.

Parameters

jobid – str.

Returns

List[Tuple[str, Dict[str, Any]]].

class subway.examples.rgslurm.RgSSub(**kwargs)[source]

Bases: subway.plugins.sslurm.SSlurmSub

_abc_impl = <_abc_data object>