Skip to content
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

Subspace subnet_params parallel issue #77

Open
uy5cu71 opened this issue Jan 13, 2024 · 0 comments
Open

Subspace subnet_params parallel issue #77

uy5cu71 opened this issue Jan 13, 2024 · 0 comments

Comments

@uy5cu71
Copy link

uy5cu71 commented Jan 13, 2024

By default it set parallel=True and it raise RuntimeError: This event loop is already running.

Which is cause later timeout error -> which will cause save state cache with error dictionary:
...."subnets": [{"tempo": {"error": "TimeoutError: 10 seconds"}, "immunity_period": {"error": "TimeoutError: 10 seconds"}, "min_allowed_weights": {"error": "TimeoutError: 10 seconds"},....
-> which will later cause broken modules as they expect integer not dict

Could not get subnet params for SubNetwork 0. Trying 0 more times.
Could not get subnet params for SubNetwork 0. Trying 1 more times.
Could not get subnet params for SubNetwork 0. Trying 0 more times.
Could not get subnet params for SubNetwork 0. Trying 2 more times.
Could not get subnet params for SubNetwork 0. Trying 0 more times.
Could not get subnet params for SubNetwork 0. Trying 1 more times.
Could not get subnet params for SubNetwork 0. Trying 0 more times.
Traceback (most recent call last):
  File "/home/total/commune/commune/modules/subspace/subspace.py", line 837, in subnet_params
    return self.subnet_params(netuid=netuid, network=network, block=block, update=update, trials=trials, timeout=timeout, parallel=parallel, fmt=fmt)
  File "/home/total/commune/commune/modules/subspace/subspace.py", line 884, in subnet_params
    results = c.wait(futures, timeout=timeout)
  File "/home/total/commune/commune/module/module.py", line 6214, in wait
    return c.gather(futures, timeout=timeout)
  File "/home/total/commune/commune/module/module.py", line 6292, in gather
    results = loop.run_until_complete(future)
  File "/home/total/.pyenv/versions/3.9.13/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/total/commune/commune/module/module.py", line 6284, in wait_for
    result = await asyncio.wait_for(future, timeout=timeout)
  File "/home/total/.pyenv/versions/3.9.13/lib/python3.9/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
  File "/home/total/commune/commune/modules/subspace/subspace.py", line 852, in query
    return self.query(**kwargs)
  File "/home/total/commune/commune/modules/subspace/subspace.py", line 282, in query
    self.put(cache_path, value)
  File "/home/total/commune/commune/module/module.py", line 398, in put
    getattr(cls,f'put_{mode}')(k, data)
  File "/home/total/commune/commune/module/module.py", line 1815, in put_json
    return loop.run_until_complete(cls.async_put_json(*args, **kwargs))
  File "/home/total/.pyenv/versions/3.9.13/lib/python3.9/asyncio/base_events.py", line 623, in run_until_complete
    self._check_running()
  File "/home/total/.pyenv/versions/3.9.13/lib/python3.9/asyncio/base_events.py", line 583, in _check_running
    raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running

If set parallel=False - issue is gone.

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

1 participant