idmtools_platform_slurm.platform_operations.experiment_operations module

Here we implement the SlurmPlatform experiment operations.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

class idmtools_platform_slurm.platform_operations.experiment_operations.SlurmPlatformExperimentOperations(platform: 'SlurmPlatform', platform_type: Type = <class 'idmtools_platform_slurm.platform_operations.utils.SlurmExperiment'>)

Bases: IPlatformExperimentOperations

platform: SlurmPlatform
platform_type

alias of SlurmExperiment

get(experiment_id: Union[str, UUID], **kwargs) Dict

Gets an experiment from the Slurm platform. :param experiment_id: experiment id :param kwargs: keyword arguments used to expand functionality

Returns:

Slurm Experiment object

platform_create(experiment: Experiment, **kwargs) SlurmExperiment

Creates an experiment on Slurm Platform. :param experiment: idmtools experiment :param kwargs: keyword arguments used to expand functionality

Returns:

Slurm Experiment object created

get_children(experiment: SlurmExperiment, parent: Optional[Experiment] = None, raw=True, **kwargs) List[Any]

Fetch slurm experiment’s children. :param experiment: Slurm experiment :param raw: True/False :param parent: the parent of the simulations :param kwargs: keyword arguments used to expand functionality

Returns:

List of slurm simulations

get_parent(experiment: SlurmExperiment, **kwargs) SlurmSuite

Fetches the parent of an experiment. :param experiment: Slurm experiment :param kwargs: keyword arguments used to expand functionality

Returns:

The Suite being the parent of this experiment.

platform_run_item(experiment: Experiment, **kwargs)

Run experiment. :param experiment: idmtools Experiment :param kwargs: keyword arguments used to expand functionality

Returns:

None

send_assets(experiment: Experiment, **kwargs)

Copy our experiment assets. Replaced by self.platform._assets.dump_assets(experiment) :param experiment: idmtools Experiment :param kwargs: keyword arguments used to expand functionality

Returns:

None

list_assets(experiment: Experiment, **kwargs) List[Asset]

List assets for an experiment. :param experiment: Experiment to get assets for :param kwargs:

Returns:

List[Asset]

get_assets_from_slurm_experiment(experiment: SlurmExperiment) AssetCollection

Get assets for a comps experiment. :param experiment: Experiment to get asset collection for.

Returns:

AssetCollection if configuration is set and configuration.asset_collection_id is set.

to_entity(slurm_exp: SlurmExperiment, parent: Optional[Suite] = None, children: bool = True, **kwargs) Experiment

Convert a SlurmExperiment to idmtools Experiment. :param slurm_exp: simulation to convert :param parent: optional experiment object :param children: bool :param kwargs:

Returns:

Experiment object

refresh_status(experiment: Experiment, **kwargs)

Refresh status of experiment. :param experiment: idmtools Experiment :param kwargs: keyword arguments used to expand functionality

Returns:

None

__init__(platform: SlurmPlatform, platform_type: ~typing.Type = <class 'idmtools_platform_slurm.platform_operations.utils.SlurmExperiment'>) None