From d8b9ef763247da300992d791faa569a3cd8bec87 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Wed, 19 Feb 2025 16:48:57 -0800 Subject: [PATCH 1/5] Bumps deps for btcli --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 521e94944..1080ed7ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ wheel async-property==0.2.2 -async-substrate-interface>=1.0.0 +async-substrate-interface>=1.0.2 aiohttp~=3.10.2 backoff~=2.2.1 GitPython>=3.0.0 @@ -16,7 +16,7 @@ rich~=13.7 scalecodec==1.2.11 typer~=0.12 websockets>=14.1 -bittensor-wallet>=3.0.3 +bittensor-wallet>=3.0.4 plotille pywry plotly \ No newline at end of file From 25c2acb27a7a7bf0559678baf535d5959827bf8d Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 20 Feb 2025 09:54:00 -0800 Subject: [PATCH 2/5] Bumps requirements --- bittensor_cli/cli.py | 11 +++++++++-- requirements.txt | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 35876070e..656eda6b7 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -1,8 +1,10 @@ #!/usr/bin/env python3 import asyncio +import cProfile import curses import importlib import os.path +import pstats import re import ssl import sys @@ -978,8 +980,13 @@ async def _run(): except Exception as e: # ensures we always exit cleanly if not isinstance(e, (typer.Exit, RuntimeError)): err_console.print(f"An unknown error has occurred: {e}") - - return self.asyncio_runner(_run()) + profiler = cProfile.Profile() + profiler.enable() + result = self.asyncio_runner(_run()) + profiler.disable() + stats = pstats.Stats(profiler).sort_stats('cumulative') + stats.print_stats(20) # Show top 20 time-consuming operations + return result def main_callback( self, diff --git a/requirements.txt b/requirements.txt index 1080ed7ed..7893040e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ wheel async-property==0.2.2 -async-substrate-interface>=1.0.2 +async-substrate-interface>=1.0.3 aiohttp~=3.10.2 backoff~=2.2.1 GitPython>=3.0.0 From 34ab9e5d00d3e7bfb4c78d08809d83057c95393b Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 20 Feb 2025 09:55:51 -0800 Subject: [PATCH 3/5] cleanup --- bittensor_cli/cli.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 656eda6b7..bf9672985 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -980,13 +980,8 @@ async def _run(): except Exception as e: # ensures we always exit cleanly if not isinstance(e, (typer.Exit, RuntimeError)): err_console.print(f"An unknown error has occurred: {e}") - profiler = cProfile.Profile() - profiler.enable() - result = self.asyncio_runner(_run()) - profiler.disable() - stats = pstats.Stats(profiler).sort_stats('cumulative') - stats.print_stats(20) # Show top 20 time-consuming operations - return result + + return self.asyncio_runner(_run()) def main_callback( self, From fa4008d65ee6e0f1097e17adf622b0716eb565de Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 20 Feb 2025 09:56:22 -0800 Subject: [PATCH 4/5] more cleanup --- bittensor_cli/cli.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index bf9672985..e144d0cb5 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -1,10 +1,8 @@ #!/usr/bin/env python3 import asyncio -import cProfile import curses import importlib import os.path -import pstats import re import ssl import sys From a962a1dc1ec2d53f629d20b5054175d0b8554cb6 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 20 Feb 2025 09:56:44 -0800 Subject: [PATCH 5/5] ruff --- bittensor_cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index e144d0cb5..35876070e 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -978,7 +978,7 @@ async def _run(): except Exception as e: # ensures we always exit cleanly if not isinstance(e, (typer.Exit, RuntimeError)): err_console.print(f"An unknown error has occurred: {e}") - + return self.asyncio_runner(_run()) def main_callback(