Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwjn committed Aug 10, 2022
1 parent 0800363 commit f10d3c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions codalab/lib/upload_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ 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 @@ -243,8 +241,6 @@ 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 @@ -256,9 +252,6 @@ def write_fileobj(
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 @@ -275,8 +268,6 @@ 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 frontend/src/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Should match codalab/common.py#CODALAB_VERSION
export const CODALAB_VERSION = '1.5.4';
export const CODALAB_VERSION = '1.5.6';

// Name Regex to match the backend in spec_utils.py
export const NAME_REGEX = /^[a-zA-Z_][a-zA-Z0-9_.-]*$/i;
Expand Down

0 comments on commit f10d3c1

Please sign in to comment.