// Fill dataset
data = datasource.get_quadrant_data(self, from_ts, to_ts)
i = None
keys = []
for i, (key, val) in enumerate(data):
keys.append(key)
dataset[i] = self.format_quadrants(val)
if i is None:
raise errors.NoData("no data found for time range {}-{}".format(
from_str,
to_str,
))
logging.info("found %d keys", i + 1)
mapped = self._train_on_dataset(
np.resize(dataset, (i + 1, dimens)),
num_epochs,
limit,
)
After Change
keys, dataset = self._make_dataset(features_dicts)
if len(keys) == 0:
raise errors.NoData("no data found for time range {}-{}".format(
from_str,
to_str,
))