Skip to content

Commit

Permalink
remove constants NUM_RESETS, STEPS_PER_EPISODE, NUM_ENVS
Browse files Browse the repository at this point in the history
  • Loading branch information
Sid-Bhatia-0 committed Jun 24, 2021
1 parent e2f313f commit 6d114c6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions benchmark/benchmark_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 6d114c6

Please sign in to comment.