tabnet: Models don't accept model_name, saving_path
Describe the bug
Models don’t accept model_name, saving_path as initialization arguments.
What is the current behavior?
See above.
If the current behavior is a bug, please provide the steps to reproduce.
clf: TabNetClassifier = TabNetClassifier(saving_path="/home/user123/dev/", device_name="cpu")
Expected behavior
Models should accept model_name, saving_path as initialization arguments as specified in the documentation.
Screenshots
Other relevant information:
poetry version:
python version:
Operating System:
Additional tools:
Additional context
On a related note: How can models be persisted? The mentioned init parameters strongly suggest that it is possible, but I couldn’t find any information on this - either in the documentation nor in the code.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (2 by maintainers)
Indeed, @Optimox , I have noticed that and I even probably have the change locally where I instantiate the network on class
__init__(). I think it is better that way. I’m willing to work on this and I can also fix themodel_name/saving_pathon the way, It should be simple.@DoDzilla-ai
Hello, well you are actually looking at the develop branch README (maybe we should find a way of defaulting the master branch) so
mask_typeis actually a new feature and not a deprecated one, but you if you installed the code from pip the you are using the master branch code which does not acceptmask_type.The same thing is happening with
lr, we changed this recently in order to give more flexibility to final users.The development branch always have some advanced features that the master branch does not get, they will match at the next release in the coming weeks. In the meantime please refer to the the master branch readme in order to get the current documentation.
@Optimox Plain old pickling worked, thanks! My two cents on whether to offer functionality to save and load load models: IMO that would be reasonable, even if it’s just a very simple wrapper - that way I as a user don’t have to worry about whether using Pytorch’s save, pickle etc.