Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
bob
bob.pad.base
Commits
f1a048c6
There was a problem fetching the pipeline summary.
Commit
f1a048c6
authored
7 years ago
by
Pavel KORSHUNOV
Browse files
Options
Downloads
Patches
Plain Diff
allow missing files scoring
parent
d6e7ca12
No related branches found
No related tags found
1 merge request
!18
Adding allow-missing-files to projection and scoring
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/base/tools/scoring.py
+2
-5
2 additions, 5 deletions
bob/pad/base/tools/scoring.py
with
2 additions
and
5 deletions
bob/pad/base/tools/scoring.py
+
2
−
5
View file @
f1a048c6
...
...
@@ -32,7 +32,8 @@ def _compute_scores(algorithm, toscore_objects, allow_missing_files):
for
i
,
toscore_element
in
enumerate
(
toscore_objects
):
# filter missing files
if
allow_missing_files
and
not
os
.
path
.
exists
(
toscore_element
):
# we keep the NaN score
# we keep NaN score for such elements
scores
.
insert
(
i
,
[
numpy
.
nan
])
continue
# read toscore
toscore
=
algorithm
.
read_toscore_object
(
toscore_element
)
...
...
@@ -106,10 +107,6 @@ def _save_scores(score_file, scores, toscore_objects, write_compressed=False):
id_str
=
(
str
(
toscore_object
.
client_id
)).
zfill
(
3
)
sample_name
=
str
(
toscore_object
.
make_path
())
# we can have empty score list if allow_missing_files was true in _compute_scores()
if
not
scores
[
i
]:
scores
[
i
]
=
[
numpy
.
nan
]
# create a NaN score for such
# scores[i] is a list, so
# each sample is allowed to have multiple scores
for
score
in
scores
[
i
]:
...
...
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