Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Feature/integration pytorch tabular #1098

Conversation

Actis92
Copy link
Contributor

@Actis92 Actis92 commented Jan 5, 2022

In this PR I have integrated pytorch-tabular inside lightning flash, unsing the Adapter like what is already been done with icevision and pytorch-forecasting.
I have added some parameters inside TabularData in order to have all the info required by the different models implemented in pytorch tabular.
And I have added tests and cli for TabularRegressor

Fixes #950

Luca Actis Grosso added 2 commits January 5, 2022 14:13
…lar' into feature/integration-pytorch-tabular

# Conflicts:
#	flash/tabular/regression/model.py
#	tests/tabular/regression/test_model.py
@codecov
Copy link

codecov bot commented Jan 5, 2022

Codecov Report

Merging #1098 (a155609) into master (21a9d7f) will increase coverage by 0.24%.
The diff coverage is 95.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1098      +/-   ##
==========================================
+ Coverage   85.86%   86.11%   +0.24%     
==========================================
  Files         281      284       +3     
  Lines       12816    12866      +50     
==========================================
+ Hits        11005    11080      +75     
+ Misses       1811     1786      -25     
Flag Coverage Δ
unittests 86.11% <95.43%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flash/__main__.py 95.23% <ø> (ø)
flash/core/registry.py 95.91% <0.00%> (-1.33%) ⬇️
flash/tabular/classification/cli.py 100.00% <ø> (ø)
...ash/core/integrations/pytorch_tabular/backbones.py 82.35% <82.35%> (ø)
flash/core/integrations/pytorch_tabular/adapter.py 96.77% <96.77%> (ø)
flash/core/classification.py 95.73% <100.00%> (+0.63%) ⬆️
flash/core/data/data_module.py 95.28% <100.00%> (-0.05%) ⬇️
flash/core/integrations/fiftyone/utils.py 64.70% <100.00%> (+5.52%) ⬆️
flash/core/regression.py 86.95% <100.00%> (+20.28%) ⬆️
flash/core/utilities/imports.py 91.60% <100.00%> (+0.24%) ⬆️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21a9d7f...a155609. Read the comment docs.

@Actis92
Copy link
Contributor Author

Actis92 commented Jan 6, 2022

Thank you @ethanwharris for your comments 😃 I have done the changes that you have suggested, and I have done a refactoring of TabularClassifier, TabularRegressor because I have noticed that before I didn't set correctly metrics, loss functions, etc ... because it is needed to be set in the model defined by pytorch-tabular.
Let me know if you have any other observation 😃

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😃

@ethanwharris ethanwharris merged commit b208689 into Lightning-Universe:master Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate backbones from PyTorch Tabular for tabular classification and regression tasks
2 participants