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

Master 630 into staging #1590

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# Changelog

## 6.3.0 / 2023-11-16

## What's Changed
* (un)Staking multiple avoid tx limit by @camfairchild in https://github.com/opentensor/bittensor/pull/1244
* additional logging for prometheus by @Eugene-hu in https://github.com/opentensor/bittensor/pull/1246
* Dataset fix by @isabella618033 in https://github.com/opentensor/bittensor/pull/1249
* Grab delegates details from GitHub by @camfairchild in https://github.com/opentensor/bittensor/pull/1245
* Add raw spec for local test and new bins by @camfairchild in https://github.com/opentensor/bittensor/pull/1243
* Fix list_delegates on non-archive nodes by @camfairchild in https://github.com/opentensor/bittensor/pull/1232
* Blacklist fixes + depreciation of old signatures by @Eugene-hu in https://github.com/opentensor/bittensor/pull/1240
* [BIT-636] Change u16 weight normalization to max-upscaling by @opentaco in https://github.com/opentensor/bittensor/pull/1241
* remove duplicate command #1228 by @camfairchild in https://github.com/opentensor/bittensor/pull/1231
* test_forward_priority_2nd_request_timeout fix by @isabella618033 in https://github.com/opentensor/bittensor/pull/1276
* Remove btcli query and btcli set_weights by @camfairchild in https://github.com/opentensor/bittensor/pull/1144
* Merge releases 4.0.0 and 4.0.1 back to staging by @camfairchild in https://github.com/opentensor/bittensor/pull/1306
* Improve development workflow documentation by @quac88 in https://github.com/opentensor/bittensor/pull/1262
* staging updates and fixes by @ifrit98 in https://github.com/opentensor/bittensor/pull/1540
* Add root get_weights command to btcli by @Rubberbandits in https://github.com/opentensor/bittensor/pull/1536
* Fix typo by @steffencruz in https://github.com/opentensor/bittensor/pull/1543
* remove duplicated debug message in dendrite by @ifrit98 in https://github.com/opentensor/bittensor/pull/1544
* Cli fix by @ifrit98 in https://github.com/opentensor/bittensor/pull/1541
* update faucet helpstr by @ifrit98 in https://github.com/opentensor/bittensor/pull/1542
* Added mechanism to sum all delegated tao by @shibshib in https://github.com/opentensor/bittensor/pull/1547
* Dict hash fix by @ifrit98 in https://github.com/opentensor/bittensor/pull/1548
* Release/6.1.0 by @ifrit98 in https://github.com/opentensor/bittensor/pull/1550
* Merge master by @ifrit98 in https://github.com/opentensor/bittensor/pull/1552
* Streaming fix by @ifrit98 in https://github.com/opentensor/bittensor/pull/1551
* Fix typos by @omahs in https://github.com/opentensor/bittensor/pull/1553
* Normalize weights in r get weights table by @camfairchild in https://github.com/opentensor/bittensor/pull/1556
* Dendrite & Synapse updates and fixes by @ifrit98 in https://github.com/opentensor/bittensor/pull/1555
* rm root flag in metagraph by @ifrit98 in https://github.com/opentensor/bittensor/pull/1558
* Max Faucet Runs == 3 by @ifrit98 in https://github.com/opentensor/bittensor/pull/1560
* replace unknown wallet params (chain mismatch) with key values by @ifrit98 in https://github.com/opentensor/bittensor/pull/1559
* Remove PoW registration cli and associated extrinsic by @ifrit98 in https://github.com/opentensor/bittensor/pull/1557
* Add btcli wallet balance by @ifrit98 in https://github.com/opentensor/bittensor/pull/1564
* Dendrite fixes by @ifrit98 in https://github.com/opentensor/bittensor/pull/1561
* Release/6.2.0 by @ifrit98 in https://github.com/opentensor/bittensor/pull/1567
* Master into staging by @ifrit98 in https://github.com/opentensor/bittensor/pull/1570
* adding logging.exception by @surcyf123 in https://github.com/opentensor/bittensor/pull/1569
* Update network.py by @wildcommunist in https://github.com/opentensor/bittensor/pull/1568
* Subtensor Registry by @Eugene-hu in https://github.com/opentensor/bittensor/pull/1562
* add instructions for upgrading bittensor with outdated version check by @ifrit98 in https://github.com/opentensor/bittensor/pull/1571
* Add identity commands to btcli by @ifrit98 in https://github.com/opentensor/bittensor/pull/1566
* Add set_delegate_take command to btcli by @Rubberbandits in https://github.com/opentensor/bittensor/pull/1563
* Subtensor archive by @ifrit98 in https://github.com/opentensor/bittensor/pull/1575
* Bugfix/list delegates by @ifrit98 in https://github.com/opentensor/bittensor/pull/1577
* don't return result twice in query() by @ifrit98 in https://github.com/opentensor/bittensor/pull/1574
* rename logging.py so doesn't circ import by @ifrit98 in https://github.com/opentensor/bittensor/pull/1572
* add AxonInfo.<to|from>_string() by @ifrit98 in https://github.com/opentensor/bittensor/pull/1565
* don't print __is_set for recursive objects by @ifrit98 in https://github.com/opentensor/bittensor/pull/1573

