Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flatland
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
Model registry
Operate
Environments
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
sfwatergit
Flatland
Commits
eb5bcdde
Commit
eb5bcdde
authored
5 years ago
by
spmohanty
Browse files
Options
Downloads
Patches
Plain Diff
Addresses #117 - Refactor env_step in the client
parent
4ccccc1e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
flatland/evaluators/client.py
+6
-6
6 additions, 6 deletions
flatland/evaluators/client.py
with
6 additions
and
6 deletions
flatland/evaluators/client.py
+
6
−
6
View file @
eb5bcdde
...
...
@@ -187,23 +187,23 @@ class FlatlandRemoteClient(object):
_payload
=
_response
[
'
payload
'
]
# remote_observation = _payload['observation']
reward
=
_payload
[
'
reward
'
]
done
=
_payload
[
'
done
'
]
info
=
_payload
[
'
info
'
]
remote_
reward
=
_payload
[
'
reward
'
]
remote_
done
=
_payload
[
'
done
'
]
remote_
info
=
_payload
[
'
info
'
]
# Replicate the action in the local env
local_observation
,
local_rewards
,
local_done
,
local_info
=
\
self
.
env
.
step
(
action
)
assert
are_dicts_equal
(
reward
,
local_rewards
)
assert
are_dicts_equal
(
done
,
local_done
)
assert
are_dicts_equal
(
remote_
reward
,
local_rewards
)
assert
are_dicts_equal
(
remote_
done
,
local_done
)
# Return local_observation instead of remote_observation
# as the remote_observation is build using a dummy observation
# builder
# We return the remote rewards and done as they are the
# once used by the evaluator
return
[
local_observation
,
re
ward
,
done
,
info
]
return
[
local_observation
,
re
mote_reward
,
remote_done
,
remote_
info
]
def
submit
(
self
):
_request
=
{}
...
...
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