Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach new metrics reported via raw_data as tracking metrics #3361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ax/preview/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
)
from ax.analysis.utils import choose_analyses
from ax.core.experiment import Experiment
from ax.core.map_metric import MapMetric
from ax.core.metric import Metric
from ax.core.objective import MultiObjective, Objective, ScalarizedObjective
from ax.core.observation import ObservationFeatures
Expand Down Expand Up @@ -438,6 +439,11 @@ def attach_data(
Saves to database on completion if storage_config is present.
"""

# If any metric is not present on the Experiment, add it as a tracking metric
for metric_name in raw_data.keys():
if metric_name not in self._experiment.metrics:
self._experiment.add_tracking_metric(metric=MapMetric(name=metric_name))

# If no progression is provided assume the data is not timeseries-like and
# set step=NaN
data_with_progression = [
Expand Down