Fix overriden typo (#11227)

This commit is contained in:
Sumanth Ratna
2020-10-07 19:11:07 -07:00
committed by GitHub
parent ff3e411ea2
commit 14d8826e43
12 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ class ProgressReporter:
class TuneReporterBase(ProgressReporter):
"""Abstract base class for the default Tune reporters.
If metric_columns is not overriden, Tune will attempt to automatically
If metric_columns is not overridden, Tune will attempt to automatically
infer the metrics being outputted, up to 'infer_limit' number of
metrics.
+1 -1
View File
@@ -48,7 +48,7 @@ TIMESTEPS_THIS_ITER = "timesteps_this_iter"
TIMESTEPS_TOTAL = "timesteps_total"
# (Auto-filled) Time in seconds this iteration took to run.
# This may be overriden to override the system-computed time difference.
# This may be overridden to override the system-computed time difference.
TIME_THIS_ITER_S = "time_this_iter_s"
# (Auto-filled) Accumulated time in seconds for this entire trial.
+8 -8
View File
@@ -302,7 +302,7 @@ class Trainable:
`done` (bool): training is terminated. Filled only if not provided.
`time_this_iter_s` (float): Time in seconds this iteration
took to run. This may be overriden in order to override the
took to run. This may be overridden in order to override the
system-computed time difference.
`time_total_s` (float): Accumulated time in seconds for this
@@ -727,7 +727,7 @@ class Trainable:
"""
result = self._train()
if self._is_overriden("_train") and log_once("_train"):
if self._is_overridden("_train") and log_once("_train"):
logger.warning(
"Trainable._train is deprecated and will be removed in "
"a future version of Ray. Override Trainable.step instead.")
@@ -778,7 +778,7 @@ class Trainable:
"""
checkpoint = self._save(tmp_checkpoint_dir)
if self._is_overriden("_save") and log_once("_save"):
if self._is_overridden("_save") and log_once("_save"):
logger.warning(
"Trainable._save is deprecated and will be removed in a "
"future version of Ray. Override "
@@ -836,7 +836,7 @@ class Trainable:
underneath the `checkpoint_dir` `save_checkpoint` is preserved.
"""
self._restore(checkpoint)
if self._is_overriden("_restore") and log_once("_restore"):
if self._is_overridden("_restore") and log_once("_restore"):
logger.warning(
"Trainable._restore is deprecated and will be removed in a "
"future version of Ray. Override Trainable.load_checkpoint "
@@ -859,7 +859,7 @@ class Trainable:
Copy of `self.config`.
"""
self._setup(config)
if self._is_overriden("_setup") and log_once("_setup"):
if self._is_overridden("_setup") and log_once("_setup"):
logger.warning(
"Trainable._setup is deprecated and will be removed in "
"a future version of Ray. Override Trainable.setup instead.")
@@ -884,7 +884,7 @@ class Trainable:
result (dict): Training result returned by step().
"""
self._log_result(result)
if self._is_overriden("_log_result") and log_once("_log_result"):
if self._is_overridden("_log_result") and log_once("_log_result"):
logger.warning(
"Trainable._log_result is deprecated and will be removed in "
"a future version of Ray. Override "
@@ -909,7 +909,7 @@ class Trainable:
.. versionadded:: 0.8.7
"""
self._stop()
if self._is_overriden("_stop") and log_once("trainable.cleanup"):
if self._is_overridden("_stop") and log_once("trainable.cleanup"):
logger.warning(
"Trainable._stop is deprecated and will be removed in "
"a future version of Ray. Override Trainable.cleanup instead.")
@@ -933,5 +933,5 @@ class Trainable:
"""
return {}
def _is_overriden(self, key):
def _is_overridden(self, key):
return getattr(self, key).__code__ != getattr(Trainable, key).__code__
+2 -2
View File
@@ -43,7 +43,7 @@ def _make_scheduler(args):
def _check_default_resources_override(run_identifier):
if not isinstance(run_identifier, str):
# If obscure dtype, assume it is overriden.
# If obscure dtype, assume it is overridden.
return True
trainable_cls = get_trainable_cls(run_identifier)
return hasattr(trainable_cls, "default_resource_request") and (
@@ -409,7 +409,7 @@ def run(
# "gpu" is manually set.
pass
elif _check_default_resources_override(experiments[0].run_identifier):
# "default_resources" is manually overriden.
# "default_resources" is manually overridden.
pass
else:
logger.warning("Tune detects GPUs, but no trials are using GPUs. "