law.sandbox.base#
Abstract defintions that enable task sandboxing.
Class Sandbox
#
- class Sandbox(name, task=None, env_cache_path=None)[source]#
Bases:
object
Sandbox definition.
The config section used by instances if this or inheriting classes constructed using
config_section_prefix
followed by"_sandbox"
and optional postifxes. The minimal set of options in the main section are:"stagein_dir_name"
(usually"stagein"
)"stageout_dir_name"
(usually"stageout"
)"law_executable"
(usually"law"
)
Class SandboxProxy
#
- class SandboxProxy(*args, **kwargs)[source]#
Bases:
ProxyTask
- output()[source]#
The output that this Task produces.
The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single
Target
or a list ofTarget
instances.- Implementation note
If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.
See Task.output