Comments (2)
Hello,
Thank you for your diligent efforts in eliminating warnings within your local environment. In respect to the issue of low GPU utilization and occasional spikes encountered while running cartpole_sampled_efficientzero.py
, potential reasons are as follows.
Within LightZero, the MCTS+RL (Monte Carlo Tree Search + Reinforcement Learning) algorithm predominantly encompasses three stages: collect
, train
, and eval
:
-
During the
collect
andeval
stages, the sampled_efficientzero algorithm is utilized where the network inference is conducted mainly at the leaf nodes of the MCTS. This operation is executed on the GPU, while the MCTS search itself is primarily conducted on the CPU. Consequently, throughout the search process, GPU utilization may remain relatively low. Spikes are likely to manifest during the inference at the leaf nodes. -
Throughout the
train
stage, data is sampled from the replay buffer, model inference is executed, the corresponding loss is calculated, and subsequently, backpropagation is performed to update the model. During this stage, GPU utilization is anticipated to be higher. Nevertheless, as the model applied in RL algorithms and the batch size for training are not exceptionally large, the GPU utilization might not reach its maximum capacity of 100%.
In pursuit of enhancing the efficiency of MCTS search and improving GPU utilization, we will delve further into these areas in our forthcoming research. We deeply appreciate your valuable suggestions.
Best Wishes.
from lightzero.
i remove warnings but issu still there , GPU is used + take some gpu ram but still processor just spikes and
warning removed by :
pip3 install numba
pip3 install numpy==1.23.0
on cartpole_lightzero_env.py
line:32 replace self._env = gym.make('CartPole-v1') by self._env = gym.make('CartPole-v1', new_step_api=True)
line:45 Comment # self._env.seed(self._seed + np_seed)
line:49 and # self._env.seed(self._seed)
line:48 replace obs = self._env.reset() by obs = self._env.reset(seed=self._seed)
line:74 replace obs, rew, done, info = self._env.step(action) by obs, rew, done, _ , info = self._env.step(action)
this remove all my warning , but still GPU not go full perfermence only some gpu ram and sometimes spike on gpu processor
Please help me to solve this
from lightzero.
Related Issues (20)
- CUDA_ERROR_NOT_INITIALIZED when trying to use a GPU accelerated environment
- Pip install failing on linux HOT 1
- No module named 'lzero.worker.gumbel_muzero_collector' HOT 1
- gumbel_muzero error HOT 1
- Installation fails on MacBook M1 Pro HOT 6
- alphazero MCTS not working: cannot import mcts_alphazero HOT 4
- Confusion between "battle_mode" and "mcts_mode" HOT 2
- AttributeError: 'EasyDict' object has no attribute 'replay_path_gif' HOT 2
- Is there a missing .gitmodules file? HOT 2
- A typo in the comment of _ucb_score HOT 2
- [action_mask error] HOT 6
- Sampled MuZero and Sampled EfficientZero HOT 3
- Default lunar lander settings result in RuntimeError during model evaluation HOT 2
- Bipedal continuous discretized sampled efficientzero config error HOT 2
- Tensors on different devices when using GPU (SampledEfficientZeroPolicy) HOT 2
- gomoku muzero self play train problem HOT 1
- `SampledEfficientZeroModel` does not pass `lstm_hidden_size` through `DynamicsNetwork` HOT 2
- Potentially mishandled continuous action space shape HOT 4
- Question about gumbel_scale and dirichlet noise in Gumbel MuZero HOT 1
- Does `downsample = True` lead to masking input data? HOT 1
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 lightzero.