noether.core.trackers¶
Submodules¶
Classes¶
Base class for all experiment trackers. |
|
Dummy tracker that does nothing. |
|
TensorBoard tracker for logging metrics and configuration. |
|
HuggingFace Trackio tracker. |
|
Weights and Biases tracker. |
Package Contents¶
- class noether.core.trackers.BaseTracker(metric_property_provider, path_provider)¶
Base class for all experiment trackers.
Initialize the BaseTracker.
- Parameters:
metric_property_provider (noether.core.providers.MetricPropertyProvider) – The metric property provider gives additional information such as whether higher values are better.
path_provider (noether.core.providers.PathProvider) – Gives access to paths (e.g., output_path: where checkpoints/logs are stored).
- logger¶
- metric_property_provider¶
- path_provider¶
- init(accelerator, run_name, stage_name, stage_hp, run_id, output_uri)¶
Initialize the tracker for a specific run.
- Parameters:
accelerator (str) – The accelerator used for training (e.g., “cpu”, “cuda”).
run_name (str) – The name of the run.
stage_name (str | None) – The stage of the run.
stage_hp (dict) – The hyperparameters for the run stage.
run_id (str) – The ID of the run.
output_uri (str) – The URI where the output will be stored.
- Return type:
None
- log(data)¶
Log data to the tracker.
- close()¶
Close the file used by the tracker and save the summary.
- Return type:
None
- set_summary(key, value)¶
Set a summary value. :param key: The key for the summary value. :param value: The value to set.
- Parameters:
key (str)
value (Any)
- Return type:
None
- update_summary(data)¶
Update the summary with new data.
- Parameters:
data (dict) – The data to update the summary with. This should be a dictionary where the values are the data to log.
- summarize_logvalues()¶
Summarize the log values from the entries. This method is called after the training is finished and summarizes the log values. It computes the min/max values for each log value and stores them in the summary.
- Return type:
None
- class noether.core.trackers.NoopTracker(metric_property_provider, path_provider)¶
Bases:
noether.core.trackers.base.BaseTrackerDummy tracker that does nothing.
Initialize the BaseTracker.
- Parameters:
metric_property_provider (noether.core.providers.MetricPropertyProvider) – The metric property provider gives additional information such as whether higher values are better.
path_provider (noether.core.providers.PathProvider) – Gives access to paths (e.g., output_path: where checkpoints/logs are stored).
- class noether.core.trackers.TensorboardTracker(tracker_config, **kwargs)¶
Bases:
noether.core.trackers.base.BaseTrackerTensorBoard tracker for logging metrics and configuration.
Initialize the TensorboardTracker.
- Parameters:
tracker_config (noether.core.schemas.trackers.TensorboardTrackerSchema) – Configuration for TensorBoard. See
TensorboardTrackerSchemafor available options (typically including base log_dir).**kwargs – Additional keyword arguments passed to the parent class.
- config¶
- class noether.core.trackers.TrackioTracker(tracker_config, **kwargs)¶
Bases:
noether.core.trackers.base.BaseTrackerHuggingFace Trackio tracker.
https://github.com/gradio-app/trackio
Initialize the TrackioTracker. :param tracker_config: Configuration for the TrackioTracker. See
TrackioTrackerSchemafor available options including project and space_id. :param **kwargs: Additional keyword arguments passed to the parent class.- Parameters:
tracker_config (noether.core.schemas.trackers.TrackioTrackerSchema)
- config¶
- class noether.core.trackers.WandBTracker(tracker_config, **kwargs)¶
Bases:
noether.core.trackers.base.BaseTrackerWeights and Biases tracker.
Example config:
- Parameters:
tracker_config (noether.core.schemas.trackers.WandBTrackerSchema) – Configuration for the WandBTracker. See
WandBTrackerSchemafor available options including mode, entity, and project.**kwargs – Additional keyword arguments passed to the parent class.
- MODES = ['disabled', 'online', 'offline']¶
- mode¶
- entity¶
- project¶