-
Notifications
You must be signed in to change notification settings - Fork 323
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
Release/8.3.0rc3 #2390
Open
ibraheem-opentensor
wants to merge
69
commits into
master
Choose a base branch
from
release/8.3.0rc3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Release/8.3.0rc3 #2390
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expands the type registry to include all the available options
Introducing a new subprocess for the commit-reveal mechanism alongside necessary utility functions. Also added end-to-end tests to ensure proper functionality of the new subprocess feature.
Replace hardcoded log file paths with constants for stdout and stderr log files. This improves code readability and maintainability by centralizing the log file paths. Removed redundant code that reads and prints the log files.
This commit introduces a check for whether commit-reveal is enabled before setting weights. If enabled, weights will be committed with a generated salt; otherwise, weights are set directly. Additionally, this commit adjusts the sleep interval for the subprocess and removes an unnecessary comment.
…th tests (#2352) * add `bittensor.core.subtensor.Subtensor.register`, `bittensor.core.subtensor.Subtensor.difficulty` and related staff with tests * remove commented code * update `_terminate_workers_and_wait_for_exit` by review
…le` and related extrinsics (#2359) * added to Subtensor: `burned_register`, `get_subnet_burn_cost`, `recycle` and related extrinsics * formatter * Update bittensor/core/extrinsics/registration.py Co-authored-by: Benjamin Himes <[email protected]> --------- Co-authored-by: Benjamin Himes <[email protected]>
Added an option for starting the commit reveal subprocess during the Subtensor initialization. Enhanced subprocess management and logging details to capture wallet and commit information more clearly. Streamlined error handling in set_weights module.
Enhanced the commit-reveal mechanism by adding a subprocess with sleep interval control, class-based handling in commit_reveal.py, and improved reveal checking. Adjusted tests and utils accordingly to ensure functionality and performance consistency.
Introduce a method to calculate the number of blocks remaining until the next epoch for a specific subnet. This addition aids in network governance and operational planning by providing essential timing information within the Bittensor blockchain.
Added the version_key parameter to function signatures across multiple files for better version tracking. Updated docstrings for enhanced clarity and consistency, improving code readability and maintainability.
* add `get_delegate_by_hotkey`, update `DelegateInfo` in chain data * add `root_register_extrinsic`, `set_root_weights_extrinsic` and related stuff * add `Subtensor.get_all_subnets_info` method and related stuff * add `Subtensor.get_delegate_take` method and tests * ruff * remove unused import
Introduced batch processing for weight reveal operations in the Bittensor network. This includes a new method `batch_reveal_weights` and necessary changes to accommodate batch transactions, ensuring efficiency and scalability. Additionally, the commit/reveal intervals were replaced with periods for more precise control.
Introduce a function to verify local reveal list consistency with the Subtensor chain every 100 iterations. Refactor `check_reveal` and `reveal_candidates` to improve clarity and extract logic for retrieving all commits. Update docstrings and handle logs for better readability and debugging.
Subprocess initialization is now disabled by default. Reorganized socket server code with ThreadPoolExecutor and improved error handling. Removed redundant return type annotations and added docstrings.
Renamed subprocess utility scripts from `/scripts` to `/bittensor/utils`. Updated import paths and refactored handling of subprocess logging by adding dynamic PID log management. Adjusted tests accordingly to reflect these changes.
Rearranged calls to 'convert_weights_and_uids_for_emit' to align with the logic flow across test_reveal_weights.py and set_weights.py. This ensures 'convert_weights_and_uids_for_emit' is invoked only in commit-reveal scenarios, enhancing code clarity and maintaining intended functionality.
Moved weight conversion and normalization steps into the beginning of the `set_weights` function, ensuring consistency between weight submission and commit operations. This update affects both the `set_weights` logic and its corresponding end-to-end tests.
Introduces a test to validate the commit-reveal mechanism for weights when the number of commits exceeds the limit. The test sets up a subnet, registers a neuron, and verifies behavior when attempting more than the allowed number of weight commits.
Added logic to conditionally start the commit reveal subprocess based on existing commits and introduced an expire block to manage commit object lifecycle. Updated tests and utilities to reflect these changes, ensuring proper subprocess and database handling.
Added 'max_retries' parameter to set_weights to handle retries. Updated commit log in commit_reveal to include commit_block. Also removed unnecessary part of the check_reveal function docstring for clarity.
Set `wait_for_inclusion` to `True` for weight commits, ensuring inclusion before proceeding. Added debug prints for commit hashes and blocks in the `subtensor` and `commit_reveal` modules to assist with troubleshooting and monitoring.
… subtensor + add revealed flag This commit adjusts the commit weights process by ensuring the commit_reveal subprocess starts appropriately, checking for its readiness, and syncing commit data. It also simplifies the test cases and enhances the subprocess logging mechanism.
Refactor the commit reveal process to only include candidates with a reveal block less than or equal to the current block. Also, remove unnecessary logging of received requests to improve code readability and reduce noise.
…alignment with commits Reduced the max_retries parameter to 1 in multiple methods to expedite failure recognition. Refactored inline substrate call compositions to use a more functional approach by passing the composed extrinsic directly into the retry wrapper, streamlining the code and improving readability.
…on check to subprocess. Updated references from 'commit_reveal_periods' to 'commit_reveal_weights_interval' across multiple files for consistency. Also casted float values explicitly for consistency in data types.
Corrected a typo from `conn.committed()` to `conn.commit()` in `subprocess_utils.py` to ensure proper database commit operations. Added a newline at the end of the file for consistency.
* create the copy of `bittensor/core/subtensor.py` with async suffix. * add async_substrate_interface.py * update `bittensor.utils.format_error_message` to be compatible with async_subtensor * update `bittensor.core.chain_data` * update `bittensor.core.async_subtensor.py` from btcli * add DelegatesDetails for async_subtensor * add validate_chain_endpoint for async_subtensor * update async_substrate_interface.py by Optional where acceptable and doesn't brake logic * improve settings for async_subtensor.py * fix format errors * fix annotations * add async_subtensor.py with adaptation to SDK (all methods checked and work well) * update settings.py to be compatible with async_extrinsics * add async_transfer extrinsic * add async_registration extrinsic * add async_root extrinsics * ruff * Update bittensor/core/extrinsics/async_transfer.py Co-authored-by: Benjamin Himes <[email protected]> * fix comments review * avoid non-direct import within inner code (fix circular import) * del unused code * update AsyncSubtensor (add methods, fix tests) * Update bittensor/core/async_subtensor.py Co-authored-by: Paweł Polewicz <[email protected]> * fix await properties and remove double format_error_message call * fix review comments * improve docstrings * fix --------- Co-authored-by: Benjamin Himes <[email protected]> Co-authored-by: Paweł Polewicz <[email protected]>
…prompt-from-sdk # Conflicts: # bittensor/core/async_subtensor.py # bittensor/core/extrinsics/async_root.py
Refactored the commit and reveal weight functions to simplify code, eliminate retry loops, and remove user prompts. The subprocess handling has been improved for better subprocess control, and utility functions have been moved to a new module.
Refactored the commit and reveal weight functions to simplify code, eliminate retry loops, and remove user prompts. The subprocess handling has been improved for better subprocess control, and utility functions have been moved to a new module.
…m-sdk Avoid using `prompt` in SDK
# Conflicts: # bittensor/core/extrinsics/commit_weights.py # bittensor/core/extrinsics/set_weights.py # bittensor/core/subtensor.py # tests/e2e_tests/test_commit_weights.py # tests/unit_tests/test_subtensor.py
Backmerge/8.2.0
ibraheem-opentensor
requested review from
roman-opentensor,
opendansor and
a team
November 5, 2024 20:32
roman-opentensor
previously approved these changes
Nov 5, 2024
ibraheem-opentensor
temporarily deployed
to
release
November 5, 2024 20:46
— with
GitHub Actions
Inactive
ibraheem-opentensor
dismissed
roman-opentensor’s stale review
November 13, 2024 22:18
The merge-base changed after approval.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
8.3.0rc3 /2024-11-05
What's Changed
Subtensor.register
,Subtensor.difficulty
and related staff with tests by @roman-opentensor in addSubtensor.register
,Subtensor.difficulty
and related staff with tests #2352burned_register
,get_subnet_burn_cost
,recycle
and related extrinsics by @roman-opentensor in added to Subtensor:burned_register
,get_subnet_burn_cost
,recycle
and related extrinsics #2359prompt
in SDK by @roman-opentensor in Avoid usingprompt
in SDK #2382