Skip to content

Commit

Permalink
Merge main into revolution (#1469)
Browse files Browse the repository at this point in the history
* (un)Staking multiple avoid tx limit (#1244)

* add tx rate limit

* wait for tx limit if not done multi stake/unstake

* dont "decrypt" hotkey

* Grab delegates details from GitHub (#1245)

* add url to init

* add dataclass and util functions

* use in cli

* remove delegates json

---------

Co-authored-by: joeylegere <joeylegere@gmail.com>

* Fix list_delegates on non-archive nodes (#1232)

* Change how pull of archival data is handled

* fix for list_delegates too

* .

* use empty dict

* fix spacing

* specify exception

* log out

* add space in log message

* use warning instead

* Improve development workflow documentation

* Update DEVELOPMENT_WORKFLOW.md

* (un)Staking multiple avoid tx limit (#1244)

* add tx rate limit

* wait for tx limit if not done multi stake/unstake

* dont "decrypt" hotkey

* Grab delegates details from GitHub (#1245)

* add url to init

* add dataclass and util functions

* use in cli

* remove delegates json

---------

Co-authored-by: joeylegere <joeylegere@gmail.com>

* Fix list_delegates on non-archive nodes (#1232)

* Change how pull of archival data is handled

* fix for list_delegates too

* .

* use empty dict

* fix spacing

* specify exception

* log out

* add space in log message

* use warning instead

* Improve development workflow documentation

* Update DEVELOPMENT_WORKFLOW.md

* progress on fix mock subtensor

rename test files for discovery

catch nonce errors

skip long tests

test durations

group cli tests to same runner

try group again

try to group tests using arg

patch start server

dont use groups and wait longer to teardown

dont kill

loadgroup

.

update durations

update durations

delay reruns

progress on new mock

more progress

add back mock init

create axons and prometheus

fix imports

add reset state

fix mock calls

fix setup

move some extr send to subtensor impl

move stake ext call

move unstake ext

add extr outline to mock sub

add ext bodies

fix type ann

return empty map on None

fix global state

* [BIT-351] Ask for wallet name on btcli unstake (#1387)

add not

* fix query map mock

* inc subnetN on mock reg

* add active to neuron on mock reg

* dont store balance in chainstate

* use dict comprehension

* don't print __is_set when displaying config

* use axon info from axon module

* set is set for Config in tests

* passes overview

* remove neurons, take out multiforward Synapse

* take out _neuron, these are in openminers & openvalidators now

* cleanup dendrite multi_forward

* missed MultiForward class in dendrite

* fix tests

* dont skip

* return data free of balance

* return proper types

* no nonces

* use same format for balances

* allow block for is delegate

* fix nominate

* fix nominate again :)

* fix typehint and return value==None

* fix total stake tracking

* nominate passes

* fix state for ismember and totalstake

* not returning last part of tuple

* oops, dont pass self twice

* return null neuron

* get mock block hash

* add set diff mock

* fix total issuance and balance

* add rate limit storage

* fix loop over nom

* fix some unit tests

* fix pow test

* fix get delegates mock

* fix typo

* typo again

* remove assert on err

* typo on storage

* spacing

* BlocksSinceLastStep instead

* fix list subnets

* dont skip

* add is set map

* fix patch

* setup mock net 3

* add a do_prometheus serve func

* add to mock

* remove unused examples

* update bittensor version into to current (510)

* fix prometheus test

* fix some staking tests

* fix transfer tests

* add do_set_weights

* add do_set_weights to mock

* use dsw in tests

* use == true

* use == True

* add do_serve_axon

* use typeddict

* add do serve axon mock

* add _ to subtensor.do_*  methods

* add _subtensor.types

* fix circular import

* fix mock get_balances

* return uid in mock

* run setup for tests with mock sub

* use mock sub for tests

* all subtensor tests pass

* fix mock with underscore

* nominators mock should be list tuple not dict

* fix duplicate setup

* Update README.md

fix typo

* Fix integration test

* remove multiforward from synapse (missed before)

* remove hotkey from proto and dendrite

* Weight Utils fix (#1372)

When Torch sets zeros or ones, it does this on the CPU. The metagraph is loaded on GPU. This results in errors—proposed fix.

* Extract config to new package (#1401)

* integrate openconfig progess

* add type or suppress for argparse

* use for problematic types

* fix type hints

* move test under testcase class

* move tests under testcase class

* add test for btcli with empty arguments on every command

* remove unneeded setup from test

* remove type or suppress from int

* remove to defaults test

* use dot get for prefix check

* move tests to config repo

* fix test by passing argv=[]

* use new package name

* fix name of openconfig package

* Extract wallet (#1403)

* integrate openconfig progess

* add type or suppress for argparse

* use for problematic types

* fix type hints

* move test under testcase class

* move tests under testcase class

* add test for btcli with empty arguments on every command

* remove unneeded setup from test

* remove type or suppress from int

* remove to defaults test

* use dot get for prefix check

* move test to package

* move wallet mock

* move some utils to package

* move wallet to package

* move reregister to registration utils

* add mocks

* move keyfile to package

* move test to utils tests

* use different naming

* fix import

* change function name and use kwargs

* modify naming

* add is_hotkey_registered

* use new function

* fix patch

* arg is cuda (typo)

* specify reregister true

* use generate wallet

* get mock wallet during tests

* extract get ss58 format util

* remove _mock arg

* extract tests

* import from base

* use subtensor for get_balance

* use new hotkey during test

* fix mocking

* add new packages to reqs file

* use new package naming

* bump wallet dep

* BTCli integration with new governance protocol (#1398)

* Begin senate cli

* Add helper functions to subtensor object for query_module, query_module_map

* Remove unused senate helpers

* Rename SenateCommand -> ProposalsCommand

* Remove unused proposals info datatype

* Add proposals data in rich table

* Clarify + beautify calldata column

* Add SenateRegisterCommand

* Add helper function wallet.is_senate_member

* Add subtensor *_senate extrinsics, is_senate_member, get_vote_data impl

* Use helper function to check senate membership

* Add command to view senate members

* Use get_vote_data helper and refactor call data formatting for recursion

* Add senate_vote and senate_leave cmd classes

* Add membership check in senate_register command

* Add senate_leave, senate_vote extrinsic functions

* Import senate_leave, senate_vote extrinsic functions in subtensor_impl

* Add senate, proposal_votes, senate_leave, senate_vote cmds to cli

* Move closure helper funcs to main scope, add display_votes helper

* Add senate size and active proposals metric, vote overview and nice names

* Add delegate nice-name support to proposal_votes

* Use coldkey for senate actions instead of hotkey

* Reverting unnecessary commits for next release. (#1415)

* Reverting unnecessary commits for next release.

* fix missed conflict

---------

Co-authored-by: ifrit98 <ifrit98@gmail.com>

* fix merge conflict

* fix dockerignore

* Use delegate nice-names in senate view

* use new regex for test

* make test assertion more verbose

* add to config for test

* bump version

* create api calls for senate info

* add block optional to is senate member

* prefer using subtensor api

* use new api calls

* dont sync metagraph on neuron init

* remove multiforwad

* fix error calling metagraph from subtensor without passing (#1426)

* fix error calling metagraph from subtensor without passing

* Update bittensor/_subtensor/subtensor_impl.py

Co-authored-by: Cameron Fairchild <cameron@opentensor.dev>

---------

Co-authored-by: Cameron Fairchild <cameron@opentensor.dev>

* Fix docker and pypi upload commands (#1375)

Co-authored-by: philanthrope <stgeorgejas@gmail.com>

* Fix cli ask for wallet hotkey name (#1430)

* check if NOT hotkey set

* add test for stake and unstake

* remove unneeded import

* add tests for delegate and undelegate

* add tests for delegate ss58 arg

* always sync metagraph during subtensor.metagraph

* derp

* remove unused HelpCommand class for miners/validators

* update changelog from running add_notes_changelog.sh

* fix script for the changelog

* add changelog

* Update scripts/release/github_utils.sh

* add weights call to subtensor (#1436)

* add weights call to subtensor

* add bonds call

* use bonds and weights calls for sync

* move into neurons

* fix type hints

* move func to chain data

* use new funcs in meta init

* fix kwarg name

* Revert "use new funcs in meta init"

This reverts commit 955e671.

* update dockerignore file (#1428)

* update dockerignore file

* add newline

* fix function name in script

* add new changelog additions

* update changelog again

* make minor release

* remove wallet impl

* use reregister from utils

* add arg for base miner reregister

* fix mock return values

* fix return format to use Tuple

* raise -> return

* Revert "fix return format to use Tuple"

This reverts commit 0252fcc.

* Revert "fix mock return values"

This reverts commit 2df31eb.

* raise correct errors in mock

* return tuples for do server

* move mocks to bt_wallet package (#1441)

* bump bittensor-wallet req, update cryptography security req

* Fixes #1442

* adds black formatting to release branch and circleCI check for format

* Btlm miner (#1463)

* BTLM initial commit

* Fixed up the BTLM to run on GPU and on Bittensor network

* Added missing trust_remote_code for now as we trust Cerebras

---------

Co-authored-by: Ala Shaabana <ala@bittensor.com>

* Don't finalize set_weights ext (#1461)

* pass wait_for_* params to call

* format

* format neuron

---------

Co-authored-by: philanthrope <stgeorgejas@gmail.com>

* bump version

* Faster overview pull (#1464)

* first rev faster pull

* use process pool instead

* Contrib revamp (#1456)

* revamp contrib and add more details

* mention miners/validators and address feedback

* update links for templates

* reword PR template section making CI checks passing REQUIRED

* use commit hash instead of version for representative tagging

* add link to commit rule examples section

* add interactive rebase and fixup mentions/examples

* add tooling mentions, move rebase -i/--fixup to bottom

* remove line referencing github actions

* update github ISSUE_TEMPLATEs

* add short description of miners and validtors

* add black format check to circleCI

* exclude /env

* update debug to be more relevant, add tricks

* address feedback RE PR steps and dev workflow

* update style guide to resolve tension between atomic commits and squashing

* fix torch typehint on some neurons BT-1329 (#1460)

* add changelog

* use double quotes for code because blackfmt

* dont need this orb

* add black format

* no neurons in this repo !!!

* rerun black

* rerun black

* fix casing on mock

---------

Co-authored-by: joeylegere <joeylegere@gmail.com>
Co-authored-by: “quac88” <“mac2@thrasher.com”>
Co-authored-by: philanthrope <stgeorgejas@gmail.com>
Co-authored-by: ifrit98 <ifrit98@gmail.com>
Co-authored-by: Mostima <91517378+mostimasblunderbuss@users.noreply.github.com>
Co-authored-by: Julius ter Pelkwijk <1099127+mrseeker@users.noreply.github.com>
Co-authored-by: Ayden Brewer <dalegribble@riseup.net>
Co-authored-by: Eduardo García <garciaruiz.edu+github@gmail.com>
Co-authored-by: Ala Shaabana <shaabana@gmail.com>
Co-authored-by: Ala Shaabana <ala@bittensor.com>
  • Loading branch information
11 people authored Jul 27, 2023
1 parent c4d8cda commit 67d60c2
Show file tree
Hide file tree
Showing 48 changed files with 1,350 additions and 863 deletions.
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,42 @@ orbs:
# coveralls: coveralls/coveralls@1.0.6

jobs:
black:
resource_class: small
parameters:
python-version:
type: string
docker:
- image: cimg/python:<< parameters.python-version >>

steps:
- checkout

- restore_cache:
name: Restore cached black venv
keys:
- v1-pypi-py-black-<< parameters.python-version >>

- run:
name: Update & Activate black venv
command: |
python -m venv env/
. env/bin/activate
python -m pip install --upgrade pip
pip install black
- save_cache:
name: Save cached black venv
paths:
- "env/"
key: v1-pypi-py-black-<< parameters.python-version >>

- run:
name: Black format check
command: |
. env/bin/activate
python -m black --exclude '(env|venv|.eggs)' --check .
build-and-test:
resource_class: medium
parallelism: 2
Expand Down Expand Up @@ -168,6 +204,8 @@ jobs:
workflows:
pr-requirements:
jobs:
- black:
python-version: "3.8.12"
- build-and-test:
matrix:
parameters:
Expand Down
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Bug report
description: Create a report to help us improve
labels: [bug]
assignees: []

body:
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Run command '...'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false

- type: input
id: environment
attributes:
label: Environment
description: Please specify your OS and Distro, and Bittensor Version.
placeholder: "OS and Distro: [e.g. Linux Ubuntu, Linux Fedora, etc.], Bittensor Version [e.g. 22]"
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Feature request
description: Suggest an idea for this project
labels: [feature]
assignees: []

body:
- type: textarea
id: problem-description
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is.
placeholder: "Ex. I'm always frustrated when [...]"
validations:
required: true

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
118 changes: 62 additions & 56 deletions .github/PULL_REQUEST_TEMPLATE/bug_fix.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,62 @@
### Requirements for Contributing a Bug Fix

* Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* The pull request must only fix an existing bug. To contribute other changes, you must use a different template. You can see all templates at <https://github.com/opentensor/bittensor/tree/master/.github/PULL_REQUEST_TEMPLATE>.
* The pull request must update the test suite to demonstrate the changed functionality.
* After you create the pull request, all status checks must pass before a maintainer reviews your contribution. This means that all the tests must pass your pull request before a maintainer is tagged to review.

### Identify the Bug

<!--
Link to the issue describing the bug that you're fixing.
If there is not yet an issue for your bug, please open a new issue and then link to that issue in your pull request.
Note: In some cases, one person's "bug" is another person's "feature." If the pull request does not address an existing issue with the "bug" label, the maintainers have the final say on whether the current behavior is a bug.
-->

### Description of the Change

<!--
We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts.
-->


### Possible Drawbacks

<!-- What are the possible side-effects or negative impacts of the code change? -->

### Verification Process

<!--
What process did you follow to verify that the change has not introduced any regressions? Describe the actions you performed (including buttons you clicked, text you typed, commands you ran, etc.), and describe the results you observed.
-->

### Release Notes

<!--
Please describe the changes in a single line that explains this improvement in
terms that a user can understand. This text will be used in Atom's release notes.
If this change is not user-facing or notable enough to be included in release notes
you may use the strings "Not applicable" or "N/A" here.
Examples:
- The GitHub package now allows you to add co-authors to commits.
- Fixed an issue where multiple cursors did not work in a file with a single line.
- Increased the performance of searching and replacing across a whole project.
-->
name: Bug Fix Contribution
description: Use this template when contributing a bug fix.
labels: [bug, pull request]

body:
- type: markdown
attributes:
value: |
### Requirements for Contributing a Bug Fix

* Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* The pull request must only fix an existing bug. To contribute other changes, you must use a different template. You can see all templates at <https://github.com/atom/.github/tree/master/.github/PULL_REQUEST_TEMPLATE>.
* The pull request must update the test suite to demonstrate the changed functionality. For guidance, please see <https://flight-manual.atom.io/hacking-atom/sections/writing-specs/>.
* After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see <https://github.com/atom/.github/tree/master/CONTRIBUTING.md#pull-requests>.

- type: input
id: bug
attributes:
label: Identify the Bug
description: Link to the issue describing the bug that you're fixing.
validations:
required: true

- type: textarea
id: change
attributes:
label: Description of the Change
description: We must be able to understand the design of your change from this description.
validations:
required: true

- type: textarea
id: alternate
attributes:
label: Alternate Designs
description: Explain what other alternates were considered and why the proposed version was selected.
validations:
required: false

- type: textarea
id: drawbacks
attributes:
label: Possible Drawbacks
description: What are the possible side-effects or negative impacts of the code change?
validations:
required: false

- type: textarea
id: verification
attributes:
label: Verification Process
description: What process did you follow to verify that the change has not introduced any regressions?
validations:
required: true

- type: input
id: release-notes
attributes:
label: Release Notes
description: Please describe the changes in a single line that explains this improvement in terms that a user can understand.
validations:
required: true
16 changes: 10 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/feature_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@

* Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* The pull request must contribute a change that has been endorsed by the maintainer team. See details in the template below.
* The pull request must update the test suite to exercise the updated functionality.
* After you create the pull request, all status checks must pass before a maintainer reviews your contribution. This means that all the tests must pass your pull request before a maintainer is tagged to review.
* The pull request must update the test suite to exercise the updated functionality. For guidance, please see <https://flight-manual.atom.io/hacking-atom/sections/writing-specs/>.
* After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see <https://github.com/atom/.github/tree/master/CONTRIBUTING.md#pull-requests>.

### Issue Endorsed by Bittensor's Maintainers
### Issue or RFC Endorsed by Atom's Maintainers

<!--
Link to the issue that your change relates to.
Link to the issue or RFC that your change relates to. This must be one of the following:
To contribute an enhancement that isn't covered by one of the items above, please follow our guide for suggesting an enhancement: https://github.com/opentensor/bittensor/blob/master/CONTRIBUTING.md#suggesting-enhancements
* An open issue with the `help-wanted` label
* An open issue with the `triaged` label
* An RFC with "accepted" status
To contribute other changes, you must use a different template. You can see all templates at https://github.com/opentensor/bittensor/tree/master/.github/PULL_REQUEST_TEMPLATE.
To contribute an enhancement that isn't covered by one of the items above, please follow our guide for suggesting an enhancement: https://github.com/atom/.github/blob/master/CONTRIBUTING.md#suggesting-enhancements
To contribute other changes, you must use a different template. You can see all templates at https://github.com/atom/.github/tree/master/.github/PULL_REQUEST_TEMPLATE.
-->

Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/performance_improvement.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### Requirements for Contributing a Performance Improvement

* Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* The pull request must only affect performance of existing functionality. To contribute other changes, you must use a different template. You can see all templates at <https://github.com/opentensor/bittensor/tree/master/.github/PULL_REQUEST_TEMPLATE>.
* After you create the pull request, all status checks must pass before a maintainer reviews your contribution. This means that all the tests must pass your pull request before a maintainer is tagged to review.
* The pull request must only affect performance of existing functionality. To contribute other changes, you must use a different template. You can see all templates at <https://github.com/atom/.github/tree/master/.github/PULL_REQUEST_TEMPLATE>.
* After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see <https://github.com/atom/.github/tree/master/CONTRIBUTING.md#pull-requests>.

### Description of the Change

Expand All @@ -16,7 +16,7 @@ We must be able to understand the design of your change from this description. I

<!--
Describe the exact performance improvement observed (for example, reduced time to complete an operation, reduced memory use, model metrics improvements, etc.). Describe how you measured this change. Bonus points for including graphs that demonstrate the improvement or attached dumps from the built-in profiling tools. Using Tensorboard to show your improvements would be a great way to do this.
Describe the exact performance improvement observed (for example, reduced time to complete an operation, reduced memory use, etc.). Describe how you measured this change. Bonus points for including graphs that demonstrate the improvement or attached dumps from the built-in profiling tools.
-->

Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 5.3.2 / 2023-07-25

## What's Changed
* Btlm miner by @shibshib in https://github.com/opentensor/bittensor/pull/1463
* Don't finalize set_weights ext by @camfairchild in https://github.com/opentensor/bittensor/pull/1461
* Faster overview pull by @camfairchild in https://github.com/opentensor/bittensor/pull/1464
* Contrib revamp by @ifrit98 in https://github.com/opentensor/bittensor/pull/1456
* fix torch typehint on some neurons BT-1329 by @camfairchild in https://github.com/opentensor/bittensor/pull/1460
* bump bittensor-wallet version to 0.0.5

**Full Changelog**: https://github.com/opentensor/bittensor/compare/v5.3.1...v5.3.2


## 5.3.1 / 2023-07-06

<<<<<<< HEAD
Expand Down
Loading

0 comments on commit 67d60c2

Please sign in to comment.