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
)
- 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'>
- FIX_DF :
- fromUID :
bamboost.manager.ManagerFromUID
- fromName :
bamboost.manager.ManagerFromName
- path :
- comm :
- UID :
- all_uids :
: set
- df :
: pandas.core.frame.DataFrame
View of the database and its parametric space.
- data_info :
: pandas.core.frame.DataFrame
Return view of stored data for all simulations
Manager[key]
__getitem__ (self, key: Union[str, int]) -> bamboost.simulation.Simulation
Returns the simulation in the specified row of the dataframe.
- self :
Any
- key :
typing.Union[str, int]
The simulation identifier (`str`) or the row index (`int`).
bamboost.simulation.Simulation
The selected simulation object.
len(Manager)
__len__ (self) -> int
None
- self :
Any
<class 'int'>
iter(Manager)
__iter__ (self) -> bamboost.simulation.Simulation
None
- self :
Any
get_view
get_view (self, include_linked_sims: bool = False) -> pandas.core.frame.DataFrame
View of the database and its parametric space.
- self :
Any
- include_linked_sims :
<class 'bool'>
if True, include the parameters of linked sims
<class 'pandas.core.frame.DataFrame'>
sim
sim (self, uid, return_writer: bool = False) -> bamboost.simulation.Simulation
Get an existing simulation with uid. Same as accessing with `db[uid]` directly.
- 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.
- 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`
<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.
- 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.
- self :
Any
- uid :
<class 'str'>
uid
None
global_fields_in_all
global_fields_in_all (self) -> list
Get a list of all global fields in all simulations.
- self :
Any
<class 'list'>
List of global fields
get_parameters
get_parameters (self) -> dict
Get the parameters used in this database.
- self :
Any
<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 ()
- completion_keys :
ManagerFromUID[key]
__getitem__ (self, key) -> bamboost.manager.Manager
None
- self :
Any
- key :
Any
ManagerFromName
Get a database by its path/name. This is used for autocompletion in ipython.
ManagerFromName ()
- completion_keys :
ManagerFromName[key]
__getitem__ (self, key) -> bamboost.manager.Manager
None
- self :
Any
- key :
Any