コード例 #1
0
 def log_artifacts(self, local_dir, artifact_path=None):
     if artifact_path and path_not_unique(artifact_path):
         raise Exception("Invalid artifact path: '%s'. %s" % (artifact_path,
                                                              bad_path_message(artifact_path)))
     artifact_dir = self.get_path_module().join(self.artifact_uri, artifact_path) \
         if artifact_path else self.artifact_uri
     if not self.get_path_module().exists(artifact_dir):
         mkdir(artifact_dir)
     dir_util.copy_tree(src=local_dir, dst=artifact_dir)
コード例 #2
0
 def log_artifact(self, local_file, artifact_path=None):
     if artifact_path and path_not_unique(artifact_path):
         raise Exception("Invalid artifact path: '%s'. %s" %
                         (artifact_path, bad_path_message(artifact_path)))
     artifact_dir = build_path(self.artifact_uri, artifact_path) \
         if artifact_path else self.artifact_uri
     if not exists(artifact_dir):
         mkdir(artifact_dir)
     shutil.copy(local_file, artifact_dir)
コード例 #3
0
def verify_artifact_path(artifact_path):
    if artifact_path and path_not_unique(artifact_path):
        raise MlflowException("Invalid artifact path: '%s'. %s" %
                              (artifact_path, bad_path_message(artifact_path)))