From f10d3c1258db1543fb26916bba2560a883755d97 Mon Sep 17 00:00:00 2001 From: Jiani Wang Date: Tue, 9 Aug 2022 23:29:46 -0700 Subject: [PATCH] format --- codalab/lib/upload_manager.py | 11 +---------- frontend/src/constants.js | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/codalab/lib/upload_manager.py b/codalab/lib/upload_manager.py index f2f133361..225989f82 100644 --- a/codalab/lib/upload_manager.py +++ b/codalab/lib/upload_manager.py @@ -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: @@ -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: @@ -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( @@ -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 diff --git a/frontend/src/constants.js b/frontend/src/constants.js index efb6ebb4e..1ab646c9e 100644 --- a/frontend/src/constants.js +++ b/frontend/src/constants.js @@ -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;