mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-03 11:00:57 +08:00
recorder support upload both raw file and directory
This commit is contained in:
@@ -299,7 +299,11 @@ class MLflowRecorder(Recorder):
|
||||
def save_objects(self, local_path=None, artifact_path=None, **kwargs):
|
||||
assert self.uri is not None, "Please start the experiment and recorder first before using recorder directly."
|
||||
if local_path is not None:
|
||||
self.client.log_artifacts(self.id, local_path, artifact_path)
|
||||
path = Path(local_path)
|
||||
if path.is_dir():
|
||||
self.client.log_artifacts(self.id, local_path, artifact_path)
|
||||
else:
|
||||
self.client.log_artifact(self.id, local_path, artifact_path)
|
||||
else:
|
||||
temp_dir = Path(tempfile.mkdtemp()).resolve()
|
||||
for name, data in kwargs.items():
|
||||
|
||||
Reference in New Issue
Block a user