separately save and load data (collected samples), using torch#9
separately save and load data (collected samples), using torch#9sheim wants to merge 3 commits intoPFMassiani:masterfrom
Conversation
|
Hey, Yes, saving using |
|
No, not really. I thought of it, and thought that forcing the user to specify a dummy |
|
Okay, I understand. When specifying a path to load the Dataset, I think that the user already knows how initialize the Dataset though. I'd find it a bit more natural to make On the other hand, I disagree with the "staticness" of Dataset.load. Indeed, doing |
edge/model/inference/inference.py
Outdated
| model.load_state_dict(save_dict['state_dict']) | ||
|
|
||
| if load_dataset: | ||
| model.dataset.load(load_dataset) |
There was a problem hiding this comment.
I think we also need to update the GP's internal state after this: self._set_gp_data_to_dataset()
There was a problem hiding this comment.
I see. So then how about actually just really making these two things separate? load only loads the model. And separately, load_dataset loads a dataset. This doesn't make train_ optional though...
|
So currently, I split up saving/loading the dataset from saving and loading the model, so the original I tried making |
Forgot to commit and PR before going to Ticino. I ended up saving with torch instead of numpy, since
train_xandtrain_yare actually torch tensors anyway. Although... I thinktorch.saveis using pickle in the background.