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
787e0692
Commit
787e0692
authored
5 years ago
by
spmohanty
Browse files
Options
Downloads
Patches
Plain Diff
Add more error handlers for improper usage of the env_client.step functions
parent
bf6cce10
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/service.py
+8
-2
8 additions, 2 deletions
flatland/evaluators/service.py
with
8 additions
and
2 deletions
flatland/evaluators/service.py
+
8
−
2
View file @
787e0692
...
...
@@ -252,8 +252,13 @@ class FlatlandRemoteEvaluationService:
command_response_channel
=
command
[
'
response_channel
'
]
_payload
=
command
[
'
payload
'
]
if
not
self
.
env
:
raise
Exception
(
"
env_client.step called before env_client.env_create() call
"
)
if
self
.
env
.
dones
[
'
__all__
'
]:
raise
Exception
(
"
Client attempted to perform an action on an Env which has done[
'
__all__
'
]==True
"
)
raise
Exception
(
"
Client attempted to perform an action on an Env which
\
has done[
'
__all__
'
]==True
"
)
action
=
_payload
[
'
action
'
]
_observation
,
all_rewards
,
done
,
info
=
self
.
env
.
step
(
action
)
...
...
@@ -301,7 +306,8 @@ class FlatlandRemoteEvaluationService:
if
len
(
self
.
simulation_rewards
)
!=
len
(
self
.
env_file_paths
):
raise
Exception
(
"""
env.submit called before the agent had the chance to operate on all the test environments.
"""
env.submit called before the agent had the chance
to operate on all the test environments.
"""
)
...
...
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