forked from microsoft/qlib
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set _artifact_uri when mlflow_run is not None. (microsoft#1367)
* Set _artifact_uri when mlflow_run is not None. * Fix black.
- Loading branch information
1 parent
77e660a
commit a6ac5ed
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
import unittest | ||
from pathlib import Path | ||
import shutil | ||
|
||
from qlib.workflow import R | ||
from qlib.tests import TestAutoData | ||
|
||
|
||
class WorkflowTest(TestAutoData): | ||
TMP_PATH = Path("./.mlruns_tmp/") | ||
|
||
def tearDown(self) -> None: | ||
if self.TMP_PATH.exists(): | ||
shutil.rmtree(self.TMP_PATH) | ||
|
||
def test_get_local_dir(self): | ||
""" """ | ||
with R.start(uri=str(self.TMP_PATH)): | ||
pass | ||
|
||
with R.uri_context(uri=str(self.TMP_PATH)): | ||
resume_recorder = R.get_recorder() | ||
resume_recorder.get_local_dir() | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |