From f0dcef727aba9f9adfa5fd15f5e20ecb1d8db26b Mon Sep 17 00:00:00 2001 From: Adal Chiriliuc Date: Fri, 25 Oct 2024 20:24:05 +0300 Subject: [PATCH] fix function name to signal it's public --- compute_horde/compute_horde/mv_protocol/validator_requests.py | 4 ++-- compute_horde/compute_horde/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compute_horde/compute_horde/mv_protocol/validator_requests.py b/compute_horde/compute_horde/mv_protocol/validator_requests.py index 129da6568..a3a76d0bb 100644 --- a/compute_horde/compute_horde/mv_protocol/validator_requests.py +++ b/compute_horde/compute_horde/mv_protocol/validator_requests.py @@ -12,7 +12,7 @@ from ..base.volume import Volume, VolumeType from ..base_requests import BaseRequest, JobMixin from ..executor_class import ExecutorClass -from ..utils import MachineSpecs, _json_dumps_default +from ..utils import MachineSpecs, json_dumps_default SAFE_DOMAIN_REGEX = re.compile(r".*") @@ -99,7 +99,7 @@ class ReceiptPayload(pydantic.BaseModel): def blob_for_signing(self): # pydantic v2 does not support sort_keys anymore. - return json.dumps(self.model_dump(), sort_keys=True, default=_json_dumps_default) + return json.dumps(self.model_dump(), sort_keys=True, default=json_dumps_default) class JobFinishedReceiptPayload(ReceiptPayload): diff --git a/compute_horde/compute_horde/utils.py b/compute_horde/compute_horde/utils.py index 1b95e343e..70dfc281b 100644 --- a/compute_horde/compute_horde/utils.py +++ b/compute_horde/compute_horde/utils.py @@ -52,7 +52,7 @@ def get_validators(netuid=12, network="finney", block: int | None = None) -> lis return neurons[:VALIDATORS_LIMIT] -def _json_dumps_default(obj): +def json_dumps_default(obj): if isinstance(obj, datetime.datetime): return obj.isoformat()