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
fromnoodlesimport (schedule_hint, serial)
fromnoodles.run.threading.sqlite3importrun_parallelfromnoodles.serialimport (Registry)
defrun(wf, n_processes=1, cache='cache.db'):
""" Run locally using several threads. Caching can be turned off by specifying cache=None """returnrun_parallel(
wf, n_threads=n_processes, registry=registry,
db_file=cache, always_cache=False, echo_log=False)
defregistry():
""" This function pass to the noodles infrascture all the information related to the Structure of the Package object that is schedule. This *Registry* class contains hints that help Noodles to encode and decode this Package object. """returnRegistry(parent=serial.base())
@schedule_hint()deffun(x, y):
returnx**2+y@schedule_hint()deffun2(x):
return2*x+3deftest():
a=fun(3, 5)
b=fun(2, a)
c=fun2(b)
returnrun(c)
The text was updated successfully, but these errors were encountered:
The previous Warning is now an error in python 3.7. The following error is reported:
Traceback (most recent call last):
File "miniconda3/envs/py37/lib/python3.7/site-packages/noodles/lib/streams.py", line 163, in map
sink.send(self.f(x))
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "test.py", line 46, in <module>
test()
File "test.py", line 42, in test
return run(c)
File "test.py", line 13, in run
db_file=cache, always_cache=False, echo_log=False)
File "/home/felipe/miniconda3/envs/py37/lib/python3.7/site-packages/noodles/run/threading/sqlite3.py", line 108, in run_parallel
result = scheduler.run(parallel_sqlite_worker, get_workflow(workflow))
File "/home/felipe/miniconda3/envs/py37/lib/python3.7/site-packages/noodles/run/scheduler.py", line 155, in run
sink.send(EndOfQueue)
RuntimeError: generator raised StopIteration
Running a workflow using the
run_parallel
function fromfrom noodles.run.threading.sqlite3 import run_parallel
, results in the following warning:A minimal examples, is provided below:
The text was updated successfully, but these errors were encountered: