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

BTSDK: Move do* methods to related extrinsic #2286

Merged

Conversation

roman-opentensor
Copy link
Contributor

@roman-opentensor roman-opentensor commented Sep 5, 2024

  • all calls to the network are consolidated in related extrinsiсs
  • improved bittensor.utils.networking.ensure_connected logic and description
  • removed unused calls and methods from subtensor
  • all extrinsics returns formatter subtensor errors

@roman-opentensor roman-opentensor self-assigned this Sep 5, 2024
@roman-opentensor roman-opentensor added enhancement New feature or request bittensor labels Sep 5, 2024
@roman-opentensor roman-opentensor changed the title feat/roman/move-underscored-methods-to-extrinsics BTSDK: Move do* methods to related extrinsic Sep 6, 2024
Copy link
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only blocker is the docstring update. Others are just questions/tips.

@@ -15,19 +15,81 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

from typing import Union, TYPE_CHECKING
from typing import Dict, Tuple, Optional, Union, TYPE_CHECKING
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need Dict or Tuple.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need this because of the linter doesn't want to see dict and tuple instead of Dict and Tuple as type annotation. It's complaints.

@@ -3,7 +3,7 @@

import pytest

import bittensor
# import bittensor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this line just be entirely removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deferentially. good catch!

@@ -37,6 +105,7 @@ def commit_weights_extrinsic(
"""
Commits a hash of the neuron's weights to the Bittensor blockchain using the provided wallet.
This function is a wrapper around the `_do_commit_weights` method, handling user prompts and error messages.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update docstring.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

…try" has incompatible type "LoggingMachine"; expected "Logger | None" [arg-type]`
@roman-opentensor roman-opentensor merged commit e0ad585 into btsdk Sep 10, 2024
12 checks passed
@roman-opentensor roman-opentensor deleted the feat/roman/move-underscored-methods-to-extrinsics branch September 10, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants