Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions isic_challenge_scoring/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ def __init__(
for category in categories
]
)
# TODO: Fixed by https://github.com/pandas-dev/pandas-stubs/pull/1105
self.macro_average = self.per_category.mean( # type: ignore[assignment]
axis='index'
).rename('macro_average', inplace=True)
self.macro_average = self.per_category.mean(axis='index').rename('macro_average')
self.rocs = {
category: metrics.roc(
truth_probabilities[category],
Expand Down
5 changes: 1 addition & 4 deletions isic_challenge_scoring/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ def __init__(self, image_pairs: Iterable[ImagePair]) -> None:
],
)

# TODO: Fixed by https://github.com/pandas-dev/pandas-stubs/pull/1105
self.macro_average = per_image.mean(axis='index').rename( # type: ignore[assignment]
'macro_average', inplace=True
)
self.macro_average = per_image.mean(axis='index').rename('macro_average')

self.overall = self.macro_average.at['threshold_jaccard']
self.validation = self.macro_average.at['threshold_jaccard']
Expand Down
30 changes: 19 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ line-length = 100
skip-string-normalization = true
target-version = ["py313"]

[tool.coverage.run]
source_pkgs = [
"isic_challenge_scoring",
]

[tool.coverage.paths]
source = [
"isic_challenge_scoring/",
".tox/**/site-packages/isic_challenge_scoring/",
]

[tool.isort]
profile = "black"
line_length = 100
Expand All @@ -105,7 +94,12 @@ files = [
"isic_challenge_scoring",
"tests",
]
check_untyped_defs = true
ignore_missing_imports = true
show_error_codes = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
module = [
Expand Down Expand Up @@ -133,3 +127,17 @@ filterwarnings = [
testpaths = [
"tests",
]

[tool.coverage.run]
source_pkgs = [
"isic_challenge_scoring",
]

[tool.coverage.paths]
source = [
"isic_challenge_scoring/",
".tox/**/site-packages/isic_challenge_scoring/",
]

[tool.coverage.report]
skip_empty = true