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

Release/9.0.0rc6 #2663

Closed
wants to merge 114 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
2d9ac81
Update metagraph.py
leopardracer Jan 16, 2025
313521d
Release/8.5.2 (#2584)
ibraheem-opentensor Jan 17, 2025
a38c4bd
fix typos
Dimitrolito Jan 17, 2025
60370c9
fix spelling error
Dimitrolito Jan 17, 2025
2619478
Merge branch 'staging' into fix/spelling
thewhaleking Jan 18, 2025
6fa036f
Merge branch 'staging' into master
thewhaleking Jan 18, 2025
72dd8ad
Merge pull request #2580 from leopardracer/master
thewhaleking Jan 18, 2025
e398254
Merge branch 'staging' into fix/spelling
thewhaleking Jan 19, 2025
8d6afd8
Update synapse.py
crStiv Jan 19, 2025
900d66e
fix(2337): btlogging setLevel
zyzniewski-reef Jan 20, 2025
2a148ab
Merge branch 'staging' into fix/2337-btlogging_setLevel
roman-opentensor Jan 21, 2025
7ccb07d
Merge pull request #2588 from zyzniewski-reef/fix/2337-btlogging_setL…
zyzniewski-reef Jan 21, 2025
569d4be
fix(2188): don't allow uvicorn to reconfigure event_loop_policy
zyzniewski-reef Jan 21, 2025
733895c
perf: don't use 2 threads to start FastAPI server
zyzniewski-reef Jan 21, 2025
1b6c0e8
Merge pull request #2592 from zyzniewski-reef/perf/creating_fastapi_s…
thewhaleking Jan 21, 2025
20a8cdd
Merge branch 'staging' into fix
thewhaleking Jan 21, 2025
771bdcc
Merge branch 'staging' into fix/spelling
thewhaleking Jan 21, 2025
bc78bd6
Merge branch 'staging' into fix/2188-configure_uvicorn_event_loop
thewhaleking Jan 21, 2025
8db8d5a
Merge pull request #2591 from zyzniewski-reef/fix/2188-configure_uvic…
zyzniewski-reef Jan 21, 2025
48047c1
Merge branch 'staging' into fix/spelling
thewhaleking Jan 22, 2025
3562530
Merge branch 'staging' into fix
thewhaleking Jan 22, 2025
94749d2
Merge pull request #2586 from Dimitrolito/fix/spelling
thewhaleking Jan 22, 2025
12a7284
fix typo async_commit_reveal.py
Marcofann Jan 31, 2025
b8b8055
fix typo commit_reveal.py
Marcofann Jan 31, 2025
25259e9
fix typos weight_utils.py
Marcofann Jan 31, 2025
9b3d608
Update wallet creation commands
HudsonGraeme Jan 31, 2025
27eef20
Comment out invalid cli arguments
HudsonGraeme Jan 31, 2025
4d59acd
Update weight_utils.py
Marcofann Feb 1, 2025
4383a19
Merge branch 'staging' into fix/typos
Marcofann Feb 1, 2025
557219d
Bumps torch version
ibraheem-opentensor Feb 4, 2025
a4b3d5e
Updates artifacts version
ibraheem-opentensor Feb 4, 2025
a7819d1
Merge pull request #2623 from opentensor/bump/updates-torch
ibraheem-opentensor Feb 4, 2025
1a96aa9
Merge branch 'staging' into fix/typos
thewhaleking Feb 4, 2025
9919f6a
Merge pull request #2620 from Marcofann/fix/typos
thewhaleking Feb 4, 2025
c07ce1b
Merge branch 'staging' into master
HudsonGraeme Feb 4, 2025
229a11e
Merge pull request #2621 from inference-labs-inc/master
thewhaleking Feb 5, 2025
42032bc
Merge branch 'staging' into fix
roman-opentensor Feb 6, 2025
0337f08
tests: fix e2e
zyzniewski-reef Feb 6, 2025
f424ef2
revert fast-blocks
zyzniewski-reef Feb 6, 2025
ca82491
revert timeout
zyzniewski-reef Feb 6, 2025
a327ac5
install lib in noneditable mode
zyzniewski-reef Feb 6, 2025
9138b6d
give more time to Validator to process
zyzniewski-reef Feb 6, 2025
f00dd0d
fix incentive e2e test
zyzniewski-reef Feb 6, 2025
b65f04c
update weights_set_rate_limit for fast-blocks
zyzniewski-reef Feb 7, 2025
9ba20f0
don't mess with cwd
zyzniewski-reef Feb 7, 2025
1f92ff0
Revert "don't mess with cwd"
zyzniewski-reef Feb 7, 2025
35f45d0
remove unneeded chain calls
zyzniewski-reef Feb 7, 2025
251e4e1
adjust wait_interval for fast-blocks
zyzniewski-reef Feb 7, 2025
584615f
Increase subnet tempo so we have enought time to commit and reveal we…
zyzniewski-reef Feb 7, 2025
fac0c66
improve test_dendrite
zyzniewski-reef Feb 7, 2025
990453d
fix integration tests
roman-opentensor Feb 8, 2025
d9275ed
Merge pull request #2651 from opentensor/fix/roman/integration-tests
roman-opentensor Feb 8, 2025
1e17e11
Moves the closing of the new event loop in Dendrite.query to the clos…
thewhaleking Feb 10, 2025
a4f3d12
Add logging.
thewhaleking Feb 10, 2025
c944235
Ruff
thewhaleking Feb 10, 2025
f16ebee
Merge pull request #2587 from crStiv/fix
thewhaleking Feb 10, 2025
9661a37
Merge pull request #2654 from opentensor/fix/thewhaleking/dendrite-lo…
thewhaleking Feb 10, 2025
2c7548d
Updates CRV3 e2e test
ibraheem-opentensor Feb 10, 2025
bb54c81
Trigger CI
zyzniewski-reef Feb 10, 2025
42755fb
style: ruff formatting
zyzniewski-reef Feb 10, 2025
83d483d
add type hint
zyzniewski-reef Feb 10, 2025
0a46cbd
Merge pull request #2639 from opentensor/tests/zyzniewski/fix_e2e
roman-opentensor Feb 10, 2025
4d90b4b
move torch deps via setup.py
roman-opentensor Feb 10, 2025
356c712
bumping version in prod
roman-opentensor Feb 10, 2025
6d17860
Merge pull request #2655 from opentensor/feat/roman/deps
roman-opentensor Feb 10, 2025
642c4ec
Merge branch 'staging-pre-merge-new-async' into merge/roman/async-pre…
roman-opentensor Feb 10, 2025
098484f
update test_axon.py
roman-opentensor Feb 10, 2025
50ea4ab
update subtensor branch
roman-opentensor Feb 10, 2025
a13fed2
update subtensor branch
roman-opentensor Feb 10, 2025
9cc5ce5
Merge remote-tracking branch 'origin/merge/roman/async-pre-merge-new-…
roman-opentensor Feb 10, 2025
479ab0d
fix test
roman-opentensor Feb 11, 2025
82e3734
increase waiting time
roman-opentensor Feb 11, 2025
bc0a478
add name and symbol fields to metagraph
roman-opentensor Feb 11, 2025
82ca010
Moves shared features to the Mixin, fixes AsyncSubtensor, changes `sy…
thewhaleking Feb 11, 2025
f58aad6
brings all fields from get_metagraph_info fields to the metagraph cla…
roman-opentensor Feb 11, 2025
942f2b4
Add 0.018 as a constant
thewhaleking Feb 11, 2025
4f2b7f7
Merge pull request #2659 from opentensor/fix/thewhaleking/fix-async-t…
roman-opentensor Feb 11, 2025
6f69f4a
tests: separate templates fixture
zyzniewski-reef Feb 11, 2025
ebac12e
Merge pull request #2658 from opentensor/feat/roman/add-a-few-fields-…
roman-opentensor Feb 11, 2025
bbc30a0
Merge branch 'staging-pre-merge-new-async' into merge/roman/async-pre…
roman-opentensor Feb 11, 2025
bd0f540
style: ruff formating
zyzniewski-reef Feb 11, 2025
90433a0
tests: use 9944 as a default port
zyzniewski-reef Feb 11, 2025
7d65400
using one determine_chain_endpoint_and_network
roman-opentensor Feb 11, 2025
d8b7d70
remove unused import
roman-opentensor Feb 11, 2025
bd52816
fix test
roman-opentensor Feb 11, 2025
2983257
Merge pull request #2661 from opentensor/feat/roman/using-one-determi…
roman-opentensor Feb 11, 2025
3d632d1
improve `install_templates` logic
roman-opentensor Feb 11, 2025
fa2b9a8
Removes ownership check in stake_move
ibraheem-opentensor Feb 11, 2025
93b7b25
Merge branch 'staging-pre-merge-new-async' into tests/zyzniewski/e2e_…
roman-opentensor Feb 11, 2025
9e4ce58
Remove ownership check from move_stake for async
ibraheem-opentensor Feb 11, 2025
0392627
Merge pull request #2660 from opentensor/tests/zyzniewski/e2e_templat…
roman-opentensor Feb 11, 2025
5a203bb
Merge branch 'staging-pre-merge-new-async' into merge/roman/async-pre…
roman-opentensor Feb 11, 2025
f4f84ad
not enough time to update chain state. increase time sleep
roman-opentensor Feb 11, 2025
820b1e2
Merge pull request #2656 from opentensor/merge/roman/async-pre-merge-…
roman-opentensor Feb 11, 2025
de42873
add sync extrinsic
roman-opentensor Feb 12, 2025
e0b8f36
add sync subtensor extrinsic method
roman-opentensor Feb 12, 2025
fc62baf
update easy imports (add chain_data classes)
roman-opentensor Feb 12, 2025
58c2bc7
fix bugs with using `format_error_message`
roman-opentensor Feb 12, 2025
9f907b6
remove redundant call
roman-opentensor Feb 12, 2025
7105038
update sync extrinsic
roman-opentensor Feb 12, 2025
6ee34dd
add async extrinsic
roman-opentensor Feb 12, 2025
bc2a97d
fix docsting's complaince in IDE
roman-opentensor Feb 12, 2025
63a9a0f
update import
roman-opentensor Feb 12, 2025
386b19c
update docstring
roman-opentensor Feb 12, 2025
19f53f0
ruff
roman-opentensor Feb 12, 2025
50db030
add async subtensor extrinsic method
roman-opentensor Feb 12, 2025
2b4714a
add sync subtensor extrinsic unit test
roman-opentensor Feb 12, 2025
3aa0d78
add async subtensor extrinsic unit test
roman-opentensor Feb 12, 2025
70b653d
add sync extrinsic unit test
roman-opentensor Feb 12, 2025
8086324
add async extrinsic unit test
roman-opentensor Feb 12, 2025
1fab7b0
add e2e test (happy pass, failed)
roman-opentensor Feb 12, 2025
d244791
Merge pull request #2662 from opentensor/feat/roman/add-subnet-identi…
ibraheem-opentensor Feb 12, 2025
6c81621
Bumps version and updates changelog
ibraheem-opentensor Feb 12, 2025
f3099e6
Updates bittensor-cli version
ibraheem-opentensor Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add async extrinsic unit test
  • Loading branch information
roman-opentensor committed Feb 12, 2025
commit 8086324dad803775e74be60af4fff42ac2cc8e7a
131 changes: 131 additions & 0 deletions tests/unit_tests/extrinsics/asyncex/test_registration.py
Original file line number Diff line number Diff line change
@@ -447,3 +447,134 @@ async def is_stale_side_effect(*_, **__):
wait_for_finalization=True,
)
assert result is False


@pytest.mark.asyncio
async def test_set_subnet_identity_extrinsic_is_success(subtensor, mocker):
"""Verify that set_subnet_identity_extrinsic calls the correct functions and returns the correct result."""
# Preps
wallet = mocker.MagicMock(autospec=Wallet)
netuid = 123
subnet_name = "mock_subnet_name"
github_repo = "mock_github_repo"
subnet_contact = "mock_subnet_contact"
subnet_url = "mock_subnet_url"
discord = "mock_discord"
description = "mock_description"
additional = "mock_additional"

mocked_compose_call = mocker.patch.object(subtensor.substrate, "compose_call")

fake_response = mocker.Mock()
fake_response.is_success = mocker.AsyncMock(return_value=True)()
mocked_submit_extrinsic = mocker.patch.object(
subtensor.substrate, "submit_extrinsic", return_value=fake_response
)

# Call
result = await async_registration.set_subnet_identity_extrinsic(
subtensor=subtensor,
wallet=wallet,
netuid=netuid,
subnet_name=subnet_name,
github_repo=github_repo,
subnet_contact=subnet_contact,
subnet_url=subnet_url,
discord=discord,
description=description,
additional=additional,
)

# Asserts
mocked_compose_call.assert_awaited_once_with(
call_module="SubtensorModule",
call_function="set_subnet_identity",
call_params={
"hotkey": wallet.hotkey.ss58_address,
"netuid": netuid,
"subnet_name": subnet_name,
"github_repo": github_repo,
"subnet_contact": subnet_contact,
"subnet_url": subnet_url,
"discord": discord,
"description": description,
"additional": additional,
},
)
mocked_submit_extrinsic.assert_awaited_once_with(
call=mocked_compose_call.return_value,
wallet=wallet,
wait_for_inclusion=False,
wait_for_finalization=True,
)

assert result == (True, "Identities for subnet 123 are set.")


@pytest.mark.asyncio
async def test_set_subnet_identity_extrinsic_is_failed(subtensor, mocker):
"""Verify that set_subnet_identity_extrinsic calls the correct functions and returns False with bad result."""
# Preps
wallet = mocker.MagicMock(autospec=Wallet)
netuid = 123
subnet_name = "mock_subnet_name"
github_repo = "mock_github_repo"
subnet_contact = "mock_subnet_contact"
subnet_url = "mock_subnet_url"
discord = "mock_discord"
description = "mock_description"
additional = "mock_additional"
fake_error_message = "error message"

mocked_compose_call = mocker.patch.object(subtensor.substrate, "compose_call")

fake_response = mocker.Mock()
fake_response.is_success = mocker.AsyncMock(return_value=False)()
fake_response.error_message = mocker.AsyncMock(return_value=fake_error_message)()
mocked_submit_extrinsic = mocker.patch.object(
subtensor.substrate, "submit_extrinsic", return_value=fake_response
)

# Call
result = await async_registration.set_subnet_identity_extrinsic(
subtensor=subtensor,
wallet=wallet,
netuid=netuid,
subnet_name=subnet_name,
github_repo=github_repo,
subnet_contact=subnet_contact,
subnet_url=subnet_url,
discord=discord,
description=description,
additional=additional,
wait_for_inclusion=True,
wait_for_finalization=True,
)

# Asserts
mocked_compose_call.assert_awaited_once_with(
call_module="SubtensorModule",
call_function="set_subnet_identity",
call_params={
"hotkey": wallet.hotkey.ss58_address,
"netuid": netuid,
"subnet_name": subnet_name,
"github_repo": github_repo,
"subnet_contact": subnet_contact,
"subnet_url": subnet_url,
"discord": discord,
"description": description,
"additional": additional,
},
)
mocked_submit_extrinsic.assert_awaited_once_with(
call=mocked_compose_call.return_value,
wallet=wallet,
wait_for_inclusion=True,
wait_for_finalization=True,
)

assert result == (
False,
f"Failed to set identity for subnet {netuid}: {fake_error_message}",
)