@@ -90,7 +90,7 @@ def upload(self, submission):
9090
9191 # zip_path = "/home/felix/workplace/22_dpdispatcher/dpdispatcher-yfb/dpdispatcher/dpcloudserver/t.txt"
9292 # zip_path = self.local_root
93- bar_format = "{l_bar}{bar}| {n:.02f}/{total:.02f} % [{elapsed}<{remaining}, {rate_fmt}{postfix}]\n "
93+ bar_format = "{l_bar}{bar}| {n:.02f}/{total:.02f} % [{elapsed}<{remaining}, {rate_fmt}{postfix}]"
9494 for job in tqdm .tqdm (submission .belonging_jobs , desc = "Uploading to Lebesgue" , bar_format = bar_format ):
9595 self .machine .gen_local_script (job )
9696 zip_filename = job .job_hash + '.zip'
@@ -115,6 +115,7 @@ def upload(self, submission):
115115 )
116116 result = self .api .upload (oss_task_zip , upload_zip , ENDPOINT , BUCKET_NAME )
117117 self ._backup (self .local_root , upload_zip , keep_backup = self .remote_profile .get ('keep_backup' , True ))
118+ print () # empty print because tqdm may not print a newline along with dlog
118119 return result
119120 # return oss_task_zip
120121 # api.upload(self.oss_task_dir, zip_task_file)
@@ -141,13 +142,14 @@ def download(self, submission):
141142 else :
142143 job_hash = job_hashs [each ['task_id' ]]
143144 job_infos [job_hash ] = each
144- bar_format = "{l_bar}{bar}| {n:.02f}/{total:.02f} % [{elapsed}<{remaining}, {rate_fmt}{postfix}]\n "
145+ bar_format = "{l_bar}{bar}| {n:.02f}/{total:.02f} % [{elapsed}<{remaining}, {rate_fmt}{postfix}]"
145146 for job_hash , info in tqdm .tqdm (job_infos .items (), desc = "Downloading to Lebesgue" , bar_format = bar_format ):
146147 result_filename = job_hash + '_back.zip'
147148 target_result_zip = os .path .join (self .local_root , result_filename )
148149 self .api .download_from_url (info ['result_url' ], target_result_zip )
149150 zip_file .unzip_file (target_result_zip , out_dir = self .local_root )
150151 self ._backup (self .local_root , target_result_zip , keep_backup = self .remote_profile .get ('keep_backup' , True ))
152+ print () # empty print because tqdm may not print a newline along with dlog
151153 return True
152154
153155 def _backup (self , local_root , target , keep_backup = True ):
0 commit comments