To avoid memory issue with the opt_models_from_clyngor_answers function, use yield to create a generator instead of storing the optimal models in a list. This can be done thanks to the option with_answer_number added in 0.3.21.
Warning: this modification changes the object returns by the function. Now, It is a generator instead of a tuple. Also it is no more possible to use the repeated_optimal argument to extract the first optimal answer twice.
Hello,
To avoid memory issue with the
opt_models_from_clyngor_answers
function, use yield to create a generator instead of storing the optimal models in a list. This can be done thanks to the optionwith_answer_number
added in 0.3.21.Warning: this modification changes the object returns by the function. Now, It is a generator instead of a tuple. Also it is no more possible to use the repeated_optimal argument to extract the first optimal answer twice.