Skip to content

Commit 203c317

Browse files
mpolson64facebook-github-bot
authored andcommitted
Remove generation_method from Summary analysis
Summary: This is duplicated with GenerationNode and often holds non-useful names anyways Differential Revision: D71397622
1 parent f1ee58f commit 203c317

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

ax/analysis/summary.py

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class Summary(Analysis):
2828
- arm_name: The name of the arm
2929
- trial_status: The status of the trial (e.g. RUNNING, SUCCEDED, FAILED)
3030
- failure_reason: The reason for the failure, if applicable
31-
- generation_method: The model_key of the model that generated the arm
3231
- generation_node: The name of the ``GenerationNode`` that generated the arm
3332
- **METADATA: Any metadata associated with the trial, as specified by the
3433
Experiment's runner.run_metadata_report_keys field

ax/analysis/tests/test_summary.py

-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def test_compute(self) -> None:
7171
"trial_index",
7272
"arm_name",
7373
"trial_status",
74-
"generation_method",
7574
"generation_node",
7675
"foo",
7776
"bar",
@@ -91,7 +90,6 @@ def test_compute(self) -> None:
9190
"trial_index": {0: 0, 1: 1},
9291
"arm_name": {0: "0_0", 1: "1_0"},
9392
"trial_status": {0: "COMPLETED", 1: "FAILED"},
94-
"generation_method": {0: "Sobol", 1: "Sobol"},
9593
"generation_node": {0: "Sobol", 1: "Sobol"},
9694
"foo": {0: 1.0, 1: np.nan}, # NaN because trial 1 failed
9795
"bar": {0: 2.0, 1: np.nan},
@@ -117,7 +115,6 @@ def test_compute(self) -> None:
117115
"arm_name",
118116
"trial_status",
119117
"fail_reason",
120-
"generation_method",
121118
"generation_node",
122119
"foo",
123120
"bar",

ax/core/experiment.py

-3
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,6 @@ def to_df(self, omit_empty_columns: bool = True) -> pd.DataFrame:
18521852
- arm_name: The name of the arm
18531853
- trial_status: The status of the trial (e.g. RUNNING, SUCCEDED, FAILED)
18541854
- failure_reason: The reason for the failure, if applicable
1855-
- generation_method: The model_key of the model that generated the arm
18561855
- generation_node: The name of the ``GenerationNode`` that generated the arm
18571856
- **METADATA: Any metadata associated with the trial, as specified by the
18581857
Experiment's runner.run_metadata_report_keys field
@@ -1881,7 +1880,6 @@ def to_df(self, omit_empty_columns: bool = True) -> pd.DataFrame:
18811880
# Find the arm's associated generation method from the trial via the
18821881
# GeneratorRuns if possible
18831882
grs = [gr for gr in trial.generator_runs if arm in gr.arms]
1884-
generation_method = grs[0]._model_key if len(grs) > 0 else None
18851883
generation_node = grs[0]._generation_node_name if len(grs) > 0 else None
18861884

18871885
# Find other metadata from the trial to include from the trial based
@@ -1902,7 +1900,6 @@ def to_df(self, omit_empty_columns: bool = True) -> pd.DataFrame:
19021900
"arm_name": arm.name,
19031901
"trial_status": trial.status.name,
19041902
"fail_reason": trial.run_metadata.get("fail_reason", None),
1905-
"generation_method": generation_method,
19061903
"generation_node": generation_node,
19071904
**metadata,
19081905
**observed_means,

ax/core/tests/test_experiment.py

-2
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,6 @@ def test_to_df(self) -> None:
13351335
"trial_index": [0, 1, 2],
13361336
"arm_name": ["0_0", "1_0", "0_0"],
13371337
"trial_status": ["COMPLETED", "COMPLETED", "CANDIDATE"],
1338-
"generation_method": ["Sobol", "Sobol", "Sobol"],
13391338
"name": ["0", "1", None], # the metadata
13401339
"m1": [1.0, 3.0, None],
13411340
"m2": [2.0, 4.0, None],
@@ -1353,7 +1352,6 @@ def test_to_df(self) -> None:
13531352
"arm_name",
13541353
"trial_status",
13551354
"fail_reason",
1356-
"generation_method",
13571355
"generation_node",
13581356
"name",
13591357
"m1",

0 commit comments

Comments
 (0)