gsbDBI / torch-choice

Choice modeling with PyTorch: logit model and nested logit model
MIT License
39 stars 8 forks source link

Fixed broken imports + price vs itemsession change #17

Closed rodonn closed 1 year ago

rodonn commented 1 year ago

Hello, I'm glad this package exists, but I ran into several bugs when I tried out the example notebooks. This is my attempt at fixing those errors I encountered.

  1. The version string had not been updated, which made the advice to check torch_choice.__version__ confusing.
  2. The code that used torch_choice.utils.easy_data_wrapper.EasyDatasetWrapper generated errors when I tried running them. I updated the __init__.py file and changed to directly importing from torch_choice.utils import EasyDatasetWrapper
  3. Several examples had price_ columns, but it appears the current version of the code is instead giving those columns the prefix itemsession_. I updated all of the places I saw price_ prefixed columns.
TianyuDu commented 1 year ago

My apologies for the late response Rob! Thank you so much for this effort, and they helped a lot!