Skip to content

Commit

Permalink
bump to rc1.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwjn committed Aug 10, 2022
1 parent 3232298 commit 0800363
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion codalab/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# Increment this on master when ready to cut a release.
# http://semver.org/
CODALAB_VERSION = '1.5.4'
CODALAB_VERSION = '1.5.6'
BINARY_PLACEHOLDER = '<binary>'
URLOPEN_TIMEOUT_SECONDS = int(os.environ.get('CODALAB_URLOPEN_TIMEOUT_SECONDS', 5 * 60))

Expand Down
15 changes: 12 additions & 3 deletions codalab/lib/upload_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ def write_fileobj(
bundle_conn_str=None,
index_conn_str=None,
progress_callback=None,
):
):
import datetime
time1 = datetime.datetime.now()
if unpack_archive:
output_fileobj = zip_util.unpack_to_archive(source_ext, source_fileobj)
else:
Expand All @@ -227,7 +229,7 @@ def write_fileobj(
os.environ['AZURE_STORAGE_CONNECTION_STRING'] = bundle_conn_str
try:
bytes_uploaded = 0
CHUNK_SIZE = 16 * 1024
CHUNK_SIZE = 4 * 1024
with FileSystems.create(
bundle_path, compression_type=CompressionTypes.UNCOMPRESSED
) as out:
Expand All @@ -241,7 +243,8 @@ def write_fileobj(
should_resume = progress_callback(bytes_uploaded)
if not should_resume:
raise Exception('Upload aborted by client')

time2 = datetime.datetime.now()
print("== Upload time is: {}".format(time2 - time1))
with FileSystems.open(
bundle_path, compression_type=CompressionTypes.UNCOMPRESSED
) as ttf, tempfile.NamedTemporaryFile(suffix=".sqlite") as tmp_index_file:
Expand All @@ -252,6 +255,10 @@ def write_fileobj(
clearIndexCache=True,
indexFilePath=tmp_index_file.name,
)

time3 = datetime.datetime.now()
print("== Generate index time is: {}".format(time3 - time2))

if bundle_conn_str is not None:
os.environ['AZURE_STORAGE_CONNECTION_STRING'] = index_conn_str
with FileSystems.create(
Expand All @@ -268,6 +275,8 @@ def write_fileobj(
should_resume = progress_callback(bytes_uploaded)
if not should_resume:
raise Exception('Upload aborted by client')
time4 = datetime.datetime.now()
print("== Upload index time is: {}".format(time4- time3))
except Exception as err:
raise err
finally: # restore the origin connection string
Expand Down
2 changes: 1 addition & 1 deletion docs/REST-API-Reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# REST API Reference

_version 1.5.4_
_version 1.5.6_

This reference and the REST API itself is still under heavy development and is
subject to change at any time. Feedback through our GitHub issues is appreciated!
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


# should match codalab/common.py#CODALAB_VERSION
CODALAB_VERSION = "1.5.4"
CODALAB_VERSION = "1.5.6"


class Install(install):
Expand Down

0 comments on commit 0800363

Please sign in to comment.