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
7c34000d
Commit
7c34000d
authored
1 year ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts.evaluate] Correct datamodule typing
parent
79c79301
No related branches found
No related tags found
1 merge request
!6
Making use of LightningDataModule and simplification of data loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ptbench/scripts/evaluate.py
+4
-5
4 additions, 5 deletions
src/ptbench/scripts/evaluate.py
with
4 additions
and
5 deletions
src/ptbench/scripts/evaluate.py
+
4
−
5
View file @
7c34000d
...
...
@@ -5,7 +5,6 @@
import
os
from
collections
import
defaultdict
from
typing
import
Union
import
click
...
...
@@ -13,7 +12,7 @@ from clapper.click import ConfigCommand, ResourceOption, verbosity_option
from
clapper.logging
import
setup
from
matplotlib.backends.backend_pdf
import
PdfPages
from
..data.datamodule
import
C
aching
DataModule
from
..data.datamodule
import
C
oncat
DataModule
from
..data.typing
import
DataLoader
from
..utils.plot
import
precision_recall_f1iso
,
roc_curve
from
..utils.table
import
performance_table
...
...
@@ -22,7 +21,7 @@ logger = setup(__name__.split(".")[0], format="%(levelname)s: %(message)s")
def
_validate_threshold
(
threshold
:
Union
[
int
,
float
,
str
]
,
dataloader_dict
:
dict
[
str
,
DataLoader
]
threshold
:
int
|
float
|
str
,
dataloader_dict
:
dict
[
str
,
DataLoader
]
):
"""
Validates the user threshold selection.
...
...
@@ -140,8 +139,8 @@ def _validate_threshold(
def
evaluate
(
output_folder
:
str
,
predictions_folder
:
str
,
datamodule
:
C
aching
DataModule
,
threshold
:
Union
[
int
,
float
,
str
]
,
datamodule
:
C
oncat
DataModule
,
threshold
:
int
|
float
|
str
,
steps
:
int
,
**
_
,
)
->
None
:
...
...
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