Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Wilson <39283302+BenWilson2@users.noreply.github.com>
Signed-off-by: Harutaka Kawamura <hkawamura0130@gmail.com>
  • Loading branch information
harupy and BenWilson2 committed Feb 25, 2023
1 parent fedf876 commit 7162a50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlflow/server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ def _download_artifact(artifact_path):
A request handler for `GET /mlflow-artifacts/artifacts/<artifact_path>` to download an artifact
from `artifact_path` (a relative path from the root artifact directory).
"""
validate_path_is_safe(validate_path_is_safe)
validate_path_is_safe(artifact_path)
tmp_dir = tempfile.TemporaryDirectory()
artifact_repo = _get_artifact_repo_mlflow_artifacts()
dst = artifact_repo.download_artifacts(artifact_path, tmp_dir.name)
Expand All @@ -1598,7 +1598,7 @@ def _upload_artifact(artifact_path):
A request handler for `PUT /mlflow-artifacts/artifacts/<artifact_path>` to upload an artifact
to `artifact_path` (a relative path from the root artifact directory).
"""
validate_path_is_safe(validate_path_is_safe)
validate_path_is_safe(artifact_path)
head, tail = posixpath.split(artifact_path)
with tempfile.TemporaryDirectory() as tmp_dir:
tmp_path = os.path.join(tmp_dir, tail)
Expand Down

0 comments on commit 7162a50

Please sign in to comment.