Skip to content

Commit 92249a9

Browse files
authored
Fix start error in load_persistent_executions (#759)
* Fix start error in load_persistent_executions Fix parse error that prevented Supervisor from starting when loading persistant executions, as it could not parse the gpu field Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/opt/aleph-vm/aleph/vm/orchestrator/__main__.py", line 4, in <module> main() File "/opt/aleph-vm/aleph/vm/orchestrator/cli.py", line 379, in main supervisor.run() File "/opt/aleph-vm/aleph/vm/orchestrator/supervisor.py", line 184, in run asyncio.run(pool.load_persistent_executions()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/opt/aleph-vm/aleph/vm/pool.py", line 252, in load_persistent_executions execution.gpus = parse_raw_as(List[HostGPU], saved_execution.gpus) File "pydantic/tools.py", line 74, in pydantic.tools.parse_raw_as obj = load_str_bytes( File "pydantic/parse.py", line 37, in pydantic.parse.load_str_bytes return json_loads(b) File "/usr/lib/python3.10/json/__init__.py", line 339, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not NoneType * Fix packaging issue caused by sevctl
1 parent 07a7adb commit 92249a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packaging/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ download-ipfs-kubo: target-dir build-dir
4848
curl -fsSL https://github.com/ipfs/kubo/releases/download/v0.23.0/kubo_v0.23.0_linux-amd64.tar.gz | tar -xz --directory ./target/kubo
4949

5050
target/bin/sevctl:
51-
cargo install --git https://github.com/virtee/sevctl.git --rev v0.6.0 --target x86_64-unknown-linux-gnu --root ./target
51+
cargo install --locked --git https://github.com/virtee/sevctl.git --rev v0.6.0 --target x86_64-unknown-linux-gnu --root ./target
5252
./target/bin/sevctl -V
5353

5454
version:

src/aleph/vm/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ async def load_persistent_executions(self):
249249
if execution.is_running:
250250
# TODO: Improve the way that we re-create running execution
251251
# Load existing GPUs assigned to VMs
252-
execution.gpus = parse_raw_as(List[HostGPU], saved_execution.gpus)
252+
execution.gpus = parse_raw_as(List[HostGPU], saved_execution.gpus) if saved_execution.gpus else []
253253
# Load and instantiate the rest of resources and already assigned GPUs
254254
await execution.prepare()
255255
if self.network:

0 commit comments

Comments
 (0)