Argument Formatting¶
Argument Formatters
- class slurmjobs.args.Argument[source]¶
The base-class for all argument formatters. If you want to provide a new argument formatter, just override this class and change either the:
format_argmethod that is used to format positional and key-value pairs, orformat_value(which is called informat_arg) to format python values as a string. This is often some form of quoted repr or json formatting.
- classmethod get(key='fire', *a, **kw)[source]¶
Return an instance of an argument formatter, based on its name.
- class slurmjobs.args.FireArgument[source]¶
Argument formatting for Python Fire.
Example:
python script.py a b --arg1 c --arg2 d
- class slurmjobs.args.ArgparseArgument[source]¶
Argument formatting for Python’s builtin argparse.
Example:
python script.py a b --arg1 c --arg2 d
- class slurmjobs.args.SacredArgument[source]¶
Formatting for sacred.
Example:
python script.py with arg1=a arg2=b