Comments (4)
pasted from #385
If i have 20 CPUS, 10 envs, 5 sessions, then it will starup 50 process with 20 CPUS, i consider it is not reasonable, am i right ? how can i fullly and reasonable use my CPU resource?
from slm-lab.
resource allocation with the search module works like so:
ray
detects how many CPUs you have, say 20 in total. This is the compute budget.- resource setting u saw in
search.py
is per trial. If a trial has 3 sessions, it assigns 3 CPUs. So, it can assign 6 trials to utilize 18 CPUs within its budget.
All these assume that environments are very light on CPUs and RAM (memory). If your environment is requires more resources, you can limit the number of trials ran in parallel by changing the line with a multiplier to allocate more per trial:
# either scale by ur num envs if it dominates the resources
multiplier = ps.get(spec, 'env.0.num_envs') * 0.2
# or simply set a convenient number for your use case
multiplier = 4
num_cpus = min(util.NUM_CPUS, meta_spec['max_session'] * multiplier)
Then, a trial with 3 sessions will use 12 CPUs, and so only 1 trial gets ran at a time. This will allocate the budget more reasonably for your use case
from slm-lab.
I advise u to expose "multiplier" to out , so that we can more reasonably use more envs that not light.
from slm-lab.
good suggestion. will do so hopefully sometime this weekend
from slm-lab.
Related Issues (20)
- RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED on Pong HOT 1
- Cannot open shared object file: No such file or directory when running demo HOT 2
- Book branch problem, need your help HOT 2
- Installation on MacOs 11.6.1 fails HOT 2
- IndexError: list index out of range
- ModuleNotFoundError: No module named 'cv2' HOT 4
- subprocess.CalledProcessError: Command '['git', 'rev-parse', 'HEAD']' returned non-zero exit status 128. HOT 4
- How to add a non-gym envrinment? HOT 6
- I have encounter one problem, maybe a bug. HOT 1
- How to run the code on multiple GPUs? HOT 1
- how to improve the convergence performance of training loss?
- python setup.py test
- `optimizer.step()` before `lr_scheduler.step()` Warning Occurred
- Docker build fails on environment.yml installation HOT 1
- How to add a custom gym environment in json spec file.
- Exception: pyglet 2.0.0 requires Python 3.8 or newer HOT 1
- Docker build failed HOT 2
- Compatibility to M1 Mac HOT 1
- Ubuntu 20.04 no longer works
- Installation dependencies issue with more-itertools and pyglet and how to solve it 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 slm-lab.