execute_batch_scheduler package

Module contents

Python package for workload scheduler execution cell magics and backend.

Defines the default backend and some default command line arguments for this default backend.

execute_batch_scheduler._DEFAULT_MGR

Default workload manager

execute_batch_scheduler._DEFAULT_LINE_CMD_ARGS

Default cell command line for default manager

execute_batch_scheduler.execute_magic module

Cell execution magics definition.

class execute_batch_scheduler.execute_magic.ExecuteMagics(shell=None, **kwargs)

Bases: IPython.core.magic.Magics

Magics for cell execution through workload manager

List of available workload managers:

Attributes

cross_validation_lock A contextmanager for running a block with our cross validation lock set to True.
options_table  
shell  

Methods

add_traits(**traits) Dynamically add trait attributes to the HasTraits instance.
arg_err(func) Print docstring if incorrect arguments were passed
class_config_rst_doc() Generate rST documentation for this class’ config options.
class_config_section() Get the config class config section
class_get_help([inst]) Get the help string for this class in ReST format.
class_get_trait_help(trait[, inst]) Get the help string for a single trait.
class_own_trait_events(name) Get a dict of all event handlers defined on this class, not a parent.
class_own_traits(**metadata) Get a dict of all the traitlets defined on this class, not a parent.
class_print_help([inst]) Get the help string for a single trait and print it.
class_trait_names(**metadata) Get a list of all the names of this class’ traits.
class_traits(**metadata) Get a dict of all the traits of this class.
default_option(fn, optstr) Make an entry in the options_table for fn, with value optstr
execute(line, cell)
format_latex(strng) Format a string for latex inclusion.
has_trait(name) Returns True if the object has a trait with the specified name.
hold_trait_notifications() Context manager for bundling trait change notifications and cross validation.
notify_change(change)
observe(handler[, names, type]) Setup a handler to be called when a trait changes.
on_trait_change([handler, name, remove]) DEPRECATED: Setup a handler to be called when a trait changes.
parse_options(arg_str, opt_str, *long_opts, **kw) Parse options passed to an argument string.
section_names() return section names as a list
set_trait(name, value) Forcibly sets trait attribute, including read-only attributes.
setup_instance(*args, **kwargs)
trait_events([name]) Get a dict of all the event handlers of this class.
trait_metadata(traitname, key[, default]) Get metadata values for trait by key.
trait_names(**metadata) Get a list of all the names of this class’ traits.
traits(**metadata) Get a dict of all the traits of this class.
unobserve(handler[, names, type]) Remove a trait change handler.
unobserve_all([name]) Remove trait change handlers of any type for the specified name.
update_config(config) Update config and load the new values
execute(line, cell)
%execute [--wlm WLM] [--shell SHELL] [--amgr AMGR] [--bg]

Execute given cell content through configured workload scheduler.

Keep some arguments : --wlm, --shell, --bg and --amgr. Other arguments are passed to workload manager backend.

Get some extra command line arguments from variable that may be overrided in IPython profile configuration file.

optional arguments:
--wlm WLM Workload manager.
--shell SHELL Shell to use.
--amgr AMGR The variable in which to store workload manager instance. If the script is backgrounded, this will be used to get cell output/error using get_output() method.
--bg Whether to run the script in the background. If given, the only way to see the output of the command is with –amgr.
magics = {'line': {}, 'cell': {'execute': 'execute'}}
registered = True
execute_batch_scheduler.execute_magic.load_ipython_extension(ipython)

Load extension.

Registers the ExecuteMagics