diff --git a/koi_core/api/instance.py b/koi_core/api/instance.py index b3b5ae4..e8a722c 100644 --- a/koi_core/api/instance.py +++ b/koi_core/api/instance.py @@ -28,6 +28,7 @@ "finalized": "finalized", "could_train": "could_train", "last_modified": "last_modified", + "samples_last_modified": "samples_last_modified", } @@ -96,9 +97,6 @@ def get_instance_training_data(self, id: InstanceId, meta: CachingMeta): def set_instance_training_data(self, id: InstanceId, data: bytes): self.base._POST_raw(self.base._build_path(id) + "/training", data=data) - # endregion - - # region descriptor def get_descriptors(self, id: InstanceId, meta: CachingMeta = None): data, meta = self.base._GET(self.base._build_path(id) + "/descriptor") return ( diff --git a/koi_core/worker.py b/koi_core/worker.py index 3562881..52d367f 100644 --- a/koi_core/worker.py +++ b/koi_core/worker.py @@ -204,7 +204,7 @@ def main(): continue # seconds since last instance update - last_modified = datetime.fromisoformat(instance.last_modified) + last_modified = datetime.fromisoformat(instance.samples_last_modified) sec_since_last_change = (datetime.utcnow() - last_modified).total_seconds() # train the instance if its ready to train or the user forces it if opt.force or (instance.could_train and sec_since_last_change > opt.wait_training):