opentensor / bittensor

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

`config.axon.port` ignored when `port` parameter is used or defaults to 8091 #2488

Closed mltrev23 closed 4 days ago

mltrev23 commented 5 days ago

Describe the bug

Hey team,

I noticed that this line in the axon.py file:
https://github.com/opentensor/bittensor/blob/ae0297856be790addff9ea4c6071c57a42e6d95b/bittensor/core/axon.py#L336

...ends up replacing config.axon.port with the port parameter (if provided) or defaults to 8091. This makes the config.axon.port setting kind of pointless since it only gets used if no port is passed explicitly.

What’s the recommended way to set a custom port? Should we always pass it as a parameter?

Thanks!

To Reproduce

  1. python neurons/miner.py --axon.port 8092
  2. However, you could see the terminal log like following: Axon created: Axon([::], 8091, ..., stopped, ['Synapse'])
  3. If I fix the code to hand in port as a param, axon is created on 8092.

Expected behavior

We can't run multiple neurons on the same device.

Screenshots

No response

Environment

Ubuntu 22.04 Bittensor 8.3.1

Additional context

No response

thewhaleking commented 5 days ago

👀

garrett-opentensor commented 4 days ago

This issue is resolved with the release of Bittensor 8.4.1 https://github.com/opentensor/bittensor/pull/2496