evorl.recorders.wandb_recorder¶
Module Contents¶
Classes¶
Recorder for Weights & Biases. |
Functions¶
Add prefix to the keys of a dictionary. |
|
Get statistics of a 1D array. |
|
Get raw value and statistics of a 1D array. |
API¶
- class evorl.recorders.wandb_recorder.WandbRecorder(*, project, name, config, tags, path, **wandb_kwargs)[source]¶
Bases:
evorl.recorders.recorder.RecorderRecorder for Weights & Biases.
- evorl.recorders.wandb_recorder.add_prefix(data: dict, prefix: str)[source]¶
Add prefix to the keys of a dictionary.
- evorl.recorders.wandb_recorder.get_1d_array(data)[source]¶
Get statistics of a 1D array.
Similar to
get_1d_array_statistics, but instead of recording histogram, WandB will record the raw data.
- evorl.recorders.wandb_recorder.get_1d_array_statistics(data, histogram=False)[source]¶
Get raw value and statistics of a 1D array.
Helper function for logging in WandB.
- Parameters:
data – 1D numpy array. If data has multiple dimensions, it will be viewed as flattened.
histogram – If True, return raw data in
pd.Series, which will be futher converted to histogram inWandBRecorder.
- Returns:
A dictionary containing min, max, mean, and optional raw data.