Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aeri_quality_control
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
aeri
aeri_quality_control
Commits
1d2c9378
Commit
1d2c9378
authored
8 years ago
by
Coda Phillips
Browse files
Options
Downloads
Patches
Plain Diff
Handle the case where all records get marked
parent
73ab2554
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
util.py
+8
-3
8 additions, 3 deletions
util.py
with
8 additions
and
3 deletions
util.py
+
8
−
3
View file @
1d2c9378
...
@@ -36,8 +36,9 @@ def update_variable_qc(frame, variable_qcs):
...
@@ -36,8 +36,9 @@ def update_variable_qc(frame, variable_qcs):
return
frame
.
drop
(
'
qc_notes
'
,
axis
=
1
).
combine
(
variable_qcs
,
proba_update
,
fill_value
=
0
).
combine_first
(
frame
[[
'
qc_notes
'
]])
return
frame
.
drop
(
'
qc_notes
'
,
axis
=
1
).
combine
(
variable_qcs
,
proba_update
,
fill_value
=
0
).
combine_first
(
frame
[[
'
qc_notes
'
]])
def
annotate_all
(
frame
,
mask
,
annotation
):
def
annotate_all
(
frame
,
mask
,
annotation
):
for
loc
in
frame
.
index
[
mask
]:
if
len
(
mask
)
>
0
:
annotate
(
frame
,
loc
,
annotation
)
for
loc
in
frame
.
index
[
mask
]:
annotate
(
frame
,
loc
,
annotation
)
def
invalidate_records
(
frame
,
check_name
):
def
invalidate_records
(
frame
,
check_name
):
for
index
,
percent
in
frame
.
ix
[
frame
[
check_name
]
>
0
,
check_name
].
iteritems
():
for
index
,
percent
in
frame
.
ix
[
frame
[
check_name
]
>
0
,
check_name
].
iteritems
():
...
@@ -122,6 +123,10 @@ class BaseCheckList:
...
@@ -122,6 +123,10 @@ class BaseCheckList:
filtered_frame
=
frame
.
ix
[
frame
.
qc_percent
<
1
].
copy
()
filtered_frame
=
frame
.
ix
[
frame
.
qc_percent
<
1
].
copy
()
for
check
,
metadata
in
self
.
checks
.
items
():
for
check
,
metadata
in
self
.
checks
.
items
():
original_shape
=
filtered_frame
.
shape
original_shape
=
filtered_frame
.
shape
filtered_frame
=
check
(
filtered_frame
,
self
.
parameters
)
if
len
(
filtered_frame
)
>
0
:
filtered_frame
=
check
(
filtered_frame
,
self
.
parameters
)
else
:
for
v
in
metadata
[
'
updates
'
]:
filtered_frame
[
v
]
=
[]
assert
np
.
in1d
(
list
(
metadata
[
'
updates
'
]),
filtered_frame
.
columns
).
all
()
assert
np
.
in1d
(
list
(
metadata
[
'
updates
'
]),
filtered_frame
.
columns
).
all
()
return
self
.
update_qc_percent
(
filtered_frame
.
combine_first
(
frame
))
return
self
.
update_qc_percent
(
filtered_frame
.
combine_first
(
frame
))
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