gsutil cp hyp evolution bug fix (#876)
This commit is contained in:
1 parent
44cdcc7e0b
commit
bc1fd13a7a
2 files changed
+11
-1
No files matched your search
@@ -4,12 +4,19 @@
|
||||
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
|
||||
|
||||
def gsutil_getsize(url=''):
|
||||
# gs://bucket/file size https://cloud.google.com/storage/docs/gsutil/commands/du
|
||||
s = subprocess.check_output('gsutil du %s' % url, shell=True).decode('utf-8')
|
||||
return eval(s.split(' ')[0]) if len(s) else 0 # bytes
|
||||
|
||||
|
||||
def attempt_download(weights):
|
||||
# Attempt to download pretrained weights if not found locally
|
||||
weights = weights.strip().replace("'", '')
|
||||
|
||||
Reference in new issue
Block a user