gsbDBI / torch-choice

Choice modeling with PyTorch: logit model and nested logit model
MIT License
41 stars 9 forks source link

Package pip install issue - does not install some modules #3

Closed kasince2k closed 2 years ago

kasince2k commented 2 years ago

There seems to be an issue in some package functionality on installing from pip. I used pip3 install torch-choice to install the package, as suggested in the documentation.

On this, from torch_choice.data import ChoiceDataset gives a ModuleNotFound torch_choice.data error. The same issue does not occur when you install from source.

Note that import torch_choice works on both the methods of install.

@TianyuDu

kasince2k commented 2 years ago

Suggestion to add this on the documentation: While installing from source on sherlock, add the --user flag in the python install command, as: python3 setup.py develop --user.

TianyuDu commented 2 years ago

Thanks for noticing this Keshav, I am working on fixing it now!

TianyuDu commented 2 years ago

I have fixed the issue in the release 0.0.3 available here, you can use pip install torch-choice to install this version. Please notice that the import torch_choice; torch_choice.__version__() provides the wrong version, this will be fixed in the next release. For now, please use pip3 list | grep torch-choice to check the version. @kasince2k Could you please check if the issue was fixed?

Helpful resources for fixing this issue: https://stackoverflow.com/questions/60460509/personal-pypi-package-cant-import-subpackages

kasince2k commented 2 years ago

yes it is fixed. thank you