Skip to main content

manager

Manager

View of database.

Manager (
path: str = None,
comm: mpi4py.MPI.Comm = <mpi4py.MPI.Intracomm object>,
uid: str = None,
create_if_not_exist: bool = True
)
Parameters:
  • path : <class 'str'>

    path to the directory of the database. If doesn't exist, a new database will be created.

  • comm : <class 'mpi4py.MPI.Comm'>

    MPI communicator

  • uid : <class 'str'>

    UID of the database

  • create_if_not_exist : <class 'bool'>

Variables:

Manager[key]

__getitem__ (self, key: Union[str, int]) -> bamboost.simulation.Simulation

Returns the simulation in the specified row of the dataframe.

Parameters:
  • self : Any

  • key : typing.Union[str, int]

    The simulation identifier (`str`) or the row index (`int`).

Returns:

len(Manager)

__len__ (self) -> int

None

Parameters:
  • self : Any

Returns:
    <class 'int'>

iter(Manager)

__iter__ (self) -> bamboost.simulation.Simulation

None

Parameters:
  • self : Any

get_view

get_view (self, include_linked_sims: bool = False) -> pandas.core.frame.DataFrame

View of the database and its parametric space.

Parameters:
  • self : Any

  • include_linked_sims : <class 'bool'>

    if True, include the parameters of linked sims

Returns:

sim

sim (self, uid, return_writer: bool = False) -> bamboost.simulation.Simulation

Get an existing simulation with uid. Same as accessing with `db[uid]` directly.

Parameters:
  • self : Any

  • uid : Any

    unique identifier

  • return_writer : <class 'bool'>

    if true, return `SimulationWriter`, otherwise return `Simulation`

sims

sims (
self,
select: pandas.core.series.Series = None,
sort: str = None,
reverse: bool = False,
exclude: set = None,
return_writer: bool = False
) -> list

Get all simulations in a list. Optionally, get all simulations matching the given selection using pandas.

Parameters:
  • self : Any

  • select : <class 'pandas.core.series.Series'>

    pandas boolean series

  • sort : <class 'str'>

    Optionally sort the list with this keyword

  • reverse : <class 'bool'>

    swap sort direction

  • exclude : <class 'set'>

    sims to exclude

  • return_writer : <class 'bool'>

    if true, return `SimulationWriter`, otherwise return `Simulation`

Returns:
    <class 'list'>

    A list of `:class:~bamboost.simulation.Simulation` objects

create_simulation

create_simulation (
self,
uid: str = None,
parameters: dict = None,
skip_duplicate_check: bool = False,
prefix: str = None
) -> bamboost.simulation_writer.SimulationWriter

Get a writer object for a new simulation. This is written for paralell use as it is likely that this may be used in an executable, creating multiple runs for a parametric space, which may be run in paralell.

Parameters:
  • self : Any

  • uid : <class 'str'>

    The name/uid for the simulation. If not specified, a random id will be assigned.

  • parameters : <class 'dict'>

    Parameter dictionary. If provided, the parameters will be checked against the existing sims for duplication. Otherwise, they may be specified later with bamboost.simulation.SimulationWriter.add_parameters.

  • skip_duplicate_check : <class 'bool'>

    if True, the duplicate check is skipped.

  • prefix : <class 'str'>

    Prefix for the uid. If not specified, no prefix is used.

remove

remove (self, uid: str) -> None

CAUTION, DELETING DATA. Remove the data of a simulation.

Parameters:
  • self : Any

  • uid : <class 'str'>

    uid

Returns:
    None

global_fields_in_all

global_fields_in_all (self) -> list

Get a list of all global fields in all simulations.

Parameters:
  • self : Any

Returns:
    <class 'list'>

    List of global fields

get_parameters

get_parameters (self) -> dict

Get the parameters used in this database.

Parameters:
  • self : Any

Returns:
    <class 'dict'>

    Dictionary of parameters with it's count, range, and type. Sorted by count.

ManagerFromUID

Get a database by its UID. This is used for autocompletion in ipython.

ManagerFromUID ()
Parameters:
    Variables:
    • completion_keys :

    ManagerFromUID[key]

    __getitem__ (self, key) -> bamboost.manager.Manager

    None

    Parameters:
    • self : Any

    • key : Any

    ManagerFromName

    Get a database by its path/name. This is used for autocompletion in ipython.

    ManagerFromName ()
    Parameters:
      Variables:
      • completion_keys :

      ManagerFromName[key]

      __getitem__ (self, key) -> bamboost.manager.Manager

      None

      Parameters:
      • self : Any

      • key : Any