Skip to content

Commit

Permalink
Merge pull request #26 from cybercongress/fix_weight_setting
Browse files Browse the repository at this point in the history
Remove excessive logging for weight setting
  • Loading branch information
cyborgshead authored Apr 25, 2024
2 parents c177af1 + 2ce02ce commit a2d6bb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cybertensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
nest_asyncio.apply()

# Cybertensor code and protocol version.
__version__ = "0.2.1"
__version__ = "0.2.2"
version_split = __version__.split(".")
__version_as_int__ = (
(100 * int(version_split[0]))
Expand Down
12 changes: 2 additions & 10 deletions cybertensor/messages/set_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,17 @@ def set_weights_message(
return True, "Not waiting for finalization."

if success is True:
cybertensor.__console__.print(
prefix="Set weights",
sufix="<green>Finalized: </green>" + str(success),
)
return True, "Successfully set weights and Finalized."
else:
cybertensor.__console__.print(
":cross_mark: [red]Failed[/red]: error:{}".format(error_message)
)

cybertensor.logging.warning(
prefix="Set weights",
sufix="<red>Failed: </red>" + str(error_message),
sufix=f"<red>Failed: </red> {error_message}",
)
return False, error_message

except Exception as e:
# TODO( devs ): lets remove all of the cybertensor.__console__ calls and replace with loguru.
cybertensor.logging.warning(
prefix="Set weights", sufix="<red>Failed: </red>" + str(e)
prefix="Set weights", sufix=f"<red>Failed: </red> {e}"
)
return False, str(e)

0 comments on commit a2d6bb7

Please sign in to comment.