fix_reading_nan_in_evolve (#10358)
when there is `nan` in evolve.csv pandas read it as str remove the space before fix that Signed-off-by: Michael Ben ami <31584614+mbenami@users.noreply.github.com> Signed-off-by: Michael Ben ami <31584614+mbenami@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
b412696ff3
commit
028b7cdb5a
1 file changed
+1
-1
+1
-1
@@ -1036,7 +1036,7 @@ def print_mutation(keys, results, hyp, save_dir, bucket, prefix=colorstr('evolve
|
||||
|
||||
# Save yaml
|
||||
with open(evolve_yaml, 'w') as f:
|
||||
data = pd.read_csv(evolve_csv)
|
||||
data = pd.read_csv(evolve_csv, skipinitialspace=True)
|
||||
data = data.rename(columns=lambda x: x.strip()) # strip keys
|
||||
i = np.argmax(fitness(data.values[:, :4])) #
|
||||
generations = len(data)
|
||||
|
||||
Reference in new issue
Block a user