Skip to content

Commit f57c92d

Browse files
committed
Update Minio based example
1 parent 4c1e1e5 commit f57c92d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

examples/log-artifacts-minio/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.7.0
1+
FROM python:3.8.15
22

33
RUN mkdir /mlflow/
44
RUN mkdir -p /mlflow/fileStore

examples/log-artifacts-minio/run.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import mlflow
77
from minio import Minio
8-
from minio.error import BucketAlreadyOwnedByYou
8+
from minio.error import S3Error
99

1010
os.environ.update(
1111
{
@@ -25,8 +25,11 @@
2525

2626
try:
2727
minioClient.make_bucket("mlflow")
28-
except BucketAlreadyOwnedByYou as err:
29-
print(err)
28+
except S3Error as err:
29+
if err.code == "BucketAlreadyOwnedByYou":
30+
pass
31+
else:
32+
raise
3033

3134
policy = {
3235
"Statement": [
@@ -72,3 +75,5 @@
7275

7376
# Log some directories too
7477
mlflow.log_artifacts("files/")
78+
79+
print("DONE")

0 commit comments

Comments
 (0)