bittensor icon indicating copy to clipboard operation
bittensor copied to clipboard

Feature/mvds00/test axon subprocess error checking

Open mvds00 opened this issue 1 year ago • 1 comments

Bug

While working with the e2e tests, it appeared that the miner code did not function well, but the test never gave any indication of this. The two issues that this PR fixes are:

  • the miner code is not run with NEST_ASYNCIO disabled, leading to errors generated by uvicorn, that is used by class axon of bittensor.
  • test_axon.py doesn't check any output of the miner code. Although the miner code gets far enough to register an axon, making the test succeed, going forward it is not practical to not have everything working flawlessly under the hood.

Description of the Change

The subprocess to run a miner is now started with asyncio.create_subprocess_exec instead of asyncio.create_subprocess_shell so that it can be easily terminated by the test, to examine the output. The status of the subprocess is monitored. The NEST_ASYNCIO environment variable is set to 0 to disable nest_asyncio and fix the miner.

Alternate Designs

Rework of the test is actively worked on, this will be a separate PR on top of these commits.

Possible Drawbacks

Not known.

Verification Process

The test was run and with additional debugging it was observed that the miner now runs better.

Release Notes

N/A

mvds00 avatar Aug 13 '24 15:08 mvds00