Comments (1)
Upon further investigation I discovered what triggers the error. Below is a simple example of CartPole-v1
where this error shows up. If you add the input argument policies_to_train=["p0"]
to the PPOConfig
it will error out. If you do not add policies_to_train=["p0"]
, it will run.
ppo_config = (
PPOConfig()
.environment(MultiAgentCartPole, env_config={"num_agents": 2})
# Switch both the new API stack flags to True (both False by default).
# This enables the use of:
# a) RLModule (replaces ModelV2) and Learner (replaces Policy)
# b) and automatically picks the correct EnvRunner (single-agent vs multi-agent) and enables ConnectorV2 support.
.api_stack(
enable_rl_module_and_learner=True,
enable_env_runner_and_connector_v2=True,
)
.resources(
num_cpus_for_main_process=16,
)
# supports arbitrary scaling on the learner axis, feel free to set
# `num_learners` to the number of available GPUs for multi-GPU training (and `num_gpus_per_learner=1`).
.learners(
num_learners=0, # <- set this value to the number of GPUs
num_gpus_per_learner=0, # <- set this to 1, if you have a GPU
)
.training(train_batch_size_per_learner=5000)
# Because you are in a multi-agent env, you have to set up the usual multi-agent parameters:
.multi_agent(
policies={"p0", "p1"},
# Map agent 0 to p0 and agent 1 to p1.
policy_mapping_fn=lambda agent_id, episode, **kwargs: f"p{agent_id}",
policies_to_train=["p0"],
)
)
from ray.
Related Issues (20)
- CI test linux://rllib:learning_tests_multi_agent_cartpole_crashing_and_stalling_appo_old_api_stack is flaky
- CI test linux://rllib:learning_tests_multi_agent_cartpole_crashing_and_stalling_appo_old_api_stack is flaky
- Ray component: Core - pypi repo
- Release test long_running_impala.aws failed HOT 1
- CI test linux://rllib:learning_tests_multi_agent_cartpole_crashing_and_stalling_appo_old_api_stack is flaky
- Release test long_running_many_ppo.aws failed HOT 1
- Release test rllib_learning_tests_pong_dreamerv3_tf2.aws failed HOT 1
- Release test long_running_impala.aws failed HOT 1
- Release test dask_on_ray_100gb_sort.aws.py311 failed HOT 1
- Release test dask_on_ray_1tb_sort failed HOT 3
- Release test dask_on_ray_100gb_sort.aws failed HOT 1
- rllib/examples/action_masking.py not working on dreamerV3
- [Logs] Integrate Serve's logger with Core's structured logger
- FAIL serialization: cannot pickle '_jpype._JField' object
- [ADAG] Better handling for RayDAGTaskError
- [Doc] Make Ask AI button light up when a user clicks on the search bar
- [Ray Assistant] [Docs] broken copy button
- Core๏ผ ray job is blocked by scheduling
- Ray multiprocessing.Pool: core_worker_process.cc:278: The core worker has already been shutdown. HOT 1
- [Serve] downscaling_factor logic is broken for no-scaling decisions
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 ray.