Add job argument to State.begin()

This commit is contained in:
Aarni Koskela
2023-06-30 13:11:31 +03:00
parent b70001e618
commit f44feb6a10
6 changed files with 13 additions and 16 deletions

View File

@@ -173,7 +173,7 @@ class State:
return obj
def begin(self):
def begin(self, job: str = "(unknown)"):
self.sampling_step = 0
self.job_count = -1
self.processing_has_refined_job_count = False
@@ -187,7 +187,7 @@ class State:
self.interrupted = False
self.textinfo = None
self.time_start = time.time()
self.job = job
devices.torch_gc()
def end(self):