## New Contributors
* @omahs made their first contribution in https://github.com/opentensor/bittensor/pull/1553
* @surcyf123 made their first contribution in https://github.com/opentensor/bittensor/pull/1569

**Full Changelog**: https://github.com/opentensor/bittensor/compare/v6.0.1...v6.3.0


## 6.2.0 / 2023-10-30

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.2.0
6.3.0
2 changes: 1 addition & 1 deletion bittensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
nest_asyncio.apply()

# Bittensor code and protocol version.
__version__ = "6.2.0"
__version__ = "6.3.0"
version_split = __version__.split(".")
__version_as_int__ = (
(100 * int(version_split[0]))
Expand Down
19 changes: 19 additions & 0 deletions bittensor/axon.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,28 @@ async def dispatch(
# Call the postprocess function
response = await self.postprocess(synapse, response, start_time)

# Catch the error case where axon is not configured to handle the request.
except KeyError:
# Log key error.
bittensor.logging.error(
f"Key Error: Synapse name {request_name} not found."
)

# Create a synapse instance with status code 404 (not found) and status message.
synapse: bittensor.Synapse = bittensor.Synapse()
synapse.axon.status_code = "404"
synapse.axon.status_message = f"Synapse name {request_name} not found."

# Create a JSON response with a status code of 404 (not found error),
# synapse headers, and an empty content.
response = JSONResponse(
status_code=404, headers=synapse.to_headers(), content={}
)

# Start of catching all exceptions, updating the status message, and processing time.
except Exception as e:
# Log the exception for debugging purposes.
bittensor.logging.error(f"Exception: {str(e)}")
bittensor.logging.trace(f"Forward exception: {traceback.format_exc()}")

# Set the status message of the synapse to the string representation of the exception.
Expand Down
10 changes: 6 additions & 4 deletions bittensor/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,23 @@ def __deepcopy__(self, memo) -> "config":
def __repr__(self) -> str:
return self.__str__()

def _remove_private_keys(self, d):
@staticmethod
def _remove_private_keys(d):
if "__parser" in d:
d.pop("__parser", None)
if "__is_set" in d:
d.pop("__is_set", None)
for k, v in list(d.items()):
if isinstance(v, dict):
self._remove_private_keys(v)
config._remove_private_keys(v)
return d

def __str__(self) -> str:
# remove the parser and is_set map from the visible config
visible = self.toDict()
visible = copy.deepcopy(self.toDict())
visible.pop("__parser", None)
cleaned = self.remove_private_keys(visible)
visible.pop("__is_set", None)
cleaned = config._remove_private_keys(visible)
return "\n" + yaml.dump(cleaned, sort_keys=False)

def copy(self) -> "config":
Expand Down
6 changes: 6 additions & 0 deletions scripts/environments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ There are quite a few Python libraries that are not yet compatible with Apple M
```bash
conda env list
```

4. Install bittensor (without dependencies):
```bash
conda activate bittensor # activate the env
pip install --no-deps bittensor # install bittensor
```
92 changes: 50 additions & 42 deletions scripts/environments/apple_m1_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- backcall=0.2.0=pyh9f0ad1d_0
- backports=1.0=pyhd8ed1ab_3
- backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
- black=23.7.0=py310hbe9552e_1
- beautifulsoup4=4.12.2=pyha770c72_0
- bleach=6.0.0=pyhd8ed1ab_0
- brotli=1.0.9=h1a8c8d9_8
Expand Down Expand Up @@ -77,12 +78,14 @@ dependencies:
- ptyprocess=0.7.0=pyhd3deb0d_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.21=pyhd8ed1ab_0
- pycryptodome=3.11.0=py310hb4a4851_1
- pycryptodome=3.19.0=py310hd71b1c6_1
- pygments=2.15.1=pyhd8ed1ab_0
- python-levenshtein=0.12.2=py310he2143c4_1
- pyobjc-core=9.1.1=py310h44ed3dd_0
- pyobjc-framework-cocoa=9.1.1=py310h44ed3dd_0
- pyrsistent=0.19.3=py310h8e9501a_0
- pysocks=1.7.1=pyha2e5f31_6
- pytest-asyncio=0.21.0=pyhd8ed1ab_0
- python=3.10.10=h3ba56d0_0_cpython
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python-json-logger=2.0.7=pyhd8ed1ab_0
Expand All @@ -105,6 +108,7 @@ dependencies:
- traitlets=5.9.0=pyhd8ed1ab_0
- typing_extensions=4.6.1=pyha770c72_0
- tzdata=2023c=h71feb2d_0
- uvicorn=0.22.0=py310hbe9552e_0
- wcwidth=0.2.6=pyhd8ed1ab_0
- xz=5.2.6=h57fd34a_0
- yaml=0.2.5=h3422bc3_2
Expand All @@ -113,11 +117,11 @@ dependencies:
- zlib=1.2.13=h03a7124_4
- pip:
- addict==2.4.0
- aiohttp==3.8.4
- aiohttp==3.8.5
- aiosignal==1.3.1
- altair==4.2.2
- ansible==7.5.0
- ansible-core==2.14.5
- ansible==6.7.0
- ansible-core==2.13.7
- ansible-vault==2.1.0
- appdirs==1.4.4
- argparse==1.4.0
Expand All @@ -126,55 +130,58 @@ dependencies:
- backoff==2.1.0
- blinker==1.6.2
- cachetools==4.2.4
- certifi==2020.11.8
- cfgv==3.3.1
- certifi==2023.7.22
- cfgv==3.4.0
- chardet==3.0.4
- click==8.1.3
- commonmark==0.9.1
- cryptography==39.0.0
- cytoolz==0.12.1
- dataclasses-json==0.5.7
- cryptography==41.0.3
- cytoolz==0.12.2
- dataclasses-json==0.5.13
- ddt==1.6.0
- dill==0.3.6
- distlib==0.3.6
- distlib==0.3.7
- docker-pycreds==0.4.0
- ecdsa==0.18.0
- eth-hash==0.5.1
- eth-hash==0.5.2
- eth-keys==0.4.0
- eth-typing==3.3.0
- eth-utils==2.1.0
- exceptiongroup==1.1.1
- filelock==3.12.0
- eth-typing==3.4.0
- eth-utils==2.2.0
- exceptiongroup==1.1.2
- fastapi==0.99.1
- filelock==3.12.2
- fqdn==1.5.1
- frozenlist==1.3.3
- fsspec==2023.5.0
- frozenlist==1.4.0
- fsspec==2023.6.0
- fuzzywuzzy==0.18.0
- gitdb==4.0.10
- gitpython==3.1.31
- gitpython==3.1.32
- google-api-core==1.34.0
- google-api-python-client==2.7.0
- google-auth==1.35.0
- google-auth-httplib2==0.1.0
- googleapis-common-protos==1.59.0
- grpcio-tools==1.42.0
- httplib2==0.22.0
- huggingface-hub==0.14.1
- huggingface-hub==0.16.4
- hypothesis==6.47.4
- identify==2.5.24
- ipykernel==6.23.0
- identify==2.5.26
- ipykernel==6.26.0
- ipython-genutils==0.2.0
- ipywidgets==8.0.6
- isoduration==20.11.0
- jinja2==3.0.0
- jinja2==3.1.2
- joblib==1.2.0
- jsonpointer==2.3
- jupyter==1.0.0
- jupyter-console==6.6.3
- jupyterlab-widgets==3.0.7
- loguru==0.6.0
- loguru==0.7.0
- markupsafe==2.0.1
- marshmallow==3.19.0
- marshmallow-enum==1.5.1
- more-itertools==9.1.0
- more-itertools==10.0.0
- msgpack-numpy-opentensor==0.5.0
- multidict==6.0.4
- multiprocess==0.70.14
- munch==2.5.0
Expand All @@ -188,11 +195,10 @@ dependencies:
- notebook==6.5.4
- numexpr==2.8.4
- openapi-schema-pydantic==1.2.4
- openvalidators==1.0.1
- password-strength==0.0.3.post2
- pathtools==0.1.2
- pillow==9.5.0
- platformdirs==3.5.0
- pillow==10.1.0
- platformdirs==3.10.0
- plotly==5.14.1
- pre-commit==3.3.2
- prometheus-client==0.14.1
Expand All @@ -202,20 +208,21 @@ dependencies:
- py-ed25519-bindings==1.0.2
- py-ed25519-zebra-bindings==1.0.1
- py-sr25519-bindings==0.2.0
- pyarrow==12.0.0
- pyarrow==12.0.1
- pyasn1==0.5.0
- pyasn1-modules==0.3.0
- pydantic==1.10.7
- pydantic==1.10.12
- pydeck==0.8.1b0
- pyinstrument==4.4.0
- pympler==1.0.1
- pynacl==1.5.0
- pyparsing==3.0.9
- pyparsing==3.1.1
- pytest==7.4.0
- qqdm==0.0.7
- qtconsole==5.4.3
- qtpy==2.3.1
- regex==2023.5.5
- requests==2.25.0
- regex==2023.6.3
- requests==2.31.0
- resolvelib==0.8.1
- responses==0.18.0
- retry==0.9.2
Expand All @@ -224,25 +231,26 @@ dependencies:
- scalecodec==1.2.0
- scikit-learn==1.2.2
- scipy==1.10.1
- sentencepiece==0.1.97
- sentry-sdk==1.22.2
- sentencepiece==0.1.99
- sentry-sdk==1.28.1
- setproctitle==1.3.2
- shortuuid==1.0.11
- smmap==5.0.0
- sortedcontainers==2.4.0
- soupsieve==2.4.1
- sqlalchemy==2.0.12
- sqlalchemy==2.0.19
- starlette==0.27.0
- streamlit==1.22.0
- substrate-interface==1.5.0
- tenacity==8.2.2
- termcolor==2.1.1
- threadpoolctl==3.1.0
- tokenizers==0.12.1
- tokenizers==0.13.3
- toml==0.10.2
- toolz==0.12.0
- torch==1.13.1
- torchvision==0.14.1
- tornado==6.3.1
- torch==2.0.1
- torchvision==0.15.2
- tornado==6.3.3
- tqdm==4.64.1
- typing-extensions==4.5.0
- typing-inspect==0.8.0
Expand All @@ -251,11 +259,11 @@ dependencies:
- uritemplate==3.0.1
- urllib3==1.26.15
- validators==0.20.0
- virtualenv==20.23.0
- wandb==0.15.3
- virtualenv==20.24.3
- wandb==0.15.10
- webcolors==1.13
- webencodings==0.5.1
- websocket-client==1.5.1
- websocket-client==1.6.1
- wheel==0.37.1
- widgetsnbextension==4.0.7
- xxhash==3.2.0
Expand Down