renamed ExamplePtychoEngine

This commit is contained in:
2026-08-10 23:54:24 +09:00
parent 7a79b49611
commit 792e91536c
2 changed files with 1 additions and 3 deletions
+19
View File
@@ -0,0 +1,19 @@
from typing import Any
import time
import random
from ptycho.base import PtychoEngine
class ExamplePtychoEngine(PtychoEngine):
def __init__(self, config):
super().__init__(config)
def run(self, run_id="") -> None:
print(f"[{run_id}] [ExamplePtychoEngine] Sleeping for 0.1 second.")
time.sleep(0.1)
def metric(self, names):
if isinstance(names, (list, tuple)):
return [0.0] * len(names)
else:
return 0.0