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
0d2f0163
Commit
0d2f0163
authored
10 months ago
by
Oscar JIMENEZ
Browse files
Options
Downloads
Patches
Plain Diff
Test batch uniformity for combined datasets
parent
6a6c672f
No related branches found
No related tags found
1 merge request
!55
Fix montgomery-shenzhen-indian-tbx11k datamodule
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_montgomery_shenzhen_indian_tbx11k.py
+31
-0
31 additions, 0 deletions
tests/test_montgomery_shenzhen_indian_tbx11k.py
with
31 additions
and
0 deletions
tests/test_montgomery_shenzhen_indian_tbx11k.py
+
31
−
0
View file @
0d2f0163
...
...
@@ -100,6 +100,37 @@ def test_split_consistency(name: str, tbx11k_name: str):
assert
isinstance
(
combined
.
splits
[
split
][
3
][
1
],
tbx11k_loader
)
@pytest.mark.parametrize
(
"
dataset
"
,
[
"
train
"
,
],
)
@pytest.mark.parametrize
(
"
tbx11k_name
"
,
[
(
"
v1_healthy_vs_atb
"
),
],
)
def
test_batch_uniformity
(
tbx11k_name
:
str
,
dataset
:
str
):
combined
=
importlib
.
import_module
(
f
"
.
{
tbx11k_name
}
"
,
"
mednet.config.data.montgomery_shenzhen_indian_tbx11k
"
,
).
datamodule
combined
.
model_transforms
=
[]
# should be done before setup()
combined
.
setup
(
"
predict
"
)
# sets up all datasets
loader
=
combined
.
predict_dataloader
()[
dataset
]
limit
=
5
# limit load checking
for
batch
in
loader
:
if
limit
==
0
:
break
assert
len
(
batch
[
1
])
==
2
# label, name. No radiological sign bounding-boxes
@pytest.mark.slow
@pytest.mark.skip_if_rc_var_not_set
(
"
datadir.montgomery
"
)
@pytest.mark.skip_if_rc_var_not_set
(
"
datadir.shenzhen
"
)
...
...
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