|
|
@@ -22,6 +22,7 @@ from scipy.cluster.vq import kmeans |
|
|
|
from scipy.signal import butter, filtfilt |
|
|
|
from tqdm import tqdm |
|
|
|
|
|
|
|
from utils.google_utils import gsutil_getsize |
|
|
|
from utils.torch_utils import init_seeds as init_torch_seeds |
|
|
|
from utils.torch_utils import is_parallel |
|
|
|
|
|
|
@@ -854,7 +855,9 @@ def print_mutation(hyp, results, yaml_file='hyp_evolved.yaml', bucket=''): |
|
|
|
print('\n%s\n%s\nEvolved fitness: %s\n' % (a, b, c)) |
|
|
|
|
|
|
|
if bucket: |
|
|
|
os.system('gsutil cp gs://%s/evolve.txt .' % bucket) # download evolve.txt |
|
|
|
url = 'gs://%s/evolve.txt' % bucket |
|
|
|
if gsutil_getsize(url) > (os.path.getsize('evolve.txt') if os.path.exists('evolve.txt') else 0): |
|
|
|
os.system('gsutil cp %s .' % url) # download evolve.txt if larger than local |
|
|
|
|
|
|
|
with open('evolve.txt', 'a') as f: # append result |
|
|
|
f.write(c + b + '\n') |