Skip to content

Commit 27fce58

Browse files
authored
Fix: Relax CRN version check to use custom release also for confidentials and PAYG. (#381)
Also fixed issue that prevent to show all CRNs.
1 parent 5870d20 commit 27fce58

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/aleph_client/commands/instance/display.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333

3434
from aleph_client.commands.files import download
3535
from aleph_client.commands.help_strings import ALLOCATION_AUTO, ALLOCATION_MANUAL
36-
from aleph_client.commands.instance.network import (
37-
fetch_crn_list,
38-
fetch_latest_crn_version,
39-
)
36+
from aleph_client.commands.instance.network import fetch_crn_list
4037
from aleph_client.commands.node import _format_score
4138
from aleph_client.models import CRNInfo
4239

@@ -635,7 +632,10 @@ async def fetch_node_list(self):
635632
for gpu_id in range(len(crn.compatible_available_gpus))
636633
}
637634
)
638-
self.current_crn_version = await fetch_latest_crn_version()
635+
# self.current_crn_version = await fetch_latest_crn_version()
636+
# Relax current filter to allow use aleph-vm versions since 1.5.1.
637+
# TODO: Allow to specify that option on settings aggregate on maybe on GitHub
638+
self.current_crn_version = "1.5.1"
639639

640640
# Initialize the progress bar
641641
self.total_crns = len(self.crns)
@@ -655,7 +655,7 @@ async def fetch_node_list(self):
655655
async def add_crn_info(self, crn: CRNInfo, gpu_id: int):
656656
self.active_crns += 1
657657
# Skip CRNs with legacy version
658-
if self.only_latest_crn_version and crn.version < self.current_crn_version:
658+
if self.only_latest_crn_version and (crn.version or "0.0.0") < self.current_crn_version:
659659
logger.debug(f"Skipping CRN {crn.hash}, legacy version")
660660
return
661661
# Skip CRNs without machine usage

0 commit comments

Comments
 (0)