From 53ee6781142983ad5a71298cf00a7ad12c72719f Mon Sep 17 00:00:00 2001 From: p-ferreira Date: Wed, 5 Jun 2024 21:50:08 +0000 Subject: [PATCH 1/6] fix metagraph logging from torch implementation to np --- prompting/base/validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prompting/base/validator.py b/prompting/base/validator.py index 893bf2055..c70129021 100644 --- a/prompting/base/validator.py +++ b/prompting/base/validator.py @@ -239,13 +239,13 @@ def set_weights(self): raw_weights = torch.nn.functional.normalize(self.scores, p=1, dim=0) bt.logging.debug("raw_weights", raw_weights) - bt.logging.debug("raw_weight_uids", self.metagraph.uids.to("cpu")) + bt.logging.debug("raw_weight_uids", self.metagraph.uids) # Process the raw weights to final_weights via subtensor limitations. ( processed_weight_uids, processed_weights, ) = bt.utils.weight_utils.process_weights_for_netuid( - uids=self.metagraph.uids.to("cpu"), + uids=self.metagraph.uids, weights=raw_weights.to("cpu"), netuid=self.config.netuid, subtensor=self.subtensor, From 0f432e12c6a1183282d84b16e8f498f3ee6e17d5 Mon Sep 17 00:00:00 2001 From: bkb2135 Date: Wed, 5 Jun 2024 23:05:38 +0000 Subject: [PATCH 2/6] Cast raw weights to numpy --- prompting/base/validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompting/base/validator.py b/prompting/base/validator.py index c70129021..93240ad5b 100644 --- a/prompting/base/validator.py +++ b/prompting/base/validator.py @@ -246,7 +246,7 @@ def set_weights(self): processed_weights, ) = bt.utils.weight_utils.process_weights_for_netuid( uids=self.metagraph.uids, - weights=raw_weights.to("cpu"), + weights=raw_weights.to("cpu").numpy(), netuid=self.config.netuid, subtensor=self.subtensor, metagraph=self.metagraph, From 901db5eab3efed584be88a78f36439515b97ba50 Mon Sep 17 00:00:00 2001 From: bkb2135 Date: Wed, 5 Jun 2024 23:09:13 +0000 Subject: [PATCH 3/6] Increment Version Number --- prompting/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompting/__init__.py b/prompting/__init__.py index 643f4f1ac..3cccb49f1 100644 --- a/prompting/__init__.py +++ b/prompting/__init__.py @@ -16,7 +16,7 @@ # DEALINGS IN THE SOFTWARE. # Define the version of the template module. -__version__ = "2.4.0" +__version__ = "2.4.1" version_split = __version__.split(".") __spec_version__ = ( (10000 * int(version_split[0])) From 789c13e20286b2c70f7bd6885a56f3ec9da55b48 Mon Sep 17 00:00:00 2001 From: bkb2135 <98138173+bkb2135@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:15:41 -0400 Subject: [PATCH 4/6] Increase timeout to 17 seconds --- prompting/utils/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompting/utils/config.py b/prompting/utils/config.py index 4ffa0ddd4..a9382039c 100644 --- a/prompting/utils/config.py +++ b/prompting/utils/config.py @@ -307,7 +307,7 @@ def add_validator_args(cls, parser): "--neuron.timeout", type=float, help="The timeout for each forward call in seconds.", - default=10, + default=17, ) parser.add_argument( From 9967319a02d5f2c2250be2d239298a98e1b47ee0 Mon Sep 17 00:00:00 2001 From: bkb2135 <98138173+bkb2135@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:16:13 -0400 Subject: [PATCH 5/6] Increment Version Number --- prompting/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompting/__init__.py b/prompting/__init__.py index 3cccb49f1..65aed54ea 100644 --- a/prompting/__init__.py +++ b/prompting/__init__.py @@ -16,7 +16,7 @@ # DEALINGS IN THE SOFTWARE. # Define the version of the template module. -__version__ = "2.4.1" +__version__ = "2.4.2" version_split = __version__.split(".") __spec_version__ = ( (10000 * int(version_split[0])) From 0d7a57668826d89c3453316843482fbefa2b4433 Mon Sep 17 00:00:00 2001 From: p-ferreira <38992619+p-ferreira@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:13:28 -0400 Subject: [PATCH 6/6] brings back pm2 autorun command --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index f78fc33a1..75c85a466 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,15 @@ Example of running a Llama3 miner: pm2 start neurons/miners/huggingface/miner.py --interpreter python3 --name llama3_miner -- --netuid 1 --subtensor.network finney --wallet.name my_wallet --wallet.hotkey m1 --neuron.model_id casperhansen/llama-3-70b-instruct-awq --neuron.load_in_4bit True --axon.port 21988 --logging.debug ``` +## Running with autoupdate + +You can run the validator in auto-update mode by using pm2 along with the `run.sh` bash script. This command will initiate two pm2 processes: one for auto-update monitoring, named **s1_validator_update**, and another for running the validator itself, named **s1_validator_main_process**. +```bash +pm2 start run.sh --name s1_validator_autoupdate -- --wallet.name --wallet.hotkey +``` + +> Note: this is not an end solution, major releases or changes in requirements will still require you to manually restart the processes. Regularly monitor the health of your validator to ensure optimal performance. + # Testnet We highly recommend that you run your miners on testnet before deploying on main. This is give you an opportunity to debug your systems, and ensure that you will not lose valuable immunity time. The SN1 testnet is **netuid 61**.