-
Notifications
You must be signed in to change notification settings - Fork 299
Fix bugs in cutout training #233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bugs in cutout training #233
Conversation
@@ -39,7 +39,8 @@ def data_preparation(self, X: np.ndarray, y: np.ndarray, | |||
# It is unlikely that the batch size is lower than the number of features, but | |||
# be safe | |||
size = min(X.shape[0], X.shape[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be changed to size=X.shape[1] right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I missed that
|
||
# We use an ordinal encoder on the tabular data | ||
if not isinstance(self.numerical_columns, typing.Iterable): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the numerical columns are None, we should still continue with only categorical imputing in this case or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if there are only numerical columns, there should not be a conversion for categorical ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually when there are no numerical columns, it is not none but it is an empty list. And indexing with an empty list does not affect the tensor so this should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-PyTorch/autoPyTorch/pipeline/components/training/trainer/base_trainer_choice.py
Lines 340 to 341 in 8b71ee2
numerical_columns=X['dataset_properties']['numerical_columns'] if 'numerical_columns' in X[ | |
'dataset_properties'] else None |
Is numerical_columns
always in dataset_properties
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when its tabular data then yeah
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
* Fix bugs in cutout training * Address comments from arlind
This PR fixes the following bugs: