Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
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
Container registry
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
esde
machine-learning
MLAir
Commits
bb7fa953
Commit
bb7fa953
authored
5 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
error found, removed print statements
parent
f8ded3c6
No related branches found
No related tags found
2 merge requests
!17
update to v0.4.0
,
!16
handle station type
Pipeline
#26606
passed
5 years ago
Stage: test
Stage: pages
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/data_generator.py
+0
-1
0 additions, 1 deletion
src/data_generator.py
test/test_data_generator.py
+1
-5
1 addition, 5 deletions
test/test_data_generator.py
test/test_modules/test_pre_processing.py
+2
-1
2 additions, 1 deletion
test/test_modules/test_pre_processing.py
with
3 additions
and
7 deletions
src/data_generator.py
+
0
−
1
View file @
bb7fa953
...
...
@@ -98,7 +98,6 @@ class DataGenerator(keras.utils.Sequence):
station
=
self
.
get_station_key
(
key
)
data
=
DataPrep
(
self
.
data_path
,
self
.
network
,
station
,
self
.
variables
,
station_type
=
self
.
station_type
,
**
self
.
kwargs
)
print
(
"
data:
"
,
data
)
data
.
interpolate
(
self
.
interpolate_dim
,
method
=
self
.
interpolate_method
,
limit
=
self
.
limit_nan_fill
)
data
.
transform
(
"
datetime
"
,
method
=
self
.
transform_method
)
data
.
make_history_window
(
self
.
interpolate_dim
,
self
.
window_history
)
...
...
This diff is collapsed.
Click to expand it.
test/test_data_generator.py
+
1
−
5
View file @
bb7fa953
...
...
@@ -43,13 +43,9 @@ class TestDataGenerator:
gen
.
stations
=
[
'
station1
'
,
'
station2
'
,
'
station3
'
]
assert
len
(
gen
)
==
3
def
test_getitem
(
self
,
caplog
,
gen
):
caplog
.
set_level
(
logging
.
DEBUG
)
print
(
gen
)
def
test_getitem
(
self
,
gen
):
gen
.
kwargs
=
{
'
statistics_per_var
'
:
{
'
o3
'
:
'
dma8eu
'
,
'
temp
'
:
'
maximum
'
}}
print
(
gen
)
station
=
gen
[
"
DEBW107
"
]
print
(
station
)
assert
len
(
station
)
==
2
assert
station
[
0
].
Stations
.
data
==
"
DEBW107
"
assert
station
[
0
].
data
.
shape
[
1
:]
==
(
8
,
1
,
2
)
...
...
This diff is collapsed.
Click to expand it.
test/test_modules/test_pre_processing.py
+
2
−
1
View file @
bb7fa953
...
...
@@ -43,7 +43,8 @@ class TestPreProcessing:
PreProcessing
()
assert
caplog
.
record_tuples
[
0
]
==
(
'
root
'
,
20
,
'
PreProcessing started
'
)
assert
caplog
.
record_tuples
[
1
]
==
(
'
root
'
,
20
,
'
check valid stations started
'
)
assert
caplog
.
record_tuples
[
-
2
]
==
(
'
root
'
,
20
,
PyTestRegex
(
r
'
run for \d+\.\d+s to check 5 station\(s\)
'
))
assert
caplog
.
record_tuples
[
-
2
]
==
(
'
root
'
,
20
,
PyTestRegex
(
r
'
run for \d+\.\d+s to check 5 station\(s\). Found
'
r
'
5/5 valid stations.
'
))
RunEnvironment
().
__del__
()
def
test_run
(
self
,
obj_with_exp_setup
):
...
...
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