Skip to content
Snippets Groups Projects
Commit 8f49c23d authored by Daniel CARRON's avatar Daniel CARRON :b: Committed by André Anjos
Browse files

[chore] Fix typo

parent afda408c
No related branches found
No related tags found
1 merge request!46Create common library
...@@ -16,7 +16,7 @@ def id_function(val): ...@@ -16,7 +16,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts", "split,lengths",
[ [
("fold-0", dict(train=174, validation=44, test=25)), ("fold-0", dict(train=174, validation=44, test=25)),
("fold-1", dict(train=174, validation=44, test=25)), ("fold-1", dict(train=174, validation=44, test=25)),
...@@ -34,13 +34,13 @@ def id_function(val): ...@@ -34,13 +34,13 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.hivtb", f"{split}.json"), make_split("mednet.config.data.hivtb", f"{split}.json"),
lengths=lenghts, lengths=lengths,
prefixes=("HIV-TB_Algorithm_study_X-rays",), prefixes=("HIV-TB_Algorithm_study_X-rays",),
possible_labels=(0, 1), possible_labels=(0, 1),
) )
......
...@@ -19,7 +19,7 @@ def id_function(val): ...@@ -19,7 +19,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts", "split,lengths",
[ [
("default", dict(train=84, validation=20, test=52)), ("default", dict(train=84, validation=20, test=52)),
("fold-0", dict(train=111, validation=28, test=17)), ("fold-0", dict(train=111, validation=28, test=17)),
...@@ -38,13 +38,13 @@ def id_function(val): ...@@ -38,13 +38,13 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.indian", f"{split}.json"), make_split("mednet.config.data.indian", f"{split}.json"),
lengths=lenghts, lengths=lengths,
prefixes=("DatasetA/Training", "DatasetA/Testing"), prefixes=("DatasetA/Training", "DatasetA/Testing"),
possible_labels=(0, 1), possible_labels=(0, 1),
) )
......
...@@ -17,7 +17,7 @@ def id_function(val): ...@@ -17,7 +17,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts", "split,lengths",
[ [
("default", dict(train=88, validation=22, test=28)), ("default", dict(train=88, validation=22, test=28)),
("fold-0", dict(train=99, validation=25, test=14)), ("fold-0", dict(train=99, validation=25, test=14)),
...@@ -36,13 +36,13 @@ def id_function(val): ...@@ -36,13 +36,13 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.montgomery", f"{split}.json"), make_split("mednet.config.data.montgomery", f"{split}.json"),
lengths=lenghts, lengths=lengths,
prefixes=("CXR_png/MCUCXR_0",), prefixes=("CXR_png/MCUCXR_0",),
possible_labels=(0, 1), possible_labels=(0, 1),
) )
......
...@@ -16,7 +16,7 @@ def id_function(val): ...@@ -16,7 +16,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts", "split,lengths",
[ [
("default.json.bz2", dict(train=98637, validation=6350, test=4054)), ("default.json.bz2", dict(train=98637, validation=6350, test=4054)),
("cardiomegaly.json", dict(train=40, validation=40)), ("cardiomegaly.json", dict(train=40, validation=40)),
...@@ -26,13 +26,13 @@ def id_function(val): ...@@ -26,13 +26,13 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.nih_cxr14", f"{split}"), make_split("mednet.config.data.nih_cxr14", f"{split}"),
lengths=lenghts, lengths=lengths,
prefixes=("images/000",), prefixes=("images/000",),
possible_labels=(0, 1), possible_labels=(0, 1),
) )
......
...@@ -16,7 +16,7 @@ def id_function(val): ...@@ -16,7 +16,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts", "split,lengths",
[ [
# ("idiap.json.bz2", dict(train=96269)), ## many labels # ("idiap.json.bz2", dict(train=96269)), ## many labels
("tb-idiap.json", dict(train=200, test=50)), # 0: no-tb, 1: tb ("tb-idiap.json", dict(train=200, test=50)), # 0: no-tb, 1: tb
...@@ -31,13 +31,13 @@ def id_function(val): ...@@ -31,13 +31,13 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.padchest", split), make_split("mednet.config.data.padchest", split),
lengths=lenghts, lengths=lengths,
prefixes=("",), prefixes=("",),
possible_labels=(0, 1), possible_labels=(0, 1),
) )
......
...@@ -16,7 +16,7 @@ def id_function(val): ...@@ -16,7 +16,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts", "split,lengths",
[ [
("default", dict(train=422, validation=107, test=133)), ("default", dict(train=422, validation=107, test=133)),
("fold-0", dict(train=476, validation=119, test=67)), ("fold-0", dict(train=476, validation=119, test=67)),
...@@ -35,13 +35,13 @@ def id_function(val): ...@@ -35,13 +35,13 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.shenzhen", f"{split}.json"), make_split("mednet.config.data.shenzhen", f"{split}.json"),
lengths=lenghts, lengths=lengths,
prefixes=("CXR_png/CHNCXR_0",), prefixes=("CXR_png/CHNCXR_0",),
possible_labels=(0, 1), possible_labels=(0, 1),
) )
......
...@@ -16,7 +16,7 @@ def id_function(val): ...@@ -16,7 +16,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts", "split,lengths",
[ [
("fold-0", dict(train=292, validation=74, test=41)), ("fold-0", dict(train=292, validation=74, test=41)),
("fold-1", dict(train=292, validation=74, test=41)), ("fold-1", dict(train=292, validation=74, test=41)),
...@@ -34,13 +34,13 @@ def id_function(val): ...@@ -34,13 +34,13 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.tbpoc", f"{split}.json"), make_split("mednet.config.data.tbpoc", f"{split}.json"),
lengths=lenghts, lengths=lengths,
prefixes=( prefixes=(
"TBPOC_CXR/TBPOC-", "TBPOC_CXR/TBPOC-",
"TBPOC_CXR/tbpoc-", "TBPOC_CXR/tbpoc-",
......
...@@ -18,7 +18,7 @@ def id_function(val): ...@@ -18,7 +18,7 @@ def id_function(val):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"split,lenghts,prefixes", "split,lengths,prefixes",
[ [
( (
"v1-healthy-vs-atb", "v1-healthy-vs-atb",
...@@ -136,14 +136,14 @@ def id_function(val): ...@@ -136,14 +136,14 @@ def id_function(val):
def test_protocol_consistency( def test_protocol_consistency(
database_checkers, database_checkers,
split: str, split: str,
lenghts: dict[str, int], lengths: dict[str, int],
prefixes: typing.Sequence[str], prefixes: typing.Sequence[str],
): ):
from mednet.libs.common.data.split import make_split from mednet.libs.common.data.split import make_split
database_checkers.check_split( database_checkers.check_split(
make_split("mednet.config.data.tbx11k", f"{split}.json"), make_split("mednet.config.data.tbx11k", f"{split}.json"),
lengths=lenghts, lengths=lengths,
prefixes=prefixes, prefixes=prefixes,
possible_labels=(0, 1), possible_labels=(0, 1),
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment