Skip to content

Uploading tarballs some of the time is very confusing #61

Open
@itamarst

Description

@itamarst

If there's more than one file to upload, it's a tarball. If it's one file, it's not a tarball.

This is very confusing as an end-user of this data.

tar.close()
def _upload_output_files(self):
outputFileSize = len(self.currentRun.metadata()["output"])
if outputFileSize > 1:
temp = tempfile.NamedTemporaryFile(delete=False)
temp.close()
# 1. Tar the files in the model dir
self._tar_outputFiles(temp.name)
# 2. Upload the tar
# Uploading to the same model dir so we get proper paths
# such as /model/assets/saved_model.json
self._uploadArchive(temp.name, self.currentRun.getModelDir())
os.remove(temp.name)
elif outputFileSize == 1:
self._upload(self.currentRun.metadata()["output"][0])
print(".\n", end="")

The more reasonable thing to do would be to always upload a tarball.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions