Skip to content

Commit

Permalink
Silence fit tracking metrics logs in BenchmarkMethod (#2370)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2370

These warnings appear many times when running benchmark tests. Since tests have a logger level of warning, making these into info logs will have them appear in regular usage while silencing them in tests.
{F1488198739}

Reviewed By: esantorella

Differential Revision: D56199058

fbshipit-source-id: 560243228d200abf297ae959ac2ee8bbaf53ab7f
  • Loading branch information
saitcakmak authored and facebook-github-bot committed Apr 16, 2024
1 parent 7480fe9 commit 5c948a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ax/benchmark/benchmark_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __post_init__(self) -> None:
# the benchmark - in fact, things will error out deep inside the modeling
# stack since the model gets both noisy (benchmark) and noiseless (ground
# truth) observations. While support for this is something we shold add
# or models, in the context of benchmarking we actually want to avoid
# for models, in the context of benchmarking we actually want to avoid
# fitting the ground truth metrics at all.

# Clone the GS so as to not modify the original one in-place below.
Expand All @@ -57,15 +57,15 @@ def __post_init__(self) -> None:
if node.model_kwargs is None:
node.model_kwargs = {}
if node.model_kwargs.get("fit_tracking_metrics", True):
logger.warning(
logger.info(
"Setting `fit_tracking_metrics` in a GenerationStep to False.",
)
not_none(node.model_kwargs)["fit_tracking_metrics"] = False
for model_spec in node.model_specs:
if model_spec.model_kwargs is None:
model_spec.model_kwargs = {}
elif model_spec.model_kwargs.get("fit_tracking_metrics", True):
logger.warning(
logger.info(
"Setting `fit_tracking_metrics` in a GenerationNode's "
"model_spec to False."
)
Expand Down

0 comments on commit 5c948a9

Please sign in to comment.