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
45114e24
Commit
45114e24
authored
4 years ago
by
MasterScrat
Browse files
Options
Downloads
Patches
Plain Diff
Cleaner logs
parent
c8d6c21e
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
+9
-8
9 additions, 8 deletions
flatland/evaluators/service.py
with
9 additions
and
8 deletions
flatland/evaluators/service.py
+
9
−
8
View file @
45114e24
...
@@ -636,7 +636,6 @@ class FlatlandRemoteEvaluationService:
...
@@ -636,7 +636,6 @@ class FlatlandRemoteEvaluationService:
if
self
.
simulation_count
==
0
:
if
self
.
simulation_count
==
0
:
# Very first episode: start the overall timer
# Very first episode: start the overall timer
print
(
"
Starting overall timer...
"
)
self
.
overall_start_time
=
time
.
time
()
self
.
overall_start_time
=
time
.
time
()
# reset the timeout flag / state.
# reset the timeout flag / state.
...
@@ -668,6 +667,7 @@ class FlatlandRemoteEvaluationService:
...
@@ -668,6 +667,7 @@ class FlatlandRemoteEvaluationService:
There are still test envs left that are yet to be evaluated
There are still test envs left that are yet to be evaluated
"""
"""
print
(
"
=
"
*
15
)
print
(
"
Evaluating {} ({}/{})
"
.
format
(
test_env_file_path
,
self
.
simulation_count
,
len
(
self
.
env_file_paths
)))
print
(
"
Evaluating {} ({}/{})
"
.
format
(
test_env_file_path
,
self
.
simulation_count
,
len
(
self
.
env_file_paths
)))
test_env_file_path
=
os
.
path
.
join
(
test_env_file_path
=
os
.
path
.
join
(
...
@@ -679,12 +679,14 @@ class FlatlandRemoteEvaluationService:
...
@@ -679,12 +679,14 @@ class FlatlandRemoteEvaluationService:
self
.
current_level
=
env_level
self
.
current_level
=
env_level
del
self
.
env
del
self
.
env
self
.
env
=
RailEnv
(
width
=
1
,
height
=
1
,
self
.
env
=
RailEnv
(
rail_generator
=
rail_from_file
(
test_env_file_path
),
width
=
1
,
height
=
1
,
schedule_generator
=
schedule_from_file
(
test_env_file_path
),
rail_generator
=
rail_from_file
(
test_env_file_path
),
malfunction_generator_and_process_data
=
malfunction_from_file
(
test_env_file_path
),
schedule_generator
=
schedule_from_file
(
test_env_file_path
),
obs_builder_object
=
DummyObservationBuilder
(),
malfunction_generator_and_process_data
=
malfunction_from_file
(
test_env_file_path
),
record_steps
=
True
)
obs_builder_object
=
DummyObservationBuilder
(),
record_steps
=
True
)
self
.
begin_simulation
=
time
.
time
()
self
.
begin_simulation
=
time
.
time
()
...
@@ -864,7 +866,6 @@ class FlatlandRemoteEvaluationService:
...
@@ -864,7 +866,6 @@ class FlatlandRemoteEvaluationService:
self
.
simulation_percentage_complete_per_test
[
self
.
current_test
]
=
[]
self
.
simulation_percentage_complete_per_test
[
self
.
current_test
]
=
[]
self
.
simulation_percentage_complete_per_test
[
self
.
current_test
].
append
(
percentage_complete
)
self
.
simulation_percentage_complete_per_test
[
self
.
current_test
].
append
(
percentage_complete
)
print
(
"
Percentage for test {}, level {}: {}
"
.
format
(
self
.
current_test
,
self
.
current_level
,
percentage_complete
))
print
(
"
Percentage for test {}, level {}: {}
"
.
format
(
self
.
current_test
,
self
.
current_level
,
percentage_complete
))
print
(
self
.
simulation_percentage_complete_per_test
[
self
.
current_test
])
print
(
print
(
"
Evaluation finished in {} timesteps, {:.3f} seconds. Percentage agents done: {:.3f}. Normalized reward: {:.3f}. Number of malfunctions: {}.
"
.
format
(
"
Evaluation finished in {} timesteps, {:.3f} seconds. Percentage agents done: {:.3f}. Normalized reward: {:.3f}. Number of malfunctions: {}.
"
.
format
(
...
...
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