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
9dfef6cd
Commit
9dfef6cd
authored
5 years ago
by
spmohanty
Browse files
Options
Downloads
Patches
Plain Diff
Addresses #123 - Uses relative paths in evaluator service
parent
62badcc3
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
+16
-11
16 additions, 11 deletions
flatland/evaluators/service.py
with
16 additions
and
11 deletions
flatland/evaluators/service.py
+
16
−
11
View file @
9dfef6cd
...
...
@@ -11,6 +11,7 @@ import numpy as np
import
msgpack
import
msgpack_numpy
as
m
import
os
import
glob
import
shutil
import
timeout_decorator
import
time
...
...
@@ -136,16 +137,20 @@ class FlatlandRemoteEvaluationService:
├── .......
├── .......
└── Level_99.pkl
"""
env_paths
=
[]
folder_path
=
self
.
test_env_folder
for
root
,
dirs
,
files
in
os
.
walk
(
folder_path
):
for
file
in
files
:
if
file
.
endswith
(
"
.pkl
"
):
env_paths
.
append
(
os
.
path
.
join
(
root
,
file
)
)
env_paths
=
sorted
(
env_paths
)
"""
env_paths
=
sorted
(
glob
.
glob
(
os
.
path
.
join
(
self
.
test_env_folder
,
"
*/*.pkl
"
)
))
# Remove the root folder name from the individual
# lists, so that we only have the path relative
# to the test root folder
env_paths
=
sorted
([
os
.
path
.
relpath
(
x
,
self
.
test_env_folder
)
for
x
in
env_paths
])
for
_idx
,
env_path
in
enumerate
(
env_paths
):
"""
Here we collect the indices of the environments for which
...
...
@@ -158,7 +163,7 @@ class FlatlandRemoteEvaluationService:
for
vg_env
in
self
.
video_generation_envs
:
if
vg_env
in
env_path
:
self
.
video_generation_indices
.
append
(
_idx
+
1
)
return
sorted
(
env_paths
)
return
env_paths
def
instantiate_redis_connection_pool
(
self
):
"""
...
...
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