Comments (3)
In [252]: checkpoint = trainer.save()
...: print(checkpoint)
...:
...: evaluation = trainer.evaluate(checkpoint)
...: print(pretty_print(evaluation))
...:
...: restored_trainer = DQNTrainer(env=GymEnvironment)
...: restored_trainer.restore(checkpoint)
/root/ray_results/DQN_GymEnvironment_2022-10-25_10-50-33_uvb3xkn/checkpoint_000010
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Input In [252], in <cell line: 4>()
1 checkpoint = trainer.save()
2 print(checkpoint)
----> 4 evaluation = trainer.evaluate(checkpoint)
5 print(pretty_print(evaluation))
7 restored_trainer = DQNTrainer(env=GymEnvironment)
File ~/.cache/pypoetry/virtualenvs/ray-KeD1w6JO-py3.9/lib/python3.9/site-packages/ray/rllib/algorithms/algorithm.py:775, in Algorithm.evaluate(self, duration_fn)
770 else:
771 if (
772 self.evaluation_workers is None
773 and self.workers.local_worker().input_reader is None
774 ):
--> 775 raise ValueError(
776 "Cannot evaluate w/o an evaluation worker set in "
777 "the Trainer or w/o an env on the local worker!\n"
778 "Try one of the following:\n1) Set "
779 "`evaluation_interval` >= 0 to force creating a "
780 "separate evaluation worker set.\n2) Set "
781 "`create_env_on_driver=True` to force the local "
782 "(non-eval) worker to have an environment to "
783 "evaluate on."
784 )
786 # How many episodes/timesteps do we need to run?
787 # In "auto" mode (only for parallel eval + training): Run as long
788 # as training lasts.
789 unit = self.config["evaluation_duration_unit"]
Input In [252], in <cell line: 4>()
1 checkpoint = trainer.save()
2 print(checkpoint)
----> 4 evaluation = trainer.evaluate(checkpoint)
5 print(pretty_print(evaluation))
7 restored_trainer = DQNTrainer(env=GymEnvironment)
File ~/.cache/pypoetry/virtualenvs/ray-KeD1w6JO-py3.9/lib/python3.9/site-packages/ray/rllib/algorithms/algorithm.py:775, in Algorithm.evaluate(self, duration_fn)
770 else:
771 if (
772 self.evaluation_workers is None
773 and self.workers.local_worker().input_reader is None
774 ):
--> 775 raise ValueError(
776 "Cannot evaluate w/o an evaluation worker set in "
777 "the Trainer or w/o an env on the local worker!\n"
778 "Try one of the following:\n1) Set "
779 "`evaluation_interval` >= 0 to force creating a "
780 "separate evaluation worker set.\n2) Set "
781 "`create_env_on_driver=True` to force the local "
782 "(non-eval) worker to have an environment to "
783 "evaluate on."
784 )
786 # How many episodes/timesteps do we need to run?
787 # In "auto" mode (only for parallel eval + training): Run as long
788 # as training lasts.
789 unit = self.config["evaluation_duration_unit"]
ValueError: Cannot evaluate w/o an evaluation worker set in the Trainer or w/o an env on the local worker!
Try one of the following:
1) Set `evaluation_interval` >= 0 to force creating a separate evaluation worker set.
2) Set `create_env_on_driver=True` to force the local (non-eval) worker to have an environment to evaluate on.
from learning_ray.
I think we've fixed this now, thanks for the issue!
from learning_ray.
(the API call in this example was wrong in any case... you just evaluate, no need to specify a checkpoint)
from learning_ray.
Related Issues (11)
- Pendulumv0 vs Pendulum-v0 HOT 6
- RLlib: env must be one of following supported types issue HOT 2
- Will this repo keep update?
- Not use the updated policy
- A question about "building a distributed Ray Training" section in Chapter 3 HOT 3
- Exception Errors in Chapter 4: Could be newbie error as well HOT 3
- pygame is required for pendulum demo in chap01 HOT 3
- Example 4-11.AttributeError: 'dict' object has no attribute 'set_training' HOT 2
- Example 6-2. not imported HOT 1
- May I translate your book to chinese version? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learning_ray.