From 6d114c66ee57fec610b539d3a2e5d146b99dfaa0 Mon Sep 17 00:00:00 2001 From: Siddharth Bhatia Date: Thu, 24 Jun 2021 16:05:09 +0530 Subject: [PATCH] remove constants NUM_RESETS, STEPS_PER_EPISODE, NUM_ENVS --- benchmark/benchmark_utils.jl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/benchmark/benchmark_utils.jl b/benchmark/benchmark_utils.jl index 5b03da2..8e21b2d 100644 --- a/benchmark/benchmark_utils.jl +++ b/benchmark/benchmark_utils.jl @@ -5,10 +5,6 @@ import GridWorlds as GW import ReinforcementLearningBase as RLBase import Statistics -const STEPS_PER_RESET = 100 -const NUM_RESETS = 100 -const NUM_ENVS = 64 - ENVS = [GW.ModuleSingleRoomUndirected.SingleRoomUndirected] BATCH_ENVS = [GW.ModuleSingleRoomUndirectedBatch.SingleRoomUndirectedBatch] @@ -95,7 +91,7 @@ function benchmark_batch_env(Env, num_resets, steps_per_reset, num_envs) for action in RLBase.action_space(env) action_name = parent_module.ACTION_NAMES[action] - batch_action = fill(action, NUM_ENVS) + batch_action = fill(action, num_envs) benchmark[action_name] = BT.@benchmark $(Ref(env))[]($(Ref(batch_action))[]) end