-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit Torch_PPO_Cleanrl_Atari_Envpool (#243)
* Initial commit Torch_PPO_Cleanrl_Atari_Envpool * Simplify requirements.in * Code now runs * instrumentation concept * Fix CPU scaling --------- Co-authored-by: Pierre Delaunay <[email protected]>
- Loading branch information
1 parent
1b80d4f
commit eed157a
Showing
11 changed files
with
556 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Use global base if possible | ||
ifndef MILABENCH_BASE | ||
MILABENCH_BASE="base" | ||
endif | ||
|
||
export MILABENCH_BASE | ||
|
||
BENCH_NAME=torch_ppo_atari_envpool | ||
MILABENCH_CONFIG=dev.yaml | ||
MILABENCH_ARGS=--config $(MILABENCH_CONFIG) --base $(MILABENCH_BASE) | ||
|
||
all: | ||
install prepare single gpus nodes | ||
|
||
install: | ||
milabench install $(MILABENCH_ARGS) --force | ||
|
||
prepare: | ||
milabench prepare $(MILABENCH_ARGS) | ||
|
||
tests: | ||
MILABENCH_CPU_AUTO=1 CUDA_VISIBLE_DEVICES=0,1 milabench run $(MILABENCH_ARGS) | ||
|
||
single: | ||
MILABENCH_CPU_AUTO=1 milabench run $(MILABENCH_ARGS) --select $(BENCH_NAME) | ||
|
||
gpus: | ||
milabench run $(MILABENCH_ARGS) --select $(BENCH_NAME)-gpus | ||
|
||
nodes: | ||
milabench run $(MILABENCH_ARGS) --select $(BENCH_NAME)-nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# Torch_ppo_atari_envpool | ||
|
||
Rewrite this README to explain what the benchmark is! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from milabench.pack import Package | ||
|
||
|
||
class Torch_ppo_atari_envpool(Package): | ||
# Requirements file installed by install(). It can be empty or absent. | ||
base_requirements = "requirements.in" | ||
|
||
# The preparation script called by prepare(). It must be executable, | ||
# but it can be any type of script. It can be empty or absent. | ||
prepare_script = "prepare.py" | ||
|
||
# The main script called by run(). It must be a Python file. It has to | ||
# be present. | ||
main_script = "main.py" | ||
|
||
# You can remove the functions below if you don't need to modify them. | ||
|
||
def make_env(self): | ||
# Return a dict of environment variables for prepare_script and | ||
# main_script. | ||
return super().make_env() | ||
|
||
async def install(self): | ||
await super().install() # super() call installs the requirements | ||
|
||
async def prepare(self): | ||
await super().prepare() # super() call executes prepare_script | ||
|
||
|
||
|
||
__pack__ = Torch_ppo_atari_envpool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
torch_ppo_atari_envpool: | ||
max_duration: 600 | ||
inherits: _defaults | ||
definition: . | ||
install-variant: unpinned | ||
install_group: torch | ||
plan: | ||
method: per_gpu | ||
|
||
argv: | ||
--num-minibatches: 16 | ||
--update-epochs: 4 | ||
--num-steps: 128 | ||
--num-envs: auto({cpu_per_gpu}, 128) | ||
--total-timesteps: 1000000 | ||
--env-id: Breakout-v5 |
Oops, something went wrong.