fix: dataset_train inheritance warnings#461
fix: dataset_train inheritance warnings#461gcroci2 merged 3 commits into435_add_tutorials_variants_gcroci2from
dataset_train inheritance warnings#461Conversation
|
Why is this PR pointing to branch 435 instead of main? It doesn't look like they are modifying the same files, so there shouldn't really be any conflicts, right? |
I noticed this while on branch 435, since the training tutorial notebook was giving such warnings. This is one of the possible development flows, you find a bug while working on a branch and you check out from that branch, to fix the bug and to merge the new PR later with the branch itself before merging the latter to the main. |
DaniBodor
left a comment
There was a problem hiding this comment.
Nice.
I think it would be a good idea to read the default values from __init__ instead of hard coding them (see comment below).
Apart from that: looks good.
Co-authored-by: Dani Bodor <d.bodor@esciencecenter.nl>
After the edits merged with PR #446, the code was throwing warnings any time an instance of GraphDataset/GridDataset with
train=False,dataset_train=dataset_train(the correct one), and with default task, target, features, ... parameters was defined.More in detail, the internal function
_check_inherited_params(dataset.py module) was throwing a warning any time the attributes of the validation/test sets were different from the ones of the training dataset, which can be true if the validation/test sets' attributes themselves are not set by the user, who just passes in the training set (assuming inheritance).features_dictis now defined after having checked for the inherited parameters (if checking is needed, so in validation/test cases), and there is no need of checking its inheritance.