Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enstools-compression
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
Package registry
Container 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
w2w
enstools-compression
Commits
d0b2d62a
Commit
d0b2d62a
authored
2 years ago
by
Oriol Tintó
Browse files
Options
Downloads
Patches
Plain Diff
Filtering warnings when retrieving metrics
parent
a13a9ef8
No related branches found
No related tags found
1 merge request
!2
Make it possible to specify analysis options using a dictionary of thresholds...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enstools/compression/analyzer/analyze_data_array.py
+10
-10
10 additions, 10 deletions
enstools/compression/analyzer/analyze_data_array.py
with
10 additions
and
10 deletions
enstools/compression/analyzer/analyze_data_array.py
+
10
−
10
View file @
d0b2d62a
...
...
@@ -64,16 +64,16 @@ def analyze_data_array(data_array: xarray.DataArray, options: AnalysisOptions) -
# Use bisection method to find optimal compression parameter.
parameter
=
bisection_method
(
parameter_range
,
constrain
=
constrain
,
fun
=
function_to_nullify
)
# Compute metrics
# When aiming for a compression ratio some other metrics need to be provided too.
if
COMPRESSION_RATIO_LABEL
not
in
options
.
thresholds
:
metrics
=
get_metric_from_parameter
(
parameter
)
else
:
new_options
=
copy
.
copy
(
options
)
for
m
in
ANALYSIS_DIAGNOSTIC_METRICS
:
new_options
.
thresholds
[
m
]
=
1
get_metric_from_parameter
,
_
,
_
=
define_functions_to_optimize
(
data_array
,
new_options
)
metrics
=
get_metric_from_parameter
(
parameter
)
# Compute metrics
# When aiming for a compression ratio some other metrics need to be provided too.
if
COMPRESSION_RATIO_LABEL
not
in
options
.
thresholds
:
metrics
=
get_metric_from_parameter
(
parameter
)
else
:
new_options
=
copy
.
copy
(
options
)
for
m
in
ANALYSIS_DIAGNOSTIC_METRICS
:
new_options
.
thresholds
[
m
]
=
1
get_metric_from_parameter
,
_
,
_
=
define_functions_to_optimize
(
data_array
,
new_options
)
metrics
=
get_metric_from_parameter
(
parameter
)
# Define compression specification
separator
=
COMPRESSION_SPECIFICATION_SEPARATOR
...
...
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