Skip to content

Commit 81b978e

Browse files
chongyouquanTensorflow Cloud maintainers
authored andcommitted
Remove some tests
PiperOrigin-RevId: 345311713
1 parent be2e15e commit 81b978e

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/python/tensorflow_cloud/tuner/tests/unit/utils_test.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,6 @@
161161
}
162162
],
163163
}
164-
STUDY_CONFIG_FIXED_BOOLEAN = {
165-
"metrics": [{"goal": "MAXIMIZE", "metric": "accuracy"}],
166-
"parameters": [
167-
{
168-
"discrete_value_spec": {"values": [1.0]},
169-
"parameter": "condition",
170-
"type": "DISCRETE",
171-
}
172-
],
173-
}
174164
OPTIMIZER_TRIAL = {
175165
"name": "projects/project/locations/region/studies/study/trials/trial_1",
176166
"state": "ACTIVE",
@@ -283,8 +273,7 @@ def test_convert_study_config_bool(self):
283273

284274
@parameterized.parameters(
285275
("beta", 0.1, STUDY_CONFIG_FIXED_FLOAT),
286-
("type", "WIDE_AND_DEEP", STUDY_CONFIG_FIXED_CATEGORICAL),
287-
("condition", True, STUDY_CONFIG_FIXED_BOOLEAN))
276+
("type", "WIDE_AND_DEEP", STUDY_CONFIG_FIXED_CATEGORICAL))
288277
def test_convert_study_config_fixed(self, name, value, expected_config):
289278
hps = hp_module.HyperParameters()
290279
hps.Fixed(name, value)
@@ -401,15 +390,6 @@ def test_convert_hyperparams_to_hparams_fixed(self, name, value):
401390
}
402391
self.assertEqual(repr(hparams), repr(expected_hparams))
403392

404-
def test_convert_hyperparams_to_hparams_fixed_bool(self):
405-
hps = hp_module.HyperParameters()
406-
hps.Fixed("condition", True)
407-
hparams = utils.convert_hyperparams_to_hparams(hps)
408-
expected_hparams = {
409-
hparams_api.HParam("condition", hparams_api.Discrete([1])): 1,
410-
}
411-
self.assertEqual(repr(hparams), repr(expected_hparams))
412-
413393
@parameterized.parameters(
414394
("val_loss", "min",
415395
[oracle_module.Objective(name="val_loss", direction="min")]),

0 commit comments

Comments
 (0)