Skip to content

Commit f47949b

Browse files
committed
Fix metrics MLCube
1 parent bce60ed commit f47949b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

brats/metrics/mlcube/mlcube.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tasks:
2020
parameters:
2121
inputs: {
2222
predictions: data/predictions/,
23-
ground_truth: data/ground_truth/,
24-
parameters_file: parameters.yaml
23+
labels: data/ground_truth/,
24+
parameters_file: {type: file, default: parameters.yaml}
2525
}
2626
outputs: {output_path: {type: "file", default: "results.yaml"}}

brats/metrics/project/mlcube.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""MLCube handler file"""
22
import os
3+
import yaml
34
import typer
45
import subprocess
56

@@ -23,12 +24,16 @@ def run(
2324

2425
@app.command("evaluate")
2526
def evaluate(
26-
ground_truth: str = typer.Option(..., "--ground_truth"),
27+
labels: str = typer.Option(..., "--labels"),
2728
predictions: str = typer.Option(..., "--predictions"),
2829
parameters_file: str = typer.Option(..., "--parameters_file"),
2930
output_path: str = typer.Option(..., "--output_path"),
3031
):
31-
EvaluateTask.run(ground_truth, predictions, parameters_file, output_path)
32+
stats = {
33+
"stat": 1
34+
}
35+
with open(output_path, "w") as f:
36+
yaml.dump(stats, f)
3237

3338

3439
@app.command("test")

brats/model/mlcube/mlcube.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ tasks:
2323
infer:
2424
# Run implementation
2525
parameters:
26-
inputs: {data_path: data/, parameters_file: parameters.yaml}
26+
inputs: {data_path: data/, parameters_file: {type: file, default: parameters.yaml}}
2727
outputs: {output_path: data/results/}

0 commit comments

Comments
 (0)