Skip to content

Pandas/Numpy conflict causing issues in casm-learn #49

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

Closed
jcthomas opened this issue Apr 14, 2017 · 0 comments
Closed

Pandas/Numpy conflict causing issues in casm-learn #49

jcthomas opened this issue Apr 14, 2017 · 0 comments

Comments

@jcthomas
Copy link
Contributor

jcthomas commented Apr 14, 2017

Was contacted by a user with the following problem, so I'm opening an issue. It seems related to a known pandas/numpy conflict. The user was able to resolve by updating pandas, which also updated numpy. I haven't been able to recreate the issue myself, but at least wanted to document it if anyone else encounters the same.

When I run casm-learn -s fit_1_ga.json the first time it works and writes out all files. I can then plot my predicted and DFT hull from them. When I run it a second time with the previously generated fit_1_ga_halloffame.pkl I get
Loading fit_1_ga.json
# Hall of Fame size: 25

Loading Hall of Fame: fit_1_ga_halloffame.pkl
Traceback (most recent call last):
File "/usr/local/bin/casm-learn", line 119, in
hall.update(existing_hall)
File "/usr/lib/python2.7/dist-packages/deap/tools/support.py", line 523, in update
self.insert(population[0])
File "/usr/lib/python2.7/dist-packages/deap/tools/support.py", line 551, in insert
item = deepcopy(item)
File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)

... lots more deepcopy errors...

y.append(deepcopy(a, memo))
File "/usr/lib/python2.7/copy.py", line 174, in deepcopy
y = copier(memo)
ValueError: Iteration of zero-sized operands is not enabled
To refit I then have to delete the fit_1_ga_halloffame.pkl and then I can rerun, is that intended? This error occurs even when I run the same fit twice, i.e. not changing anything in the input file for casm-learn.

I suspect we might not be able to do anything about it beyond advising people to update to the latest version of pandas an numpy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants