export
¶
The module of exporting the experiment data. (qurry.qurrium.container.export
)
- class qurry.qurrium.experiment.export.Export(exp_id: str, exp_name: str, serial: int | None, summoner_id: str | None, summoner_name: str | None, filename: str, files: dict[str, str], args: dict[str, Any], commons: CommonparamsDict, outfields: dict[str, Any], adventures: dict[str, Any], legacy: dict[str, Any], tales: dict[str, Any], reports: dict[Hashable, dict[str, Any]], tales_reports: dict[str, dict[Hashable, dict[str, Any]]])[source]¶
Data-stored namedtuple with all experiments data which is jsonable.
- adventures: dict[str, Any]¶
Recording the data of âbeforewardâ, which will be packed into .advent.json. ~ A Great Adventure begins ~
- args: dict[str, Any]¶
Construct the experimentâs parameters, which will be packed into .args.json.
- commons: CommonparamsDict¶
Construct the experimentâs common parameters, which will be packed into .args.json.
- exp_name: str¶
Name of the experiment, which will be packed into .args.json. If this experiment is called by multimanager, then this name will never apply as filename.
- filename: str¶
The name of file to be exported, it will be decided by the
export()
when itâs called. More info in the pydoc of :prop:`files` orexport()
, which will be packed into .args.json.
- files: dict[str, str]¶
The list of file to be exported.
### Single experiment:
For the
write()
function actually exports 4 different files respecting to adventure, legacy, tales, and reports like:which bla_exp is the example filename.
### Multi-experiment:
If this experiment is called by :cls:`MultiManager`, then the it will be named after summoner_name as known as the name of :cls:`MultiManager`.
which BLBLA_project is the example :cls:`MultiManager` name stored at :prop:`commonparams.summoner_name`. At this senerio, the :prop:`exp_name` will never apply as filename.
- legacy: dict[str, Any]¶
Recording the data of âafterwardâ, which will be packed into .legacy.json. ~ The Legacy remains from the achievement of ancestors ~
- outfields: dict[str, Any]¶
Recording the data of other unused arguments, which will be packed into .args.json.
- reports: dict[Hashable, dict[str, Any]]¶
Recording the data of âreportsâ, which will be packed into .reports.json.
### Reports format:
~ The guild concludes the results. ~
- summoner_id: str | None¶
ID of experiment of the multiManager, which will be packed into .args.json.
- summoner_name: str | None¶
Name of experiment of the multiManager, which will be packed into .args.json.
- tales: dict[str, Any]¶
Recording the data of âside_productâ in âafterwardâ and âbeforewardsâ for API, which will be packed into .*.tales.json. ~ Tales of braves circulate ~
- tales_reports: dict[str, dict[Hashable, dict[str, Any]]]¶
Recording the data of âside_productâ in âreportsâ for API, which will be packed into .*.reprts.json.
### Tales Reports format:
~ Tales of braves circulate ~
- write(multiprocess: bool = False, pbar: tqdm | None = None) tuple[str, dict[str, str]] [source]¶
Export the experiment data, if there is a previous export, then will overwrite.
Hint
This function will traversal all objects in the export_set, so it will ensure the jsonable of all objects. And this will reduce the performance of exporting.
- Parameters:
multiprocess (bool, optional) â Whether to use multiprocess to export, Defaults to False. Itâs dangerous to use multiprocess to export. It may cause memory leak.
pbar (Optional[tqdm.tqdm], optional) â The progress bar for exporting. Defaults to None.
- Returns:
The first element is the id of experiment, the second element is the dictionary of files of experiment.
- Return type: