Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
neurips-2021-the-nethack-challenge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nethack
neurips-2021-the-nethack-challenge
Commits
26267fce
Commit
26267fce
authored
3 years ago
by
Eric Hambro
Browse files
Options
Downloads
Patches
Plain Diff
Remove unnecessary functions from Batched Agent.
parent
55fb08f9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
agents/batched_agent.py
+3
-14
3 additions, 14 deletions
agents/batched_agent.py
local_evaluation.py
+1
-0
1 addition, 0 deletions
local_evaluation.py
with
4 additions
and
14 deletions
agents/batched_agent.py
+
3
−
14
View file @
26267fce
...
...
@@ -11,20 +11,9 @@ class BatchedAgent:
self
.
num_envs
=
num_envs
self
.
num_actions
=
num_actions
def
preprocess_observations
(
self
,
observations
,
rewards
,
dones
,
infos
):
def
batched_step
(
self
,
observations
,
rewards
,
dones
,
infos
):
"""
Add any preprocessing steps, for example rerodering/stacking for torch/tf in your model
Take list of outputs of each environments and return a list of actions
"""
pass
raise
NotImplementedError
def
preprocess_actions
(
self
,
actions
):
"""
Add any postprocessing steps, for example converting to lists
"""
pass
def
batched_step
(
self
):
"""
Return a list of actions
"""
pass
This diff is collapsed.
Click to expand it.
local_evaluation.py
+
1
−
0
View file @
26267fce
...
...
@@ -32,6 +32,7 @@ def evaluate():
agent
=
Agent
(
num_envs
,
num_actions
)
run_batched_rollout
(
batched_env
,
agent
)
if
__name__
==
'
__main__
'
:
evaluate
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment