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
pranjal_dhole
Flatland
Commits
c992339f
Commit
c992339f
authored
4 years ago
by
hagrid67
Browse files
Options
Downloads
Patches
Plain Diff
add jupyter-contrib-nbextensions to req for CI; removed debugpy import and statements from rail_env
parent
573e7bc9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flatland/envs/rail_env.py
+6
-8
6 additions, 8 deletions
flatland/envs/rail_env.py
requirements_continuous_integration.txt
+1
-0
1 addition, 0 deletions
requirements_continuous_integration.txt
with
7 additions
and
8 deletions
flatland/envs/rail_env.py
+
6
−
8
View file @
c992339f
...
...
@@ -36,7 +36,7 @@ from flatland.envs import agent_chains as ac
from
flatland.envs.observations
import
GlobalObsForRailEnv
import
debugpy
#
import debugpy
import
pickle
...
...
@@ -844,7 +844,7 @@ class RailEnv(Environment):
trans_block
=
sbTrans
[
agent
.
direction
*
4
:
agent
.
direction
*
4
+
4
]
if
(
trans_block
==
"
0000
"
):
print
(
i_agent
,
agent
.
position
,
agent
.
direction
,
sbTrans
,
trans_block
)
debugpy
.
breakpoint
()
#
debugpy.breakpoint()
# if agent cannot enter env, then we should have move=False
...
...
@@ -861,22 +861,20 @@ class RailEnv(Environment):
if
not
all
([
transition_valid
,
new_cell_valid
]):
print
(
f
"
ERRROR: step_agent2 invalid transition ag
{
i_agent
}
dir
{
new_direction
}
pos
{
agent
.
position
}
next
{
rc_next
}
"
)
debugpy
.
breakpoint
()
#
debugpy.breakpoint()
if
new_position
!=
rc_next
:
print
(
f
"
ERROR: agent
{
i_agent
}
new_pos
{
new_position
}
!= rc_next
{
rc_next
}
"
+
f
"
pos
{
agent
.
position
}
dir
{
agent
.
direction
}
new_dir
{
new_direction
}
"
+
f
"
stored action:
{
agent
.
speed_data
[
'
transition_action_on_cellexit
'
]
}
"
)
debugpy
.
breakpoint
()
#
debugpy.breakpoint()
sbTrans
=
format
(
self
.
rail
.
grid
[
agent
.
position
],
"
016b
"
)
trans_block
=
sbTrans
[
agent
.
direction
*
4
:
agent
.
direction
*
4
+
4
]
if
(
trans_block
==
"
0000
"
):
print
(
i_agent
,
agent
.
position
,
agent
.
direction
,
sbTrans
,
trans_block
)
debugpy
.
breakpoint
()
print
(
"
ERROR:
"
,
i_agent
,
agent
.
position
,
agent
.
direction
,
sbTrans
,
trans_block
)
# debugpy.breakpoint()
agent
.
position
=
rc_next
agent
.
direction
=
new_direction
...
...
This diff is collapsed.
Click to expand it.
requirements_continuous_integration.txt
+
1
−
0
View file @
c992339f
...
...
@@ -15,6 +15,7 @@ twine>=1.12.1
pydeps>=1.7.2
jupyter>=1.0.0
jupyter-core>=4.5.0
jupyter-contrib-nbextensions
notebook>=5.7.8
PyVirtualDisplay==0.2.5
pytest-xvfb>=1.2.0
...
...
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