pyiron_atomistics
pyiron_atomistics copied to clipboard
`TrainingContainer` cannot be pickled
container = pr.create.job.TrainingContainer('container')
for job in pr.iter_jobs():
container.include_job(job)
df = container.to_pandas()
df.to_pickle('name_of_the_file.pkl')
This fails, because the Atoms
-object contains a mysterious None
towards the beginning (i.e. df.drop(columns=['atoms'].to_pickle('blablabla.pkl')
works).
Quick fix:
container = pr.create.job.TrainingContainer('container')
for job in pr.iter_jobs():
container.include_job(job)
df = container.to_pandas()
df.atoms = df.atoms.map(lambda a: a.to_ase())
df.to_pickle('name_of_the_file.pkl')
If I recall correctly it's already not possible to pickle our atoms, see #643
You can pack
/unpack
projects with the training containers inside, if you need it for the workshop.