Skip to content

Can't run tutorials locally #272

@jsmentch

Description

@jsmentch

Running Pydra version I think 0.6 but it says 0+unknown, I installed with pip install pydra. Running in a singularity image on cent OS. pydra-ml is working fine so I think it is installed correctly.

I was trying to use pydra to find umap hyperparameters but can't get splitters to work and the tutorials don't work locally. It hits a lot of RuntimeError: This event loop is already running Maybe things have been updated a lot since whenever the tutorial was made.

example from tutorial 3:

import pydra

@pydra.mark.task
def add_two(x):
    return x + 2

task1 = add_two(x=[1, 2, 3])

task1.split("x")

task1()
task1.result()

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-7-06d1102645a1> in <module>
----> 1 task1()
      2 task1.result()

~/.local/lib/python3.7/site-packages/pydra/engine/core.py in __call__(self, submitter, plugin, rerun, **kwargs)
    356         if submitter:
    357             with submitter as sub:
--> 358                 res = sub(self)
    359         else:
    360             if is_workflow(self):

~/.local/lib/python3.7/site-packages/pydra/engine/submitter.py in __call__(self, runnable, cache_locations, rerun)
     57             self.loop.run_until_complete(self.submit_workflow(runnable, rerun=rerun))
     58         else:
---> 59             self.loop.run_until_complete(self.submit(runnable, wait=True, rerun=rerun))
     60         if is_workflow(runnable):
     61             # resetting all connections with LazyFields

/opt/miniconda-latest/lib/python3.7/asyncio/base_events.py in run_until_complete(self, future)
    568         future.add_done_callback(_run_until_complete_cb)
    569         try:
--> 570             self.run_forever()
    571         except:
    572             if new_task and future.done() and not future.cancelled():

/opt/miniconda-latest/lib/python3.7/asyncio/base_events.py in run_forever(self)
    523         self._check_closed()
    524         if self.is_running():
--> 525             raise RuntimeError('This event loop is already running')
    526         if events._get_running_loop() is not None:
    527             raise RuntimeError(

RuntimeError: This event loop is already running

-->

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions