-
-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultGenome doesn't have get_pruned_copy #266
Comments
I have the same problem. Did you find a solution? |
Nope, instead I just didn't use |
I figured it out: the documentation and examples refer to the currently unrelease 0.93 version. The last release to the pip package repo was version 0.92 in 2017! That is quite old now; I think we're due for another release. But for now, you can simply follow the instructions to build and install from source to get the latest which runs correctly with the given examples. |
@rickdgray Apologies for the current state of the code, it's very overdue for cleanup. I accepted some large-scale changes I probably shouldn't have, and I need to go through, get these issues fixed up, and do a new maintenance release on PyPI. |
@CodeReclaimers No worries, I know how it is. You mentioned that there was a big change made that had some consequences; was this after 0.92? I see a few issues here so I was thinking the code base is not stable. But if 0.92 was actually stable, then I can just go use that. I ask because I was planning to use this, but I'm on a tight time constraint and can't fuss with other issues, especially when the issues are actually affecting the results. |
I took some large pull requests in July 2017 despite not having the time to thoroughly wrap my head around them. It's not that the changes were bad, they were just so extensive that any intuition I had for the code as a whole went out the window, and it became a lot harder for me to spot/fix issues. Version 0.91 was done before those changes, so it might be a safer place to start from if you need consistency. If nothing else, there's less code to trudge through if you need to make some tweaks. |
Awesome! Thanks for the info |
I didn't want to change the contents of I made the following modifications:
( I was helped here by looking at this commit 1d796ad, used the earlier version but needed to change some small things)
Those changes should do the trick! |
Describe the bug
Installing from PyPI and running draw_net from visualize.py, python throws
AttributeError: 'DefaultGenome' object has no attribute 'get_pruned_copy'
when genome.get_pruned_copy(config.genome_config) is being called.Tried with Python39 and Python311.
To Reproduce
Steps to reproduce the behavior:
AttributeError: 'DefaultGenome' object has no attribute 'get_pruned_copy'
Expected behavior
get_pruned_copy should be called.
Screenshots
Navigating to source on the neat.DefaultGenome type gets me to the file in site-packages, which ends like this:
This is the first part of the draw_net method (I added type annotations and formatted the code):
Desktop (please complete the following information):
Additional context
The genome comes from here:
The text was updated successfully, but these errors were encountered: