OfflineDataSet cannot identify the differences between sampled data saving and no enough data at the stage of data sampling. So that trainer may be stuck at the request_data.
Proposal: use a table status to identify the differences
class Table:
def save(self):
self.status = Status.IN_PROCESS
# ...
self.status = Status.DONE
class OfflineDataset:
# ...
def sample(self, *args, **kwargs):
# ...
try:
if table.status == Status.IN_PROCESS:
raise BusyError
if table.size < self._learn_start:
raise NoEnoughDataError
batch = table.sample(batch_size)
except BusyError as e:
info = BusyError
except NoEnoughDataError as e:
info = NoEnoughDataError
except Exception as e:
info = str(e)
return batch, info
OfflineDataSet
cannot identify the differences between sampled data saving and no enough data at the stage of data sampling. So that trainer may be stuck at therequest_data
.Proposal: use a table status to identify the differences