Skip to content

Commit bf42b8f

Browse files
saitcakmakfacebook-github-bot
authored andcommitted
Update cross validation tests to reduce mocking (#3745)
Summary: Pull Request resolved: #3745 They now use data from an actual experiment and an actual `Adapter` rather than a mock object with all mock methods. Reviewed By: Balandat Differential Revision: D74342457 fbshipit-source-id: 2795bbe74318de5cfc37935f2f5e7b622212003e
1 parent 0b6946c commit bf42b8f

File tree

5 files changed

+156
-169
lines changed

5 files changed

+156
-169
lines changed

ax/core/trial.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
from __future__ import annotations
1010

1111
from functools import partial
12-
1312
from logging import Logger
14-
1513
from typing import Any, TYPE_CHECKING
1614

1715
from ax.core.arm import Arm

ax/modelbridge/cross_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def cross_validate(
123123
arm_names_rnd = np.array(list(arm_names))
124124
# Not necessary to shuffle when using LOO, avoids differences in floating point
125125
# computations making equality tests brittle.
126-
if folds != -1:
126+
if folds != n:
127127
np.random.shuffle(arm_names_rnd)
128128
result = []
129129
for train_names, test_names in _gen_train_test_split(

0 commit comments

Comments
 (0)