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

Move to space-pussy #1

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Opentensor
Copyright © 2024 cyber~Congress

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
<picture>
<source srcset="./assets/macrocosmos-white.png" media="(prefers-color-scheme: dark)">
<img src="macrocosmos-white.png">
</picture>
# Welcome to Game of Tensors

<picture>
<source srcset="./assets/macrocosmos-black.png" media="(prefers-color-scheme: light)">
<img src="macrocosmos-black.png">
</picture>
#### You can participate in the Game of Tensors by running a miner or a validator on the Cybertensor network launched on Space Pussy blockchain.

<div align="center">
- [Machine Learning Verse on SpacePussy](https://spacepussy.ai/cyberver/verses/pussy/ml/faculties)
- [Prompting subnet on SpacePussy](https://spacepussy.ai/cyberver/verses/pussy/ml/faculties/2)

# **Bittensor SN1** <!-- omit in toc -->
[![Discord Chat](https://img.shields.io/discord/308323056592486420.svg)](https://discord.gg/bittensor)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
## Launch validator:
```bash
python3 neurons/validator.py --netuid 2 --wallet.name=wallet_name --wallet.hotkey=default --cwtensor.network=space-pussy --axon.port=9000 --logging.logging_dir=validator_logs --logging.record_log --logging.debug --neuron.device=cuda --torch_dtype=torch.float16 --neuron.llm_max_allowed_memory_in_gb=14 --neuron.model_id=casperhansen/llama-3-8b-instruct-awq --wandb.off
```

## Launch miner:
```bash
python3 neurons/miners/huggingface/miner.py --netuid 2 --wallet.name=wallet_name --wallet.hotkey=default --cwtensor.network=space-pussy --axon.port=7000 --logging.logging_dir=miner_logs --logging.record_log --logging.debug --neuron.device=cuda --torch_dtype=torch.float16 --neuron.llm_max_allowed_memory_in_gb=8 --neuron.model_id=casperhansen/llama-3-8b-instruct-awq --wandb.off
```

---

### The Incentivized Internet <!-- omit in toc -->
## Notes
```bash
# activate venv
. venv/bin/activate

[Discord](https://discord.gg/bittensor) • [Network](https://taostats.io/) • [Research](https://bittensor.com/whitepaper)
# install requirements
pip3 install -e .

</div>
# if you have errors
pip3 uninstall uvloop -y
```

---

This repository is the **official codebase for Bittensor Subnet 1 (SN1) v1.0.0+, which was released on 22nd January 2024**. To learn more about the Bittensor project and the underlying mechanics, [read here.](https://docs.bittensor.com/).
This repository is the official codebase for Cybertensor Subnet 1 (SN1) which is fork of Bittensor Subneet 1 (SN1). To learn more about the Cybertensor project and the underlying mechanics, [read here](https://docs.spacepussy.ai/).

# Introduction

Expand Down Expand Up @@ -58,10 +64,10 @@ You can use the following command to run a miner or a validator.
```bash
python <SCRIPT_PATH>
--netuid 1
--subtensor.network <finney/local/test>
--cwtensor.network <finney/local/test>
--neuron.device cuda
--wallet.name <your wallet> # Must be created using the bittensor-cli
--wallet.hotkey <your hotkey> # Must be created using the bittensor-cli
--wallet.name <your wallet> # Must be created using the cybertensor-cli
--wallet.hotkey <your hotkey> # Must be created using the cybertensor-cli
--logging.debug # Run in debug mode, alternatively --logging.trace for trace mode
--axon.port # VERY IMPORTANT: set the port to be one of the open TCP ports on your machine
```
Expand All @@ -77,27 +83,21 @@ For ease of use, you can run the scripts as well with PM2. Installation of PM2 i
sudo apt update && sudo apt install jq && sudo apt install npm && sudo npm install pm2 -g && pm2 update
```

Example of running a SOLAR miner:
```bash
pm2 start neurons/miners/huggingface/miner.py --interpreter python3 --name solar_miner -- --netuid 1 --subtensor.network finney --wallet.name my_wallet --wallet.hotkey m1 --neuron.model_id casperhansen/llama-3-70b-instruct-awq --axon.port 21988 --logging.debug
```

# 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**.

In order to run on testnet, you will need to go through the same hotkey registration proceure as on main, but using **testtao**. You will need to ask for some in the community discord if you do not have any.

To run:
Example of running a miner:

```bash
pm2 start neurons/miners/huggingface/miner.py --interpreter python3 --name solar_miner -- --netuid 61 --subtensor.network test --wallet.name my_test_wallet --wallet.hotkey m1 --neuron.model_id casperhansen/llama-3-70b-instruct-awq --axon.port 21988 --logging.debug
python neurons/miners/huggingface/miner.py --netuid 1 --wallet.name=miner --wallet.hotkey=default --cwtensor.network=space-pussy --axon.port=10000 --logging.logging_dir=validator_logs --logging.record_log --logging.trace --neuron.device=cuda --neuron.model_id=casperhansen/llama-3-8b-instruct-awq
```
or
```bash
pm2 start neurons/miners/huggingface/miner.py --interpreter=python3 --name=miner -- --netuid=1 --wallet.name=miner --wallet.hotkey=default --cwtensor.network==space-pussy --axon.port=10000 --logging.logging_dir=validator_logs --logging.record_log --neuron.model_id=casperhansen/llama-3-8b-instruct-awq --logging.debug
```

# Limitations
> Important: vLLM currently faces a [notable limitation](https://github.com/vllm-project/vllm/issues/3012) in designating a specific GPU for model execution via code. Consequently, to employ a particular CUDA device for your model's operations, it's necessary to manually adjust your environment variable `CUDA_VISIBLE_DEVICES`. For instance, setting `export CUDA_VISIBLE_DEVICES=1,2` will explicitly define the CUDA devices available for use.

# Resources
The archiecture and methodology of SN1 is complex, and as such we have created a comprehensive resource to outline our design. Furthermore, we have strict requirements for how miners should interact with the network. Below are the currently available resources for additional information:
The architecture and methodology of SN1 is complex, and as such we have created a comprehensive resource to outline our design. Furthermore, we have strict requirements for how miners should interact with the network. Below are the currently available resources for additional information:

1. [SN1 architecture details](docs/SN1_validation.md)
2. [StreamMiner requirements](docs/stream_miner_template.md)
2 changes: 1 addition & 1 deletion contrib/CODE_REVIEW_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ higher in terms of discussion and peer review requirements, keeping in mind that
mistakes could be very costly to the wider community. This includes refactoring
of consensus-critical code.

Where a patch set proposes to change the Bittensor consensus, it must have been
Where a patch set proposes to change the Cybertensor consensus, it must have been
discussed extensively on the discord server and other channels, be accompanied by a widely
discussed BIP and have a generally widely perceived technical consensus of being
a worthwhile change based on the judgement of the maintainers.
Expand Down
26 changes: 13 additions & 13 deletions contrib/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Bittensor Subnet Development
# Contributing to Cybertensor Subnet Development

The following is a set of guidelines for contributing to the Bittensor ecosystem. These are **HIGHLY RECOMMENDED** guidelines, but not hard-and-fast rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
The following is a set of guidelines for contributing to the Cybertensor ecosystem. These are **HIGHLY RECOMMENDED** guidelines, but not hard-and-fast rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

## Table Of Contents
1. [How Can I Contribute?](#how-can-i-contribute)
Expand All @@ -19,9 +19,9 @@ The following is a set of guidelines for contributing to the Bittensor ecosystem
We welcome community contributions. Please make an issue or a PR if you encounter any issues or want to make suggested improvements.

## Communication Channels
You can reach out to the SN1 team on the offical bittensor discord channel [here](https://discord.com/channels/799672011265015819/1161764867166961704).
You can reach out to the SN1 team on the offical cybertensor discord channel [here]().

> Please follow the Bittensor Subnet [style guide](./STYLE.md) regardless of your contribution type.
> Please follow the Cybertensor Subnet [style guide](./STYLE.md) regardless of your contribution type.

Here is a high-level summary:
- Code consistency is crucial; adhere to established programming language conventions.
Expand All @@ -40,7 +40,7 @@ Here is a high-level summary:

### Code Contribution General Guidelines

> Review the Bittensor Subnet [style guide](./STYLE.md) and [development workflow](./DEVELOPMENT_WORKFLOW.md) before contributing.
> Review the Cybertensor Subnet [style guide](./STYLE.md) and [development workflow](./DEVELOPMENT_WORKFLOW.md) before contributing.


#### Pull Request Philosophy
Expand Down Expand Up @@ -99,7 +99,7 @@ After you submit a pull request, it will be reviewed by the maintainers. They ma
> Note: Be sure to merge the latest from "upstream" before making a pull request:

```bash
git remote add upstream https://github.com/opentensor/bittensor.git # TODO(developer): replace with your repo URL
git remote add upstream https://github.com/cybercongress/cybertensor.git # TODO(developer): replace with your repo URL
git fetch upstream
git merge upstream/<your-branch-name>
git push origin <your-branch-name>
Expand Down Expand Up @@ -166,28 +166,28 @@ Please track bugs as GitHub issues.
Explain the problem and include additional details to help maintainers reproduce the problem:

* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started the application, e.g. which command exactly you used in the terminal, or how you started Bittensor otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you ran with a set of custom configs, explain if you used a config file or command line arguments.
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started the application, e.g. which command exactly you used in the terminal, or how you started Cybertensor otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you ran with a set of custom configs, explain if you used a config file or command line arguments.
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
* **Explain which behavior you expected to see instead and why.**
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
* **If you're reporting that Bittensor crashed**, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in `Console.app` under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), or put it in a [gist](https://gist.github.com/) and provide link to that gist.
* **If you're reporting that Cybertensor crashed**, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in `Console.app` under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), or put it in a [gist](https://gist.github.com/) and provide link to that gist.
* **If the problem is related to performance or memory**, include a CPU profile capture with your report, if you're using a GPU then include a GPU profile capture as well. Look into the [PyTorch Profiler](https://pytorch.org/tutorials/recipes/recipes/profiler_recipe.html) to look at memory usage of your model.
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.

Provide more context by answering these questions:

* **Did the problem start happening recently** (e.g. after updating to a new version) or was this always a problem?
* If the problem started happening recently, **can you reproduce the problem in an older version of Bittensor?**
* If the problem started happening recently, **can you reproduce the problem in an older version of Cybertensor?**
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.

Include details about your configuration and environment:

* **Which version of Bittensor Subnet are you using?**
* **Which version of Cybertensor Subnet are you using?**
* **What commit hash are you on?** You can get the exact commit hash by checking `git log` and pasting the full commit hash.
* **What's the name and version of the OS you're using**?
* **Are you running Bittensor Subnet in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
* **Are you running Bittensor Subnet in a dockerized container?** If so, have you made sure that your docker container contains your latest changes and is up to date with Master branch?
* **Are you running Cybertensor Subnet in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
* **Are you running Cybertensor Subnet in a dockerized container?** If so, have you made sure that your docker container contains your latest changes and is up to date with Master branch?

### Suggesting Enhancements and Features

Expand All @@ -210,4 +210,4 @@ When you are creating an enhancement suggestion, please [include as many details
* **List some other text editors or applications where this enhancement exists.**
* **Specify the name and version of the OS you're using.**

Thank you for considering contributing to Bittensor! Any help is greatly appreciated along this journey to incentivize open and permissionless intelligence.
Thank you for considering contributing to Cybertensor! Any help is greatly appreciated along this journey to incentivize open and permissionless intelligence.
22 changes: 11 additions & 11 deletions contrib/DEVELOPMENT_WORKFLOW.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Bittensor Subnet Development Workflow
# Cybertensor Subnet Development Workflow

This is a highly advisable workflow to follow to keep your subtensor project organized and foster ease of contribution.
This is a highly advisable workflow to follow to keep your project organized and foster ease of contribution.

## Table of contents

- [Bittensor Subnet Development Workflow](#bittensor-subnet-development-workflow)
- [Cybertensor Subnet Development Workflow](#cybertensor-subnet-development-workflow)
- [Main Branches](#main-branches)
- [Development Model](#development-model)
- [Feature Branches](#feature-branches)
Expand All @@ -23,13 +23,13 @@ This is a highly advisable workflow to follow to keep your subtensor project org

## Main Branches

Bittensor's codebase consists of two main branches: **main** and **staging**.
Cybertensor's codebase consists of two main branches: **main** and **staging**.

**main**
- This is Bittensor's live production branch, which should only be updated by the core development team. This branch is protected, so refrain from pushing or merging into it unless authorized.
- This is Cybertensor's live production branch, which should only be updated by the core development team. This branch is protected, so refrain from pushing or merging into it unless authorized.

**staging**
- This branch is continuously updated and is where you propose and merge changes. It's essentially Bittensor's active development branch.
- This branch is continuously updated and is where you propose and merge changes. It's essentially Cybertensor's active development branch.

## Development Model

Expand Down Expand Up @@ -92,7 +92,7 @@ So, what you have to keep in mind is:

#### Finishing a Release Branch

This involves releasing stable code and generating a new version for bittensor.
This involves releasing stable code and generating a new version for Cybertensor.

1. Switch branch to main: `git checkout main`
2. Merge release branch into main: `git merge --no-ff release/3.4.0/optional-descriptive-message`
Expand Down Expand Up @@ -139,7 +139,7 @@ Continuous Integration (CI) is a software development practice where members of

Continuous Deployment (CD) is a software engineering approach in which software functionalities are delivered frequently through automated deployments.

- **CircleCI job**: Create jobs in CircleCI to automate the merging of staging into main and release version (needed to release code) and building and testing Bittensor (needed to merge PRs).
- **CircleCI job**: Create jobs in CircleCI to automate the merging of staging into main and release version (needed to release code) and building and testing Cybertensor (needed to merge PRs).

> It is highly recommended to set up your own circleci pipeline with your subnet

Expand All @@ -151,7 +151,7 @@ Release notes provide documentation for each version released to the users, high

## Pending Tasks

Follow these steps when you are contributing to the bittensor subnet:
Follow these steps when you are contributing to the cybertensor subnet:

- Determine if main and staging are different
- Determine what is in staging that is not merged yet
Expand All @@ -160,6 +160,6 @@ Follow these steps when you are contributing to the bittensor subnet:
- When merged into main, generate GitHub release and release notes.
- CircleCI jobs
- Merge staging into main and release version (needed to release code)
- Build and Test Bittensor (needed to merge PRs)
- Build and Test Cybertensor (needed to merge PRs)

This document can be improved as the Bittensor project continues to develop and change.
This document can be improved as the Cybertensor project continues to develop and change.
Loading