Skip to content

Commit

Permalink
Mlflow project definition (#22)
Browse files Browse the repository at this point in the history
* Change location of classification_report.json

* Use flass command in MLproject
  • Loading branch information
flikka authored Jun 18, 2020
1 parent 237c5e0 commit 3849b82
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions MLproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: flass-mlproject

docker_env:
image: docker.io/kminaister/flass:latest

entry_points:
main:
parameters:
dataset: string
subset: {type: int, default: -1}
command: "flass --dataset {dataset} --subset {subset}"
2 changes: 1 addition & 1 deletion flass/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def flass(plot, batch_size, epochs, dataset, model_type, subset, lime):
report = classification_report(
y_test, y_predicted, target_names=class_names, output_dict=True
)
classification_report_file = "classification_report.json"
classification_report_file = "/tmp/classification_report.json"
with open(classification_report_file, "w") as file:
json.dump(report, file)
logger.info(
Expand Down
2 changes: 1 addition & 1 deletion kfp/flassline.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def flass_onestep(
batch_size,
],
output_artifact_paths={
"classification-report-json": "/home/appuser/classification_report.json"
"classification-report-json": "/tmp/classification_report.json"
},
)

Expand Down

0 comments on commit 3849b82

Please sign in to comment.