|
2 | 2 | import asyncio |
3 | 3 | import datetime as dt |
4 | 4 | import logging |
| 5 | +import warnings |
5 | 6 | from typing import Any |
6 | 7 |
|
7 | 8 | from asgiref.sync import sync_to_async |
|
12 | 13 | from django.conf import settings |
13 | 14 |
|
14 | 15 | from compute_horde_miner.miner.dynamic_config import aget_config |
15 | | -from compute_horde_miner.miner.executor_manager._internal.selector import ( |
16 | | - HistoricalRandomMinerSelector, |
17 | | -) |
18 | 16 |
|
19 | 17 | logger = logging.getLogger(__name__) |
20 | 18 |
|
@@ -158,7 +156,6 @@ async def wait_for_executor_reservation(self, token: str) -> None: |
158 | 156 | class BaseExecutorManager(metaclass=abc.ABCMeta): |
159 | 157 | def __init__(self): |
160 | 158 | self._executor_class_pools: dict[ExecutorClass, ExecutorClassPool] = {} |
161 | | - self.selector = HistoricalRandomMinerSelector(settings.CLUSTER_SECRET) |
162 | 159 |
|
163 | 160 | @abc.abstractmethod |
164 | 161 | async def start_new_executor(self, token, executor_class, timeout): |
@@ -230,12 +227,12 @@ async def get_executor_cmdline_args(self) -> list[str]: |
230 | 227 |
|
231 | 228 | async def is_active(self) -> bool: |
232 | 229 | """Check if the Miner is an active one for configured Cluster""" |
233 | | - selected = await self.selector.active( |
234 | | - settings.CLUSTER_HOTKEYS, |
| 230 | + warnings.warn( |
| 231 | + "is_active() method is deprecated.", |
| 232 | + DeprecationWarning, |
| 233 | + stacklevel=2, |
235 | 234 | ) |
236 | | - my_address = settings.BITTENSOR_WALLET().hotkey.ss58_address # type: str |
237 | | - |
238 | | - return selected == my_address |
| 235 | + return True |
239 | 236 |
|
240 | 237 | @sync_to_async(thread_sensitive=False) |
241 | 238 | def is_peak(self) -> bool: |
|
0 commit comments