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
c1a938b1
Commit
c1a938b1
authored
5 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
test update
parent
7487ae48
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!125
Release v0.10.0
,
!124
Update Master to new version v0.10.0
,
!91
WIP: Resolve "create sphinx docu"
Pipeline
#35122
failed
5 years ago
Stage: test
Stage: docs
Stage: pages
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/test_configuration/test_path_config.py
+6
-5
6 additions, 5 deletions
test/test_configuration/test_path_config.py
test/test_modules/test_experiment_setup.py
+2
-2
2 additions, 2 deletions
test/test_modules/test_experiment_setup.py
with
8 additions
and
7 deletions
test/test_configuration/test_path_config.py
+
6
−
5
View file @
c1a938b1
...
...
@@ -75,12 +75,12 @@ class TestSetExperimentName:
exp_name
,
exp_path
=
set_experiment_name
()
assert
exp_name
==
"
TestExperiment
"
assert
exp_path
==
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
..
"
,
"
..
"
,
"
TestExperiment
"
))
exp_name
,
exp_path
=
set_experiment_name
(
experiment_
dat
e
=
"
2019-11-14
"
,
experiment_path
=
"
./test2
"
)
exp_name
,
exp_path
=
set_experiment_name
(
experiment_
nam
e
=
"
2019-11-14
"
,
experiment_path
=
"
./test2
"
)
assert
exp_name
==
"
2019-11-14_network
"
assert
exp_path
==
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
..
"
,
"
..
"
,
"
test2
"
,
exp_name
))
def
test_set_experiment_from_sys
(
self
):
exp_name
,
_
=
set_experiment_name
(
experiment_
dat
e
=
"
2019-11-14
"
)
exp_name
,
_
=
set_experiment_name
(
experiment_
nam
e
=
"
2019-11-14
"
)
assert
exp_name
==
"
2019-11-14_network
"
def
test_set_experiment_hourly
(
self
):
...
...
@@ -91,14 +91,15 @@ class TestSetExperimentName:
class
TestSetBootstrapPath
:
def
test_bootstrap_path_is_none
(
self
):
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
def
test_bootstrap_path_is_none
(
self
,
mock_makedir
):
bootstrap_path
=
set_bootstrap_path
(
None
,
'
TestDataPath/
'
,
'
daily
'
)
assert
bootstrap_path
==
'
TestDataPath/../bootstrap_daily
'
assert
bootstrap_path
==
os
.
path
.
abspath
(
'
TestDataPath/../bootstrap_daily
'
)
@mock.patch
(
"
os.makedirs
"
,
side_effect
=
None
)
def
test_bootstap_path_is_given
(
self
,
mock_makedir
):
bootstrap_path
=
set_bootstrap_path
(
'
Test/path/to/boots
'
,
None
,
None
)
assert
bootstrap_path
==
'
Test/path/to/boots
'
assert
bootstrap_path
==
os
.
path
.
abspath
(
'
./
Test/path/to/boots
'
)
class
TestCheckPath
:
...
...
This diff is collapsed.
Click to expand it.
test/test_modules/test_experiment_setup.py
+
2
−
2
View file @
c1a938b1
...
...
@@ -52,7 +52,7 @@ class TestExperimentSetup:
assert
data_store
.
get
(
"
create_new_model
"
,
"
general
"
)
is
True
assert
data_store
.
get
(
"
fraction_of_training
"
,
"
general
"
)
==
0.8
# set experiment name
assert
data_store
.
get
(
"
experiment_name
"
,
"
general
"
)
==
"
TestExperiment
"
assert
data_store
.
get
(
"
experiment_name
"
,
"
general
"
)
==
"
TestExperiment
_daily
"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
..
"
,
"
..
"
,
"
TestExperiment
"
))
assert
data_store
.
get
(
"
experiment_path
"
,
"
general
"
)
==
path
default_statistics_per_var
=
{
'
o3
'
:
'
dma8eu
'
,
'
relhum
'
:
'
average_values
'
,
'
temp
'
:
'
maximum
'
,
...
...
@@ -121,7 +121,7 @@ class TestExperimentSetup:
assert
data_store
.
get
(
"
create_new_model
"
,
"
general
"
)
is
True
assert
data_store
.
get
(
"
fraction_of_training
"
,
"
general
"
)
==
0.5
# set experiment name
assert
data_store
.
get
(
"
experiment_name
"
,
"
general
"
)
==
"
TODAY_network
"
assert
data_store
.
get
(
"
experiment_name
"
,
"
general
"
)
==
"
TODAY_network
_daily
"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
..
"
,
"
data
"
,
"
testExperimentFolder
"
,
"
TODAY_network
"
))
assert
data_store
.
get
(
"
experiment_path
"
,
"
general
"
)
==
path
...
...
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