idmtools_models.r.json_r_task module

class idmtools_models.r.json_r_task.JSONConfiguredRTask(command: Union[str, idmtools.entities.command_line.CommandLine] = None, platform_requirements: Set[idmtools.entities.platform_requirements.PlatformRequirements] = <factory>, _ITask__pre_creation_hooks: List[Callable[[Union[ForwardRef('Simulation'), ForwardRef('IWorkflowItem')]], NoReturn]] = <factory>, _ITask__post_creation_hooks: List[Callable[[Union[ForwardRef('Simulation'), ForwardRef('IWorkflowItem')]], NoReturn]] = <factory>, common_assets: idmtools.assets.asset_collection.AssetCollection = <factory>, transient_assets: idmtools.assets.asset_collection.AssetCollection = <factory>, _task_log: logging.Logger = <factory>, image_name: str = None, build: bool = False, build_path: Union[str, NoneType] = None, Dockerfile: Union[str, NoneType] = None, pull_before_build: bool = True, use_nvidia_run: bool = False, _DockerTask__image_built: bool = False, script_path: str = None, r_path: str = 'Rscript', extra_libraries: list = <factory>, parameters: dict = <factory>, envelope: str = None, config_file_name: str = 'config.json', is_config_common: bool = False, command_line_argument: str = None, command_line_argument_no_filename: bool = True, configfile_argument: Union[str, NoneType] = '--config')

Bases: idmtools_models.json_configured_task.JSONConfiguredTask, idmtools_models.r.r_task.RTask

configfile_argument: Optional[str] = '--config'
gather_common_assets()

Return the common assets for a JSON Configured Task a derived class Returns:

gather_transient_assets()idmtools.assets.asset_collection.AssetCollection

Get Transient assets. This should general be the config.json

Returns

Transient assets

reload_from_simulation(simulation: idmtools.entities.simulation.Simulation, **kwargs)

Reload from Simulation. To do this, the process is

  1. First check for a configfile name from arguments, then tags, or the default name

  2. Load the json config file

  3. Check if we got an envelope argument from parameters or the simulation tags, or on the task object

Parameters
  • simulation – Simulation object with metadata to load info from

  • config_file_name – Optional name of config file

  • envelope – Optional name of envelope

Returns

Populates the config with config from object

pre_creation(parent: Union[idmtools.entities.simulation.Simulation, idmtools.entities.iworkflow_item.IWorkflowItem])

Called before creation of parent

Parameters

parent – Parent

Returns

None

Raise:

ValueError if script name is not provided

post_creation(parent: Union[idmtools.entities.simulation.Simulation, idmtools.entities.iworkflow_item.IWorkflowItem])

Optional Hook called at the after creation task. Can be used to setup simulation and experiment level hooks :param parent:

Returns:

class idmtools_models.r.json_r_task.JSONConfiguredRTaskSpecification

Bases: idmtools.registry.task_specification.TaskSpecification

get(configuration: dict)idmtools_models.r.json_r_task.JSONConfiguredRTask

Get instance of JSONConfiguredRTaskSpecification with configuration provided

Parameters

configuration – Configuration for object

Returns

JSONConfiguredRTaskSpecification with configuration

get_description() → str

Get description of plugin

Returns

Description of plugin

get_example_urls() → List[str]

Get Examples for JSONConfiguredRTask

Returns

List of Urls that point to examples for JSONConfiguredRTask

get_type() → Type[idmtools_models.r.json_r_task.JSONConfiguredRTask]

Get Type for Plugin

Returns

JSONConfiguredRTask