Skip to content

Commit

Permalink
Reset _minio_client when mflux_ai.init() is successful
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed Sep 12, 2019
1 parent 98831c4 commit 7b588dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mflux_ai/mflux_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def init(project_token):
:param project_token: A secret string that is specific to an MFlux.ai project that you have
access to.
"""
global _minio_client
if "your_" in project_token.lower():
print(
"Warning: {} looks like an invalid project token. Go to"
Expand Down Expand Up @@ -76,6 +77,7 @@ def init(project_token):
if not data.get("minio_secret_key", None):
print("Error: Could not fetch minio_secret_key connection string")

_minio_client = None
os.environ["MLFLOW_TRACKING_URI"] = data.get("mlflow_server", None)
os.environ["MLFLOW_S3_ENDPOINT_URL"] = data.get("minio_server", None)
os.environ["AWS_ACCESS_KEY_ID"] = data.get("minio_access_key", None)
Expand Down

0 comments on commit 7b588dd

Please sign in to comment.