Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mednet
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
medai
software
mednet
Commits
15b88354
Commit
15b88354
authored
8 months ago
by
Daniel CARRON
Committed by
André Anjos
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[tests] Fix paths
parent
906c0a36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!46
Create common library
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/classification/test_cli.py
+13
-14
13 additions, 14 deletions
tests/classification/test_cli.py
tests/segmentation/test_cli.py
+7
-7
7 additions, 7 deletions
tests/segmentation/test_cli.py
with
20 additions
and
21 deletions
tests/classification/test_cli.py
+
13
−
14
View file @
15b88354
...
...
@@ -195,7 +195,7 @@ def test_train_pasa_montgomery(temporary_basedir):
runner
=
CliRunner
()
with
stdout_logging
()
as
buf
:
output_folder
=
temporary_basedir
/
"
results
"
output_folder
=
temporary_basedir
/
"
classification
"
/
"
results
"
result
=
runner
.
invoke
(
train
,
[
...
...
@@ -250,7 +250,7 @@ def test_train_pasa_montgomery_from_checkpoint(temporary_basedir):
runner
=
CliRunner
()
output_folder
=
temporary_basedir
/
"
results
"
/
"
pasa_checkpoint
"
output_folder
=
temporary_basedir
/
"
classification
"
/
"
results
"
/
"
pasa_checkpoint
"
result0
=
runner
.
invoke
(
train
,
[
...
...
@@ -329,9 +329,9 @@ def test_predict_pasa_montgomery(temporary_basedir, datadir):
runner
=
CliRunner
()
with
stdout_logging
()
as
buf
:
output
=
temporary_basedir
/
"
predictions
"
output
=
temporary_basedir
/
"
classification
"
/
"
predictions
"
last
=
_get_checkpoint_from_alias
(
temporary_basedir
/
"
results
"
,
temporary_basedir
/
"
classification
"
/
"
results
"
,
"
periodic
"
,
)
assert
last
.
name
.
endswith
(
"
epoch=0
"
+
CHECKPOINT_EXTENSION
)
...
...
@@ -379,27 +379,26 @@ def test_evaluate_pasa_montgomery(temporary_basedir):
runner
=
CliRunner
()
with
stdout_logging
()
as
buf
:
prediction_path
=
temporary_basedir
/
"
predictions
"
prediction_path
=
temporary_basedir
/
"
classification
"
/
"
predictions
"
predictions_file
=
prediction_path
/
"
predictions.json
"
evaluation_
filename
=
"
evaluation
.json
"
evaluation_file
=
temporary_basedir
/
evaluation_filename
evaluation_
path
=
temporary_basedir
/
"
classification
"
/
"
evaluation
s
"
result
=
runner
.
invoke
(
evaluate
,
[
"
-vv
"
,
"
montgomery
"
,
f
"
--predictions=
{
predictions_file
}
"
,
f
"
--output-folder=
{
temporary_basedir
}
"
,
f
"
--output-folder=
{
evaluation_path
}
"
,
"
--threshold=test
"
,
],
)
_assert_exit_0
(
result
)
assert
evaluation_file
.
exists
()
assert
evaluation_file
.
with_suffix
(
"
.meta.json
"
).
exists
()
assert
evaluation_file
.
with_suffix
(
"
.rst
"
).
exists
()
assert
evaluation_file
.
with_suffix
(
"
.pdf
"
).
exists
()
assert
(
evaluation_path
/
"
evaluation.json
"
).
exists
()
assert
(
evaluation_path
/
"
evaluation.meta.json
"
).
exists
()
assert
(
evaluation_path
/
"
evaluation.pdf
"
).
exists
()
assert
(
evaluation_path
/
"
evaluation.rst
"
).
exists
()
keywords
=
{
r
"
^Setting --threshold=.*$
"
:
1
,
r
"
^Analyzing split `train`...$
"
:
1
,
...
...
@@ -426,7 +425,7 @@ def test_experiment(temporary_basedir):
runner
=
CliRunner
()
output_folder
=
temporary_basedir
/
"
experiment
"
output_folder
=
temporary_basedir
/
"
classification
"
/
"
experiment
"
num_epochs
=
2
result
=
runner
.
invoke
(
experiment
,
...
...
This diff is collapsed.
Click to expand it.
tests/segmentation/test_cli.py
+
7
−
7
View file @
15b88354
...
...
@@ -163,7 +163,7 @@ def test_train_lwnet_drive(temporary_basedir):
runner
=
CliRunner
()
with
stdout_logging
()
as
buf
:
output_folder
=
temporary_basedir
/
"
results
"
output_folder
=
temporary_basedir
/
"
segmentation
"
/
"
results
"
result
=
runner
.
invoke
(
train
,
[
...
...
@@ -215,7 +215,7 @@ def test_train_lwnet_drive_from_checkpoint(temporary_basedir):
runner
=
CliRunner
()
output_folder
=
temporary_basedir
/
"
results
"
/
"
lwnet_checkpoint
"
output_folder
=
temporary_basedir
/
"
segmentation
"
/
"
results
"
/
"
lwnet_checkpoint
"
result0
=
runner
.
invoke
(
train
,
[
...
...
@@ -291,9 +291,9 @@ def test_predict_lwnet_drive(temporary_basedir, datadir):
runner
=
CliRunner
()
with
stdout_logging
()
as
buf
:
output
=
temporary_basedir
/
"
predictions
"
output
=
temporary_basedir
/
"
segmentation
"
/
"
predictions
"
last
=
_get_checkpoint_from_alias
(
temporary_basedir
/
"
results
"
,
temporary_basedir
/
"
segmentation
"
/
"
results
"
,
"
periodic
"
,
)
assert
last
.
name
.
endswith
(
"
epoch=0
"
+
CHECKPOINT_EXTENSION
)
...
...
@@ -340,9 +340,9 @@ def test_evaluate_lwnet_drive(temporary_basedir):
runner
=
CliRunner
()
with
stdout_logging
()
as
buf
:
prediction_path
=
temporary_basedir
/
"
predictions
"
prediction_path
=
temporary_basedir
/
"
segmentation
"
/
"
predictions
"
predictions_file
=
prediction_path
/
"
predictions.json
"
evaluation_path
=
temporary_basedir
/
"
evaluations
"
evaluation_path
=
temporary_basedir
/
"
segmentation
"
/
"
evaluations
"
result
=
runner
.
invoke
(
evaluate
,
[
...
...
@@ -388,7 +388,7 @@ def test_experiment(temporary_basedir):
runner
=
CliRunner
()
output_folder
=
temporary_basedir
/
"
experiment
"
output_folder
=
temporary_basedir
/
"
segmentation
"
/
"
experiment
"
num_epochs
=
2
result
=
runner
.
invoke
(
experiment
,
...
...
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