idmtools.entities.suite module#

Defines our Suite object.

The Suite object can be thought as a metadata object. It represents a container object for Experiments. All Suites should have one or more experiments.

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

class idmtools.entities.suite.Suite(_uid: str = None, _IItem__pre_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, _IItem__post_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, platform_id: str = None, _platform: IPlatform = None, parent_id: str = None, _parent: IEntity = None, status: ~idmtools.core.enums.EntityStatus = None, tags: ~typing.Dict[str, ~typing.Any] = <factory>, _platform_object: ~typing.Any = None, _IRunnableEntity__pre_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, _IRunnableEntity__post_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, name: str = None, experiments: ~idmtools.core.interfaces.entity_container.EntityContainer = <factory>, description: str = None)[source]#

Bases: INamedEntity, ABC, IRunnableEntity

Class that represents a generic suite (a collection of experiments).

Parameters:

experiments – The child items of this suite.

experiments: EntityContainer#
item_type: ItemType = 'Suite'#

Item Type(Experiment, Suite, Asset, etc)

description: str = None#
add_experiment(experiment: Experiment) NoReturn[source]#

Add an experiment to the suite.

Parameters:

experiment – the experiment to be linked to suite

display()[source]#

Display workflowitem.

Returns:

None

pre_creation(platform: IPlatform)[source]#

Pre Creation of IWorkflowItem.

Parameters:

platform – Platform we are creating item on

Returns:

None

post_creation(platform: IPlatform)[source]#

Post Creation of IWorkflowItem.

Parameters:

platform – Platform

Returns:

None

property done#

Return if a suite has finished executing.

Returns:

True if all experiments have ran, False otherwise

property succeeded: bool#

Return if a suite has succeeded. A suite is succeeded when all experiments have succeeded.

Returns:

True if all experiments have succeeded, False otherwise

to_dict() Dict[source]#

Converts suite to a dictionary.

Returns:

Dictionary of suite.

get_experiments() EntityContainer[source]#

Retrieve the experiments associated with this suite from the platform. :returns: A container of Experiment objects belonging to this suite. :rtype: EntityContainer

get_simulations_by_tags(tags=None, status=None, entity_type=False, skip_sims=None, max_simulations=None, **kwargs) Dict[str, List[str]][source]#

Retrieve simulation ids or simulation objects with matching tags across all experiments in the suite. This method filters simulations based on the provided tags, skipping specified simulations, and limiting the number of results if max_simulations is set. The return type can be either a dictionary of simulation IDs or simulation objects, depending on the entity_type flag. :param status: :param tags: A simulation’s tags to filter by. :type tags: dict, optional :param status: Simulation status. :type status: EntityStatus, Optional :param entity_type: If True, return simulation objects; otherwise, return simulation IDs. Defaults to False. :type entity_type: bool, optional :param skip_sims: A list of simulation IDs to exclude from the results. :type skip_sims: List[str], optional :param max_simulations: The maximum number of simulations to return per experiment. :type max_simulations: int, optional :param **kwargs: Additional filter parameters.

Returns:

A dictionary where the keys are experiment IDs and the values are lists of

simulation IDs or simulation objects, depending on the entity_type flag.

Return type:

Dict[str, List[str]]

__init__(_uid: str = None, _IItem__pre_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, _IItem__post_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, platform_id: str = None, _platform: IPlatform = None, parent_id: str = None, _parent: IEntity = None, status: ~idmtools.core.enums.EntityStatus = None, tags: ~typing.Dict[str, ~typing.Any] = <factory>, _platform_object: ~typing.Any = None, _IRunnableEntity__pre_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, _IRunnableEntity__post_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, name: str = None, experiments: ~idmtools.core.interfaces.entity_container.EntityContainer = <factory>, description: str = None) None#