tabnet
tabnet copied to clipboard
Example notebook of how to use skorch with tabnet
This notebook showcases how to use the tabnet PyTorch module with skorch for improved sklearn compatibility.
As discussed in https://github.com/dreamquark-ai/tabnet/issues/41 this PR adds a notebook showcasing how one would go on about using pytorch-tabnet with skorch. This is not a full port and it may still contain implementation errors, even though I took care to leave the internal bits mostly untouched. Any feedback is appreciated.
What kind of change does this PR introduce?
Adds an example notebook.
Does this PR introduce a breaking change?
No.
What needs to be documented once your changes are merged?
Link in the main README (already included).
Closing issues
None.
Hi @ottonemo ,
Thanks for your PR, that's a cool inclusion. I will have a look in detail at this this evening. We could even think about adding this to the integration tests if we want it to be a staple for future versions.
You have to add
skorch
as a dev dependency onpyproject.toml
and then regenerate the lock files. You can usemake start (or start-gpu)
and thenpoetry update --lock
once skorch has been added to your pyproject file.
Done. I also refined the notebook a bit and made it more comparable to the original notebook in terms of validation splitting.
@ottonemo , I'm sorry for the delay on the review. I tested this weekend on a new environment installing all the packages and it seems to work well.
Could you just squash your 4 commits into 1 single commit with these rules, please? In your case I guess it would be feat: [add your commit text here]
and you can of course detail more in the commit body.
I can validate and merge as soon as this is done. Thanks again!
@ottonemo , I'm sorry for the delay on the review. I tested this weekend on a new environment installing all the packages and it seems to work well.
Could you just squash your 4 commits into 1 single commit with these rules, please? In your case I guess it would be
feat: [add your commit text here]
and you can of course detail more in the commit body. I can validate and merge as soon as this is done. Thanks again!
Sorry for the delay on my part :) I hope everything is in order now!
@Optimox @eduardocarvp Should we merge this ?
@Optimox @eduardocarvp Should we merge this ?
@Hartorn, I think we probably waited too long to merge this...
As there is a new warm-start possibility I wonder if this changes things for skorch
as we got closer to the scikit-learn
behavior.
@ottonemo could you have a look at this #340 and see if it changes how things should work?
Thank you very much and sorry for the delay...
Users of the skorch example would just initialize with SkorchTabModel(..., warm_restart=True)
so I don't think anything changes here.
@ottonemo, could you please solve the conflicts so that I can merge?
-> starting accepting changes from develop branch pyproject.toml
and poetry.lock
files run poetry add --dev skorch
-> this will update both files and then you can amend your commit to avoid conflicts
Thanks and happy holiday season!
@ottonemo, could you please solve the conflicts so that I can merge?
-> starting accepting changes from develop branch
pyproject.toml
andpoetry.lock
files runpoetry add --dev skorch
-> this will update both files and then you can amend your commit to avoid conflicts
I think this branch should now be mergable :)
@Optimox friendly reminder :)
@eduardocarvp I think I can't merge since you requested changes (adding skorch to development dependencies), can you accept the changes and merge this ?