Create simulation tags

During the creation of simulations you can add tags, key:value pairs, included as metadata. The tags can be used for filtering on and searching for simulations. idmtools includes multiple ways for adding tags to simulations:

(Preferred) Builder callbacks via add_sweep_definition

You can add tags to simulations by using builder callbacks while building experiments with SimulationBuilder or Simulation classes and the add_sweep_definition method. This way supports adding tags to a large set of simulations and gives you full control over the simulation/task object. In addition, built-in tag management support is used when implementing the return values in a dictionary for the tags. For more information see the example in SimulationBuilder.

Base task with TemplatedSimulations

You can add tags to all simulations via base task used with the TemplatedSimulations class while building simulations. For more information see the example in TemplatedSimulations.

Specific simulation from TemplatedSimulations

If you need to add a tag to a specific simulation after building simulations from task with TemplatedSimulations, then you must convert the simulations to a list. For more information see the example in TemplatedSimulations.