Skip to content

Commit bb17446

Browse files
basfromanibraheem-abe
authored andcommitted
remove unused prometheus extrinsic (#2378)
1 parent 0bda76e commit bb17446

File tree

4 files changed

+0
-545
lines changed

4 files changed

+0
-545
lines changed

bittensor/core/extrinsics/prometheus.py

Lines changed: 0 additions & 187 deletions
This file was deleted.

bittensor/core/subtensor.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@
5252
commit_weights_extrinsic,
5353
reveal_weights_extrinsic,
5454
)
55-
from bittensor.core.extrinsics.prometheus import (
56-
do_serve_prometheus,
57-
prometheus_extrinsic,
58-
)
5955
from bittensor.core.extrinsics.registration import (
6056
burned_register_extrinsic,
6157
register_extrinsic,
@@ -1269,37 +1265,6 @@ def make_substrate_call_with_retry():
12691265

12701266
return NeuronInfo.from_vec_u8(result)
12711267

1272-
# Community uses this method
1273-
def serve_prometheus(
1274-
self,
1275-
wallet: "Wallet",
1276-
port: int,
1277-
netuid: int,
1278-
wait_for_inclusion: bool = False,
1279-
wait_for_finalization: bool = True,
1280-
) -> bool:
1281-
"""
1282-
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.
1283-
1284-
Args:
1285-
wallet (bittensor_wallet.Wallet): Bittensor wallet instance used for submitting the extrinsic.
1286-
port (int): The port number on which Prometheus metrics are served.
1287-
netuid (int): The unique identifier of the subnetwork.
1288-
wait_for_inclusion (bool): If True, waits for the transaction to be included in a block. Defaults to ``False``.
1289-
wait_for_finalization (bool): If True, waits for the transaction to be finalized. Defaults to ``True``.
1290-
1291-
Returns:
1292-
bool: Returns True if the Prometheus extrinsic is successfully processed, otherwise False.
1293-
"""
1294-
return prometheus_extrinsic(
1295-
self,
1296-
wallet=wallet,
1297-
port=port,
1298-
netuid=netuid,
1299-
wait_for_inclusion=wait_for_inclusion,
1300-
wait_for_finalization=wait_for_finalization,
1301-
)
1302-
13031268
# Community uses this method
13041269
def get_subnet_hyperparameters(
13051270
self, netuid: int, block: Optional[int] = None
@@ -2047,7 +2012,5 @@ def make_substrate_call_with_retry(encoded_hotkey_: list[int]):
20472012

20482013
return DelegateInfo.from_vec_u8(result)
20492014

2050-
# Subnet 27 uses this method
2051-
_do_serve_prometheus = do_serve_prometheus
20522015
# Subnet 27 uses this method name
20532016
_do_serve_axon = do_serve_axon

0 commit comments

Comments
 (0)