spending_policy.py 412 B

1234567891011121314
  1. from abc import ABC, abstractmethod
  2. from hivemind.proto.runtime_pb2 import ExpertRequest
  3. class SpendingPolicyBase(ABC):
  4. @abstractmethod
  5. def get_points(self, request: ExpertRequest, method_name: str, *args, **kwargs) -> float:
  6. pass
  7. class DummySpendingPolicy(SpendingPolicyBase):
  8. def get_points(self, request: ExpertRequest, method_name: str, *args, **kwargs) -> float:
  9. return 0.0