mirror of
https://github.com/vale981/ray
synced 2025-03-07 02:51:39 -05:00
[Ray SGD] TorchTrainable pre 0.8.7 deprecation warning (#10984)
* torch trainable add pre 0.8.7 backwards compat * raise instead * Update python/ray/util/sgd/torch/torch_trainer.py
This commit is contained in:
parent
4c3f09094a
commit
52e1495e30
1 changed files with 6 additions and 0 deletions
|
@ -670,6 +670,12 @@ class BaseTorchTrainable(Trainable):
|
|||
|
||||
You may want to override this if using a custom LR scheduler.
|
||||
"""
|
||||
if self._is_overriden("_train"):
|
||||
raise DeprecationWarning(
|
||||
"Trainable._train is deprecated and will be "
|
||||
"removed in "
|
||||
"a future version of Ray. Override Trainable.step instead.")
|
||||
|
||||
train_stats = self.trainer.train(max_retries=10, profile=True)
|
||||
validation_stats = self.trainer.validate(profile=True)
|
||||
stats = merge_dicts(train_stats, validation_stats)
|
||||
|
|
Loading…
Add table
Reference in a new issue