You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/ryan/miniconda3/envs/mp2/bin/mrun", line 8, in <module>
sys.exit(run())
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/site-packages/maggma/cli/__init__.py", line 80, in run
asyncio.run(multi(builder, num_workers))
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/asyncio/base_events.py", line 612, in run_until_complete
return future.result()
File "/Users/ryan/miniconda3/envs/mp2/lib/python3.8/site-packages/maggma/cli/multiprocessing.py", line 158, in multi
builder.connect()
AttributeError: 'dict' object has no attribute 'connect'
However, if I serialize the builder first:
dumpfn(__builder__, 'builder_test.json')
and then run mrun builder_test.json, all works as expected.
Expected behavior
mrun should work when called on a python file or jupyter notebook directly, even if the builder defined in that file has not been serialized.
The text was updated successfully, but these errors were encountered:
So I wasn't able to get it to fail in the same way, although it did fail for me. I had to remove the matplotlib lines otherwise it kept trying to initialize some weird GUI elements. Can you try that and see what happens?
Using
mrun
as described in the docs can fail if theBuilder
is not serialized first.If I instantiate a
Builder
inside a jupyter notebook and assign it to the__builder__
variable:__builder__ = MaterialsBuilder(my_store, target_store, query={"tags":"my_favorite_tag"})
and then execute
mrun test_builder.ipynb
, I getHowever, if I serialize the builder first:
dumpfn(__builder__, 'builder_test.json')
and then run
mrun builder_test.json
, all works as expected.Expected behavior
mrun
should work when called on a python file or jupyter notebook directly, even if the builder defined in that file has not been serialized.The text was updated successfully, but these errors were encountered: