You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError(f"The value assigned to the 'num_generations' parameter must be a positive integer > 0. But the value {num_generations} found.")
1315
+
raiseValueError(f"The value assigned to the 'num_generations' parameter must be a non-negative integer >= 0. But the value {num_generations} found.")
1316
+
else:
1317
+
self.valid_parameters=False
1318
+
raiseValueError(f"Unexpected value ({num_generations}) of type ({type(num_generations)}) assigned to the 'num_generations' parameter. It must be assigned a non-negative integer.")
1319
+
1320
+
# Validate save_best_solutions
1321
+
iftype(save_best_solutions) isbool:
1322
+
ifsave_best_solutions==True:
1323
+
ifnotself.suppress_warnings:
1324
+
warnings.warn("Use the 'save_best_solutions' parameter with caution as it may cause memory overflow when either the number of generations or number of genes is large.")
1316
1325
else:
1317
1326
self.valid_parameters=False
1318
-
raiseValueError(f"Unexpected value ({num_generations}) of type ({type(num_generations)}) assigned to the 'num_generations' parameter. It must be assigned a positive integer.")
1327
+
raiseTypeError(f"The value passed to the 'save_best_solutions' parameter must be of type bool but {type(save_best_solutions)} found.")
1328
+
1329
+
# Validate save_solutions
1330
+
iftype(save_solutions) isbool:
1331
+
ifsave_solutions==True:
1332
+
ifnotself.suppress_warnings:
1333
+
warnings.warn("Use the 'save_solutions' parameter with caution as it may cause memory overflow when either the number of generations, number of genes, or number of solutions in population is large.")
1334
+
else:
1335
+
self.valid_parameters=False
1336
+
raiseTypeError(f"The value passed to the 'save_solutions' parameter must be of type bool but {type(save_solutions)} found.")
1319
1337
1320
1338
# Set the `run_completed` property to False. It is set to `True` only after the `run()` method is complete.
warnings.warn("Use the 'save_best_solutions' parameter with caution as it may cause memory overflow when either the number of generations or number of genes is large.")
1493
-
else:
1494
-
self.valid_parameters=False
1495
-
raiseTypeError(f"The value passed to the 'save_best_solutions' parameter must be of type bool but {type(save_best_solutions)} found.")
1496
-
1497
-
# Validate save_solutions
1498
-
iftype(save_solutions) isbool:
1499
-
ifsave_solutions==True:
1500
-
ifnotself.suppress_warnings:
1501
-
warnings.warn("Use the 'save_solutions' parameter with caution as it may cause memory overflow when either the number of generations, number of genes, or number of solutions in population is large.")
1502
-
else:
1503
-
self.valid_parameters=False
1504
-
raiseTypeError(f"The value passed to the 'save_solutions' parameter must be of type bool but {type(save_solutions)} found.")
0 commit comments