Skip to content

Commit

Permalink
Move benchmark/metrics/benchmark.py to benchmark_metric.py (#2712)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2712

After a refactor that deleted many metric subclasses, metrics/benchmark.py has only one file in its folder, so there is no need for a folder. This PR gets rid of the folder, moving ax/benchmark/metrics/benchmark.py to ax/benchmark/benchmark_metric.py

Reviewed By: saitcakmak, Balandat

Differential Revision: D61736027

fbshipit-source-id: 131e93f9c75f868664f8bb014a2c92aeabbd1e3d
  • Loading branch information
esantorella authored and facebook-github-bot committed Aug 27, 2024
1 parent 3e2e290 commit c51dd58
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 27 deletions.
5 changes: 0 additions & 5 deletions ax/benchmark/__init__.py

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion ax/benchmark/benchmark_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import numpy as np
import pandas as pd

from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.benchmark_metric import BenchmarkMetric
from ax.benchmark.runners.base import BenchmarkRunner
from ax.benchmark.runners.botorch_test import BotorchTestProblemRunner
from ax.core.data import Data
Expand Down
6 changes: 0 additions & 6 deletions ax/benchmark/metrics/__init__.py

This file was deleted.

3 changes: 2 additions & 1 deletion ax/benchmark/problems/synthetic/discretized/mixed_integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@

from typing import Optional, Union

from ax.benchmark.benchmark_metric import BenchmarkMetric

from ax.benchmark.benchmark_problem import BenchmarkProblem
from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.runners.botorch_test import BotorchTestProblemRunner
from ax.core.objective import Objective
from ax.core.optimization_config import OptimizationConfig
Expand Down
2 changes: 1 addition & 1 deletion ax/benchmark/problems/synthetic/hss/jenatton.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from typing import Optional

import torch
from ax.benchmark.benchmark_metric import BenchmarkMetric
from ax.benchmark.benchmark_problem import BenchmarkProblem
from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.runners.botorch_test import (
ParamBasedTestProblem,
ParamBasedTestProblemRunner,
Expand Down
7 changes: 0 additions & 7 deletions ax/benchmark/tests/metrics/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion ax/benchmark/tests/problems/synthetic/hss/test_jenatton.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import math
from random import random

from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.benchmark_metric import BenchmarkMetric

from ax.benchmark.problems.synthetic.hss.jenatton import (
get_jenatton_benchmark_problem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# pyre-strict

from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.benchmark_metric import BenchmarkMetric
from ax.core.arm import Arm
from ax.core.batch_trial import BatchTrial
from ax.core.trial import Trial
Expand Down
3 changes: 2 additions & 1 deletion ax/benchmark/tests/test_benchmark_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

from typing import Optional, Union

from ax.benchmark.benchmark_metric import BenchmarkMetric

from ax.benchmark.benchmark_problem import (
create_multi_objective_problem_from_botorch,
create_single_objective_problem_from_botorch,
)
from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.runners.botorch_test import BotorchTestProblemRunner
from ax.core.types import ComparisonOp
from ax.utils.common.testutils import TestCase
Expand Down
2 changes: 1 addition & 1 deletion ax/storage/json_store/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

import torch
from ax.benchmark.benchmark_method import BenchmarkMethod
from ax.benchmark.benchmark_metric import BenchmarkMetric
from ax.benchmark.benchmark_problem import (
BenchmarkProblem,
MultiObjectiveBenchmarkProblem,
)
from ax.benchmark.benchmark_result import AggregatedBenchmarkResult, BenchmarkResult
from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.problems.hpo.torchvision import PyTorchCNNTorchvisionParamBasedProblem
from ax.benchmark.runners.botorch_test import (
BotorchTestProblemRunner,
Expand Down
2 changes: 1 addition & 1 deletion ax/storage/tests/test_registry_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# pyre-strict

from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.benchmark_metric import BenchmarkMetric
from ax.benchmark.runners.botorch_test import BotorchTestProblemRunner
from ax.metrics.branin import BraninMetric
from ax.runners.synthetic import SyntheticRunner
Expand Down
2 changes: 1 addition & 1 deletion ax/utils/testing/benchmark_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
import numpy as np
import torch
from ax.benchmark.benchmark_method import BenchmarkMethod
from ax.benchmark.benchmark_metric import BenchmarkMetric
from ax.benchmark.benchmark_problem import (
BenchmarkProblem,
create_multi_objective_problem_from_botorch,
create_single_objective_problem_from_botorch,
MultiObjectiveBenchmarkProblem,
)
from ax.benchmark.benchmark_result import AggregatedBenchmarkResult, BenchmarkResult
from ax.benchmark.metrics.benchmark import BenchmarkMetric
from ax.benchmark.problems.surrogate import (
MOOSurrogateBenchmarkProblem,
SOOSurrogateBenchmarkProblem,
Expand Down

0 comments on commit c51dd58

Please sign in to comment.