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

Release/8.4.4 #2522

Merged
merged 28 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1431b93
Removes `warning()` call.
thewhaleking Dec 2, 2024
d3ac763
Merge pull request #2508 from opentensor/fix/thewhaleking/remove-warn…
roman-opentensor Dec 2, 2024
a6deaf3
Adds logging.info level, changes verbosity of ClientConnectorError, f…
ibraheem-opentensor Dec 3, 2024
96d3950
Exit set_weights on success.
thewhaleking Dec 3, 2024
91211da
Merge pull request #2511 from opentensor/fix/thewhaleking/set-weights…
thewhaleking Dec 3, 2024
c1fb17c
Reduces verbosity of TimeoutError as well
ibraheem-opentensor Dec 3, 2024
36218b4
Merge branch 'staging' into fixes/logging-info_ClientConnectorError_v…
ibraheem-opentensor Dec 3, 2024
5ece4da
Ruff
ibraheem-opentensor Dec 3, 2024
43134e7
Updates tests
ibraheem-opentensor Dec 3, 2024
ec8bc48
Ruff
ibraheem-opentensor Dec 3, 2024
b60a6c7
Cleans up the test_dendrite tests.
thewhaleking Dec 4, 2024
78b1197
Fixes parsing config behaviour
ibraheem-opentensor Dec 4, 2024
7e45da5
Updates config parsing for axon, subtensor, and threadpool
ibraheem-opentensor Dec 4, 2024
69148eb
Merge pull request #2512 from opentensor/chore/thewhaleking/test-cleanup
thewhaleking Dec 4, 2024
28a953c
Merge branch 'staging' into fixes/logging-info_ClientConnectorError_v…
thewhaleking Dec 4, 2024
b346751
Merge pull request #2510 from opentensor/fixes/logging-info_ClientCon…
ibraheem-opentensor Dec 4, 2024
a1e1f5a
metagraph sync fix (#2514)
thewhaleking Dec 4, 2024
295c8b5
Removes custom error metadata pallet retrieval, as it doesn't actuall…
thewhaleking Dec 5, 2024
833fb47
Fix test.
thewhaleking Dec 5, 2024
2f42656
Fixes tests
ibraheem-opentensor Dec 5, 2024
89bd40e
Merge branch 'master' into backmerge/master-to-staging-844
ibraheem-opentensor Dec 5, 2024
266296f
Updates bt-decode to 0.4.0
ibraheem-opentensor Dec 5, 2024
59ba5f1
Merge pull request #2518 from opentensor/fix/thewhaleking/format-erro…
ibraheem-opentensor Dec 5, 2024
ae273dd
Merge branch 'staging' into backmerge/master-to-staging-844
ibraheem-opentensor Dec 5, 2024
6969722
Merge pull request #2519 from opentensor/backmerge/master-to-staging-844
ibraheem-opentensor Dec 6, 2024
92bb901
Merge branch 'staging' into update/bt-decode-0.4.0
ibraheem-opentensor Dec 6, 2024
d3f8e5f
Merge pull request #2520 from opentensor/update/bt-decode-0.4.0
ibraheem-opentensor Dec 6, 2024
e14c2df
Bumps version and adds changelog
ibraheem-opentensor Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 8.4.4 /2024-12-05

## What's Changed
* Removes the call that automatically sets everything to warning level debugging by @thewhaleking in https://github.com/opentensor/bittensor/pull/2508
* Exit `set_weights` on success by @thewhaleking in https://github.com/opentensor/bittensor/pull/2511
* `test_dendrite` test clean up by @thewhaleking in https://github.com/opentensor/bittensor/pull/2512
* Adds --logging.info level so it can be set @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2510
* Allows wallet to be created through configs in the axon if it is provided by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2510
* Changes verbosity level of ClientConnectorError and TimeoutError in the dendrite to debug by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2510
* Fixes behaviour of config initialization for axon, subtensor, logging and threadpool by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2510
* metagraph sync fix by @thewhaleking in https://github.com/opentensor/bittensor/pull/2514
* Remove metadata retrieval of custom errors from format_error_message by @thewhaleking in https://github.com/opentensor/bittensor/pull/2518
* Backmerge master to staging for 8.4.4 by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2519
* Updates bt-decode to 0.4.0 by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2520

**Full Changelog**: https://github.com/opentensor/bittensor/compare/v8.4.3...v8.4.4

## 8.4.3 /2024-12-02

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.4.3
8.4.4
8 changes: 3 additions & 5 deletions bittensor/core/async_subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,11 +1184,9 @@ async def sign_and_send_extrinsic(
if await response.is_success:
return True, ""
else:
return False, format_error_message(
await response.error_message, substrate=self.substrate
)
return False, format_error_message(await response.error_message)
except SubstrateRequestException as e:
return False, format_error_message(e, substrate=self.substrate)
return False, format_error_message(e)

async def get_children(self, hotkey: str, netuid: int) -> tuple[bool, list, str]:
"""
Expand Down Expand Up @@ -1218,7 +1216,7 @@ async def get_children(self, hotkey: str, netuid: int) -> tuple[bool, list, str]
else:
return True, [], ""
except SubstrateRequestException as e:
return False, [], format_error_message(e, self.substrate)
return False, [], format_error_message(e)

async def get_subnet_hyperparameters(
self, netuid: int, block_hash: Optional[str] = None, reuse_block: bool = False
Expand Down
4 changes: 2 additions & 2 deletions bittensor/core/axon.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def __init__(
self.config = config # type: ignore

# Get wallet or use default.
self.wallet = wallet or Wallet()
self.wallet = wallet or Wallet(config=self.config)

# Build axon objects.
self.uuid = str(uuid.uuid1())
Expand Down Expand Up @@ -594,7 +594,7 @@ def config(cls) -> "Config":
"""
parser = argparse.ArgumentParser()
Axon.add_args(parser) # Add specific axon-related arguments
return Config(parser, args=[])
return Config(parser)

@classmethod
def help(cls):
Expand Down
5 changes: 4 additions & 1 deletion bittensor/core/dendrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ def log_exception(self, exception: Exception):
"""
error_id = str(uuid.uuid4())
error_type = exception.__class__.__name__
logging.error(f"{error_type}#{error_id}: {exception}")
if isinstance(exception, (aiohttp.ClientConnectorError, asyncio.TimeoutError)):
logging.debug(f"{error_type}#{error_id}: {exception}")
else:
logging.error(f"{error_type}#{error_id}: {exception}")

def process_error_message(
self,
Expand Down
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/async_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ async def _do_pow_register(
# process if registration successful, try again if pow is still valid
await response.process_events()
if not await response.is_success:
return False, format_error_message(
error_message=await response.error_message, substrate=subtensor.substrate
)
return False, format_error_message(error_message=await response.error_message)
# Successful registration
else:
return True, None
Expand Down
6 changes: 2 additions & 4 deletions bittensor/core/extrinsics/async_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ async def _do_set_root_weights(
if await response.is_success:
return True, "Successfully set weights."
else:
return False, format_error_message(
await response.error_message, substrate=subtensor.substrate
)
return False, format_error_message(await response.error_message)


async def set_root_weights_extrinsic(
Expand Down Expand Up @@ -263,6 +261,6 @@ async def set_root_weights_extrinsic(
return False

except SubstrateRequestException as e:
fmt_err = format_error_message(e, subtensor.substrate)
fmt_err = format_error_message(e)
logging.error(f":cross_mark: [red]Failed error:[/red] {fmt_err}")
return False
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/async_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ async def _do_transfer(
return (
False,
"",
format_error_message(
await response.error_message, substrate=subtensor.substrate
),
format_error_message(await response.error_message),
)


Expand Down
8 changes: 2 additions & 6 deletions bittensor/core/extrinsics/async_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ async def _do_set_weights(
if await response.is_success:
return True, "Successfully set weights."
else:
return False, format_error_message(
response.error_message, substrate=subtensor.substrate
)
return False, format_error_message(response.error_message)


async def set_weights_extrinsic(
Expand Down Expand Up @@ -206,9 +204,7 @@ async def _do_commit_weights(
if await response.is_success:
return True, None
else:
return False, format_error_message(
response.error_message, substrate=subtensor.substrate
)
return False, format_error_message(response.error_message)


async def commit_weights_extrinsic(
Expand Down
8 changes: 2 additions & 6 deletions bittensor/core/extrinsics/commit_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ def commit_weights_extrinsic(
logging.info(success_message)
return True, success_message
else:
error_message = format_error_message(
error_message, substrate=subtensor.substrate
)
error_message = format_error_message(error_message)
logging.error(f"Failed to commit weights: {error_message}")
return False, error_message

Expand Down Expand Up @@ -249,8 +247,6 @@ def reveal_weights_extrinsic(
logging.info(success_message)
return True, success_message
else:
error_message = format_error_message(
error_message, substrate=subtensor.substrate
)
error_message = format_error_message(error_message)
logging.error(f"Failed to reveal weights: {error_message}")
return False, error_message
8 changes: 2 additions & 6 deletions bittensor/core/extrinsics/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def _do_pow_register(
# process if registration successful, try again if pow is still valid
response.process_events()
if not response.is_success:
return False, format_error_message(
response.error_message, substrate=self.substrate
)
return False, format_error_message(response.error_message)
# Successful registration
else:
return True, None
Expand Down Expand Up @@ -310,9 +308,7 @@ def _do_burned_register(
# process if registration successful, try again if pow is still valid
response.process_events()
if not response.is_success:
return False, format_error_message(
response.error_message, substrate=self.substrate
)
return False, format_error_message(response.error_message)
# Successful registration
else:
return True, None
Expand Down
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ def _do_root_register(
# process if registration successful, try again if pow is still valid
response.process_events()
if not response.is_success:
return False, format_error_message(
response.error_message, substrate=self.substrate
)
return False, format_error_message(response.error_message)
# Successful registration
else:
return True, None
Expand Down
8 changes: 2 additions & 6 deletions bittensor/core/extrinsics/serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ def serve_extrinsic(
)
return True
else:
logging.error(
f"Failed: {format_error_message(error_message, substrate=subtensor.substrate)}"
)
logging.error(f"Failed: {format_error_message(error_message)}")
return False
else:
return True
Expand Down Expand Up @@ -301,9 +299,7 @@ def publish_metadata(
if response.is_success:
return True
else:
raise MetadataError(
format_error_message(response.error_message, substrate=self.substrate)
)
raise MetadataError(format_error_message(response.error_message))


# Community uses this function directly
Expand Down
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/set_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ def do_set_weights(
if response.is_success:
return True, "Successfully set weights."
else:
return False, format_error_message(
response.error_message, substrate=self.substrate
)
return False, format_error_message(response.error_message)


# Community uses this extrinsic directly and via `subtensor.set_weights`
Expand Down
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/staking.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ def _do_stake(
if response.is_success:
return True
else:
raise StakeError(
format_error_message(response.error_message, substrate=self.substrate)
)
raise StakeError(format_error_message(response.error_message))


def _check_threshold_amount(
Expand Down
2 changes: 1 addition & 1 deletion bittensor/core/extrinsics/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def transfer_extrinsic(
)
else:
logging.error(
f":cross_mark: [red]Failed[/red]: {format_error_message(error_message, substrate=subtensor.substrate)}"
f":cross_mark: [red]Failed[/red]: {format_error_message(error_message)}"
)

if success:
Expand Down
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/unstaking.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ def _do_unstake(
if response.is_success:
return True
else:
raise StakeError(
format_error_message(response.error_message, substrate=self.substrate)
)
raise StakeError(format_error_message(response.error_message))


def _check_threshold_amount(subtensor: "Subtensor", stake_balance: "Balance") -> bool:
Expand Down
4 changes: 1 addition & 3 deletions bittensor/core/extrinsics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ def submit():
wait_for_finalization=wait_for_finalization,
)
except SubstrateRequestException as e:
logging.error(
format_error_message(e.args[0], substrate=subtensor.substrate)
)
logging.error(format_error_message(e.args[0]))
# Re-raise the exception for retrying of the extrinsic call. If we remove the retry logic,
# the raise will need to be removed.
raise
Expand Down
Loading
Loading