opentensor / bittensor

Internet-scale Neural Networks
https://www.bittensor.com/
MIT License
909 stars 316 forks source link

SDK: Add substrate reconnection logic #2270

Open roman-opentensor opened 2 months ago

roman-opentensor commented 2 months ago

Describe the bug

After some inactive connection, the substratum loses connection and returns the error "[Errno 32] Broken pipe".

To Reproduce

  1. Create a Subtensor instance.
  2. Keep the connection inactive for a few minutes.
  3. Perform any request to the chain.

Expected behavior

The request should complete without errors.

Environment

OS Linux, MacOS.

roman-opentensor commented 2 months ago

Fix https://github.com/opentensor/bittensor/pull/2269