Skip to content

Commit e9b6968

Browse files
authored
fix: incorrect log line, single source of truth for version number (pyproject.toml) (#368)
* fix incorrect log line. * v1.5.4 * pull version from a single source of truth (pyproject.toml) not have to hardcode in 2 different files.
1 parent 63e8380 commit e9b6968

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

masa/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
# DEALINGS IN THE SOFTWARE.
1818

1919
# Define the code version for miners / validators. This must match weights_version on the subnet! If not, validators won't be able to set weights, and miners will get a warning.
20-
__version__ = "1.5.0"
20+
from importlib.metadata import version
21+
22+
__version__ = version("masa")
2123
version_split = __version__.split(".")
2224
__spec_version__ = (
2325
(100 * int(version_split[0]))

masa/base/neuron.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ async def initialize(self, config=None):
123123

124124
if self.spec_version < weights_version:
125125
bt.logging.warning(
126-
f"🟡 Code is outdated based on subnet requirements! Required: {weights_version}, Current: {self.spec_version} (v{__version__}). Please update your code to the latest release!"
126+
f"🟡 Code is outdated! Current: {self.spec_version}, Required: {weights_version}. Please update your code to the latest release!"
127127
)
128128
else:
129129
bt.logging.success(
130-
f"🟢 Code is up to date! Current: {self.spec_version} (v{__version__}), Required: {weights_version}"
130+
f"🟢 Code is up to date! Current: {self.spec_version}, Required: {weights_version}"
131131
)
132132

133133
# Each miner gets a unique identity (UID) in the network for differentiation.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages = ["masa"]
77

88
[project]
99
name = "masa"
10-
version = "1.5.3"
10+
version = "1.5.4"
1111
description = "bittensor subnet for masa protocol"
1212
authors = [
1313
{ name = "masa.ai", email = "hello@masa.ai" }

0 commit comments

Comments
 (0)