From df3f23fd98edbc6425dce7b520671938fbf33032 Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Mon, 22 Jul 2024 10:32:07 -0400 Subject: [PATCH 1/5] Merge pull request #2156 from opentensor/feat/ledger-integration [Ledger Integration] [Feature] bump pysub to 1.7.9+ --- bittensor/subtensor.py | 13 ------------- requirements/prod.txt | 4 ++-- scripts/environments/apple_m1_environment.yml | 4 ++-- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/bittensor/subtensor.py b/bittensor/subtensor.py index d1ebac9df4..c50ec7a4ca 100644 --- a/bittensor/subtensor.py +++ b/bittensor/subtensor.py @@ -23,7 +23,6 @@ import argparse import copy -import functools import socket import time from typing import List, Dict, Union, Optional, Tuple, TypedDict, Any @@ -109,18 +108,6 @@ KEY_NONCE: Dict[str, int] = {} -####### -# Monkey patch in caching the convert_type_string method -####### -if hasattr(RuntimeConfiguration, "convert_type_string"): - original_convert_type_string = RuntimeConfiguration.convert_type_string - - @functools.lru_cache(maxsize=None) - def convert_type_string(_, name): - return original_convert_type_string(name) - - RuntimeConfiguration.convert_type_string = convert_type_string -####### class ParamWithTypes(TypedDict): diff --git a/requirements/prod.txt b/requirements/prod.txt index 2d9ecabab5..e02456f998 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -25,9 +25,9 @@ python-statemachine~=2.1.2 retry requests rich -scalecodec==1.2.7 # scalecodec should not be changed unless first verifying compatibility with the subtensor's monkeypatching of scalecodec.RuntimeConfiguration.get_decoder_class +scalecodec==1.2.11 shtab~=1.6.5 -substrate-interface~=1.7.5 +substrate-interface~=1.7.9 termcolor tqdm uvicorn<=0.30 diff --git a/scripts/environments/apple_m1_environment.yml b/scripts/environments/apple_m1_environment.yml index a3712e267c..25824aa64e 100644 --- a/scripts/environments/apple_m1_environment.yml +++ b/scripts/environments/apple_m1_environment.yml @@ -228,7 +228,7 @@ dependencies: - retry==0.9.2 - rich==12.5.1 - rsa==4.9 - - scalecodec==1.2.7 # scalecodec should not be changed unless first verifying compatibility with the subtensor's monkeypatching of scalecodec.RuntimeConfiguration.get_decoder_class + - scalecodec==1.2.11 - scikit-learn==1.2.2 - scipy==1.10.1 - sentencepiece==0.1.99 @@ -242,7 +242,7 @@ dependencies: - sqlalchemy==2.0.19 - starlette==0.37.2 - streamlit==1.22.0 - - substrate-interface==1.5.2 + - substrate-interface==1.7.9 - tenacity==8.2.2 - termcolor==2.1.1 - threadpoolctl==3.1.0 From 959a42b0a7a865661ac4b6b7e864ba5ee70a46c0 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 25 Jul 2024 13:17:22 -0700 Subject: [PATCH 2/5] Bumps version to 7.3.1 --- VERSION | 2 +- bittensor/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 8b23b8d47c..34a8f745d4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.3.0 \ No newline at end of file +7.3.1 \ No newline at end of file diff --git a/bittensor/__init__.py b/bittensor/__init__.py index c872fdf973..e2dc10ae8a 100644 --- a/bittensor/__init__.py +++ b/bittensor/__init__.py @@ -40,7 +40,7 @@ # Bittensor code and protocol version. -__version__ = "7.3.0" +__version__ = "7.3.1" _version_split = __version__.split(".") __version_info__ = tuple(int(part) for part in _version_split) From 014e24314a4230cd4c96289c6f850e081d4ed95c Mon Sep 17 00:00:00 2001 From: Gus Date: Mon, 19 Aug 2024 13:26:08 -0400 Subject: [PATCH 3/5] chore: update changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a0ba068b..07603362d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 7.3.1 / 2024-08-19 + +## What's Changed +* https://github.com/opentensor/bittensor/pull/2156 by @camfairchild + +**Full Changelog**: https://github.com/opentensor/bittensor/compare/v7.3.0...v7.3.1 + ## 7.3.0 / 2024-07-12 ## What's Changed From d6a225afd47161bf946bec62147ce58c110bc986 Mon Sep 17 00:00:00 2001 From: Gus Date: Mon, 19 Aug 2024 13:43:58 -0400 Subject: [PATCH 4/5] ruff --- bittensor/subtensor.py | 1 - 1 file changed, 1 deletion(-) diff --git a/bittensor/subtensor.py b/bittensor/subtensor.py index c50ec7a4ca..75484fd69f 100644 --- a/bittensor/subtensor.py +++ b/bittensor/subtensor.py @@ -109,7 +109,6 @@ KEY_NONCE: Dict[str, int] = {} - class ParamWithTypes(TypedDict): name: str # Name of the parameter. type: str # ScaleType string of the parameter. From 94c432cf6c235a4ba9c22bff39a58bd970f1aa03 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Mon, 19 Aug 2024 11:04:40 -0700 Subject: [PATCH 5/5] Updates timeout type --- bittensor/dendrite.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bittensor/dendrite.py b/bittensor/dendrite.py index dca513e0b2..3341d15ddf 100644 --- a/bittensor/dendrite.py +++ b/bittensor/dendrite.py @@ -23,6 +23,7 @@ import uuid import time import aiohttp +from aiohttp import ClientTimeout import bittensor from typing import Optional, List, Union, AsyncGenerator, Any @@ -521,7 +522,7 @@ async def call( url, headers=synapse.to_headers(), json=synapse.model_dump(), - timeout=timeout, + timeout=ClientTimeout(total=timeout), ) as response: # Extract the JSON response from the server json_response = await response.json() @@ -603,7 +604,7 @@ async def call_stream( url, headers=synapse.to_headers(), json=synapse.model_dump(), - timeout=timeout, + timeout=ClientTimeout(total=timeout), ) as response: # Use synapse subclass' process_streaming_response method to yield the response chunks async for chunk in synapse.process_streaming_response(response): # type: ignore