plato-sdk-v2 2.8.3__py3-none-any.whl → 2.8.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plato/cli/sandbox.py +4 -2
- plato/v2/sync/sandbox.py +19 -5
- {plato_sdk_v2-2.8.3.dist-info → plato_sdk_v2-2.8.5.dist-info}/METADATA +1 -1
- {plato_sdk_v2-2.8.3.dist-info → plato_sdk_v2-2.8.5.dist-info}/RECORD +6 -6
- {plato_sdk_v2-2.8.3.dist-info → plato_sdk_v2-2.8.5.dist-info}/WHEEL +0 -0
- {plato_sdk_v2-2.8.3.dist-info → plato_sdk_v2-2.8.5.dist-info}/entry_points.txt +0 -0
plato/cli/sandbox.py
CHANGED
|
@@ -260,7 +260,8 @@ class Output:
|
|
|
260
260
|
"""Output a successful result."""
|
|
261
261
|
data = _to_dict(result)
|
|
262
262
|
if self.json_mode:
|
|
263
|
-
|
|
263
|
+
# Use print() directly to avoid Rich adding ANSI codes
|
|
264
|
+
print(json.dumps(data, indent=2, default=str))
|
|
264
265
|
else:
|
|
265
266
|
if title:
|
|
266
267
|
self.super_console.print(f"[green]{title}[/green]")
|
|
@@ -276,7 +277,8 @@ class Output:
|
|
|
276
277
|
def error(self, msg: str) -> None:
|
|
277
278
|
"""Output an error."""
|
|
278
279
|
if self.json_mode:
|
|
279
|
-
|
|
280
|
+
# Use print() directly to avoid Rich adding ANSI codes
|
|
281
|
+
print(json.dumps({"error": msg}))
|
|
280
282
|
else:
|
|
281
283
|
self.super_console.print(f"[red]{msg}[/red]")
|
|
282
284
|
|
plato/v2/sync/sandbox.py
CHANGED
|
@@ -595,12 +595,18 @@ class SandboxClient:
|
|
|
595
595
|
if not dataset_config.compute:
|
|
596
596
|
raise ValueError(f"Compute configuration is required for dataset '{dataset}'")
|
|
597
597
|
self.console.print(f"simulator_name: {simulator_name}")
|
|
598
|
+
# Save compute values for state (will be used later when saving state.json)
|
|
599
|
+
config_cpus = dataset_config.compute.cpus
|
|
600
|
+
config_memory = dataset_config.compute.memory
|
|
601
|
+
config_disk = dataset_config.compute.disk
|
|
602
|
+
config_app_port = dataset_config.compute.app_port
|
|
603
|
+
config_messaging_port = dataset_config.compute.plato_messaging_port
|
|
598
604
|
sim_config = SimConfigCompute(
|
|
599
|
-
cpus=
|
|
600
|
-
memory=
|
|
601
|
-
disk=
|
|
602
|
-
app_port=
|
|
603
|
-
plato_messaging_port=
|
|
605
|
+
cpus=config_cpus,
|
|
606
|
+
memory=config_memory,
|
|
607
|
+
disk=config_disk,
|
|
608
|
+
app_port=config_app_port,
|
|
609
|
+
plato_messaging_port=config_messaging_port,
|
|
604
610
|
)
|
|
605
611
|
env_config = Env.resource(simulator_name, sim_config)
|
|
606
612
|
self.console.print(f"env_config: {env_config}")
|
|
@@ -723,6 +729,12 @@ class SandboxClient:
|
|
|
723
729
|
sandbox_state.disk = disk
|
|
724
730
|
sandbox_state.app_port = app_port
|
|
725
731
|
sandbox_state.messaging_port = messaging_port
|
|
732
|
+
elif mode == "config":
|
|
733
|
+
sandbox_state.cpus = config_cpus
|
|
734
|
+
sandbox_state.memory = config_memory
|
|
735
|
+
sandbox_state.disk = config_disk
|
|
736
|
+
sandbox_state.app_port = config_app_port
|
|
737
|
+
sandbox_state.messaging_port = config_messaging_port
|
|
726
738
|
|
|
727
739
|
# Save state to working_dir/.plato/state.json
|
|
728
740
|
with open(self.working_dir / self.PLATO_DIR / "state.json", "w") as f:
|
|
@@ -841,6 +853,8 @@ class SandboxClient:
|
|
|
841
853
|
)
|
|
842
854
|
|
|
843
855
|
if wait_timeout > 0:
|
|
856
|
+
# Wait before first state poll to allow worker to initialize
|
|
857
|
+
time.sleep(15)
|
|
844
858
|
start_time = time.time()
|
|
845
859
|
poll_interval = 10
|
|
846
860
|
|
|
@@ -421,7 +421,7 @@ plato/cli/chronos.py,sha256=OTS-xcmH0U99sMHrABqtJMOdOEhHil5hv_yO3YNgrS8,27824
|
|
|
421
421
|
plato/cli/main.py,sha256=f-L_Q6MWA8ylGrOcEsJU5HRK1JaDUeh6ONWSaKwag10,6800
|
|
422
422
|
plato/cli/pm.py,sha256=y74kMFm0RdnPrcf3TPb5ES-D0SgZiO41nagheS1xtlQ,54775
|
|
423
423
|
plato/cli/proxy.py,sha256=c1t1ljZvArTnFba-NprCj2tma4XneEqRDQCbwzQ9GD4,6803
|
|
424
|
-
plato/cli/sandbox.py,sha256=
|
|
424
|
+
plato/cli/sandbox.py,sha256=VwXPETWOGa0urYIsHGUKQyRd8hABPVaEUYrxsdGWti8,26827
|
|
425
425
|
plato/cli/utils.py,sha256=PIZnJYuhojbARoRA2Tk3KfB5Tycg1uwlPLhut5Es0ew,6900
|
|
426
426
|
plato/cli/verify.py,sha256=fGmKAh9SB2s7Q67oI9q26_gYxZh4JzGMCS4PyfMqb-g,22930
|
|
427
427
|
plato/cli/world.py,sha256=bH-ReNhGdjcba5rXijLfhAKFwsk3GzlQQEtXUFWOZbw,8822
|
|
@@ -513,7 +513,7 @@ plato/v2/sync/chronos.py,sha256=ChXpasjRzAZjoYTimpPqYydnwEk-IgdxR0SDXDOZbUM,1207
|
|
|
513
513
|
plato/v2/sync/client.py,sha256=rsrU7_RhE-syf3FMNw5LaxmF7rYw2GBzC_TPpd-6thk,4986
|
|
514
514
|
plato/v2/sync/environment.py,sha256=WnDzbyEHpwCSEP8XnfNSjIYS7rt7lYR4HGJjzprZmTQ,5066
|
|
515
515
|
plato/v2/sync/flow_executor.py,sha256=N41-WCWIJVcCR2UmPUEiK7roNacYoeONkRXpR7lUgT8,13941
|
|
516
|
-
plato/v2/sync/sandbox.py,sha256=
|
|
516
|
+
plato/v2/sync/sandbox.py,sha256=fq5xUkqUwsSEoWUp243qsw9JboiGM-duHzycsWZmeX0,55599
|
|
517
517
|
plato/v2/sync/session.py,sha256=FYVxgGZ3eL_YpoJiUgJamrt-jVaBqJITzFzepOKMRjA,35065
|
|
518
518
|
plato/v2/utils/__init__.py,sha256=XLeFFsjXkm9g2raMmo7Wt4QN4hhCrNZDJKnpffJ4LtM,38
|
|
519
519
|
plato/v2/utils/db_cleanup.py,sha256=JMzAAJz0ZnoUXtd8F4jpQmBpJpos2__RkgN_cuEearg,8692
|
|
@@ -526,7 +526,7 @@ plato/worlds/base.py,sha256=-RR71bSxEFI5yydtrtq-AAbuw98CIjvmrbztqzB9oIc,31041
|
|
|
526
526
|
plato/worlds/build_hook.py,sha256=KSoW0kqa5b7NyZ7MYOw2qsZ_2FkWuz0M3Ru7AKOP7Qw,3486
|
|
527
527
|
plato/worlds/config.py,sha256=O1lUXzxp-Z_M7izslT8naXgE6XujjzwYFFrDDzUOueI,12736
|
|
528
528
|
plato/worlds/runner.py,sha256=r9B2BxBae8_dM7y5cJf9xhThp_I1Qvf_tlPq2rs8qC8,4013
|
|
529
|
-
plato_sdk_v2-2.8.
|
|
530
|
-
plato_sdk_v2-2.8.
|
|
531
|
-
plato_sdk_v2-2.8.
|
|
532
|
-
plato_sdk_v2-2.8.
|
|
529
|
+
plato_sdk_v2-2.8.5.dist-info/METADATA,sha256=doSSnfribPsl_hHLfU-vDtjyPn3KUE4vGCckSijOkf4,8652
|
|
530
|
+
plato_sdk_v2-2.8.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
531
|
+
plato_sdk_v2-2.8.5.dist-info/entry_points.txt,sha256=iynJvTkU7E4MZNtSozVF0Wh083yPm6cuKV362Ol_ez8,133
|
|
532
|
+
plato_sdk_v2-2.8.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|