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

remove unused prometheus extrinsic #2378

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
187 changes: 0 additions & 187 deletions bittensor/core/extrinsics/prometheus.py

This file was deleted.

37 changes: 0 additions & 37 deletions bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
commit_weights_extrinsic,
reveal_weights_extrinsic,
)
from bittensor.core.extrinsics.prometheus import (
do_serve_prometheus,
prometheus_extrinsic,
)
from bittensor.core.extrinsics.registration import (
burned_register_extrinsic,
register_extrinsic,
Expand Down Expand Up @@ -1269,37 +1265,6 @@ def make_substrate_call_with_retry():

return NeuronInfo.from_vec_u8(result)

# Community uses this method
def serve_prometheus(
self,
wallet: "Wallet",
port: int,
netuid: int,
wait_for_inclusion: bool = False,
wait_for_finalization: bool = True,
) -> bool:
"""
Serves Prometheus metrics by submitting an extrinsic to a blockchain network via the specified wallet. The function allows configuring whether to wait for the transaction's inclusion in a block and its finalization.

Args:
wallet (bittensor_wallet.Wallet): Bittensor wallet instance used for submitting the extrinsic.
port (int): The port number on which Prometheus metrics are served.
netuid (int): The unique identifier of the subnetwork.
wait_for_inclusion (bool): If True, waits for the transaction to be included in a block. Defaults to ``False``.
wait_for_finalization (bool): If True, waits for the transaction to be finalized. Defaults to ``True``.

Returns:
bool: Returns True if the Prometheus extrinsic is successfully processed, otherwise False.
"""
return prometheus_extrinsic(
self,
wallet=wallet,
port=port,
netuid=netuid,
wait_for_inclusion=wait_for_inclusion,
wait_for_finalization=wait_for_finalization,
)

# Community uses this method
def get_subnet_hyperparameters(
self, netuid: int, block: Optional[int] = None
Expand Down Expand Up @@ -2047,7 +2012,5 @@ def make_substrate_call_with_retry(encoded_hotkey_: list[int]):

return DelegateInfo.from_vec_u8(result)

# Subnet 27 uses this method
_do_serve_prometheus = do_serve_prometheus
# Subnet 27 uses this method name
_do_serve_axon = do_serve_axon
Loading
Loading