Saving variables & fitness from all generations? #15
Replies: 4 comments 2 replies
-
@jwalks31 yes, u can create your callback which will save/print/plot any data each 1 generation use callback like def action(data):
# code
return data
middle_callbacks = [
MiddleCallbacks.UniversalCallback(action, ActionConditions.EachGen(generation_step = 1))
] where |
Beta Was this translation helpful? Give feedback.
-
Hi, I get the following error when I follow the solution above
Any idea what I'm doing wrong?
Thank a lot for the improvements and support! |
Beta Was this translation helpful? Give feedback.
-
sorry, I cannot fix it right now, I will do it in some days maybe
I really dunno why it can be, show traceback
…On Thu, Nov 25, 2021 at 5:11 PM dvimrandd ***@***.***> wrote:
Hi, I get the following error when I follow the solution above
TypeError: 'AlgorithmParams' object does not support item assignment
Any idea what I'm doing wrong?
`
def action(data):
return data
middle_callbacks = [
MiddleCallbacks.UniversalCallback(action, ActionConditions.EachGen(generation_step=1))
]
model.run(
no_plot=True,
disable_progress_bar=True,
disable_printing=True,
middle_callbacks=middle_callbacks,
)`
Thank a lot for the improvements and support!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/PasaOpasen/geneticalgorithm2/discussions/15#discussioncomment-1700641>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK4VMUOCW6BEFBRGZMM6ZYDUNY72TANCNFSM4ZMTIC3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
fixed this bug in new version 6.4.1
…On Thu, Nov 25, 2021 at 5:11 PM dvimrandd ***@***.***> wrote:
Hi, I get the following error when I follow the solution above
TypeError: 'AlgorithmParams' object does not support item assignment
Any idea what I'm doing wrong?
`
def action(data):
return data
middle_callbacks = [
MiddleCallbacks.UniversalCallback(action, ActionConditions.EachGen(generation_step=1))
]
model.run(
no_plot=True,
disable_progress_bar=True,
disable_printing=True,
middle_callbacks=middle_callbacks,
)`
Thank a lot for the improvements and support!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/PasaOpasen/geneticalgorithm2/discussions/15#discussioncomment-1700641>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK4VMUOCW6BEFBRGZMM6ZYDUNY72TANCNFSM4ZMTIC3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi and thanks for the package!
After a ga has run, is there a way to save or output all variables & fitness values that the algorithm iterated through as it was running? Similar to the output_dict's 'last generation', but for all generations?
Beta Was this translation helpful? Give feedback.
All reactions