[tune] Disallow setting resources_per_trial when it is already configured (#4880)

* disallow it

* import fix

* fix example

* fix test

* fix tests

* Update mock.py

* fix

* make less convoluted

* fix tests
This commit is contained in:
Eric Liang
2019-06-03 06:47:39 +08:00
committed by GitHub
parent d86ee8c83e
commit 99eae05cf6
4 changed files with 28 additions and 15 deletions
+1 -2
View File
@@ -21,7 +21,6 @@ from ray.tune.result import (DEFAULT_RESULTS_DIR, TIME_THIS_ITER_S,
TIMESTEPS_THIS_ITER, DONE, TIMESTEPS_TOTAL,
EPISODES_THIS_ITER, EPISODES_TOTAL,
TRAINING_ITERATION, RESULT_DUPLICATE)
from ray.tune.trial import Resources
logger = logging.getLogger(__name__)
@@ -96,7 +95,7 @@ class Trainable(object):
allocation, so the user does not need to.
"""
return Resources(cpu=1, gpu=0)
return None
@classmethod
def resource_help(cls, config):