Skip to content

Commit 5de23b9

Browse files
committed
Add missing task for preprocessing MLCube
1 parent 8376c35 commit 5de23b9

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

brats/preprocessing/mlcube/mlcube.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@ tasks:
2323

2424
sanity_check:
2525
parameters:
26-
inputs: {data_path: data/, parameters_file: {type: file, default: parameters.yaml}}
26+
inputs: {data_path: data/, parameters_file: {type: file, default: parameters.yaml}}
27+
28+
statistics:
29+
parameters:
30+
inputs: {data_path: data/, parameters_file: {type: file, default: parameters.yaml}}
31+
outputs: {output_path: {type: file, default: statistics.yaml}}

brats/preprocessing/project/mlcube.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""MLCube handler file"""
22
import os
33
import typer
4+
import yaml
45
import subprocess
56

67

@@ -43,6 +44,18 @@ def sanity_check(
4344
):
4445
pass
4546

47+
@app.command("statistics")
48+
def statistics(
49+
data_path: str = typer.Option(..., "--data_path"),
50+
parameters_file: str = typer.Option(..., "--parameters_file"),
51+
output_path: str = typer.Option(..., "--output_path")
52+
):
53+
stats = {
54+
"stat": 1
55+
}
56+
with open(output_path, "w") as f:
57+
yaml.dump(stats, f)
58+
4659

4760
if __name__ == "__main__":
4861
app()

0 commit comments

Comments
 (0)