Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: fix test_reslogit.py #165

Merged
merged 5 commits into from
Oct 3, 2024
Merged

TST: fix test_reslogit.py #165

merged 5 commits into from
Oct 3, 2024

Conversation

julesdesir
Copy link
Collaborator

@julesdesir julesdesir commented Oct 3, 2024

Description of the goal of the PR

Description: fix hyperparameters values to make the tests of test_reslogit.py pass

Changes this PR introduces (fill it before implementation)

  • : Increase dataset size
  • : Increase learning rate
  • : Increase batch size
  • : Switch from SGD optimizer to Adam

Checklist before requesting a review

  • I have commented my code, particularly in hard-to-understand areas
  • I have typed my code
  • I have created / updated the docstrings
  • I have updated the README, if relevant
  • I have updated the requirements files if a new package is used
  • I have tested my code
  • The CI pipeline passes
  • I have performed a self-review of my code

Copy link
Contributor

github-actions bot commented Oct 3, 2024

Coverage

Coverage Report for Python 3.10
FileStmtsMissCoverMissing
choice_learn/data
   choice_dataset.py6473395%198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 937, 957–961, 1140, 1159–1161, 1174–1176, 1204, 1209, 1218, 1235, 1276, 1288, 1302, 1341, 1356, 1361, 1390, 1403, 1438–1439
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   base.py38921345%38, 63–70, 92–98, 120, 144–156, 226, 232–261, 266–335, 350–399, 414–446, 455–522, 609–621, 624–627, 630, 637–648, 652–665, 674–700, 708, 714, 781, 868, 913, 962, 1047, 1132
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/models
   __init__.py13285%14–15
   base_model.py2481992%139, 181, 278, 297, 337, 344, 373, 392, 423–424, 433–434, 633–634, 790, 792–795
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 623–632, 648–669, 694–718, 722–745
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   reslogit.py132795%281, 285, 360, 369, 374, 382, 432
   rumnet.py23715435%174–178, 189–221, 238–246, 271–275, 288–320, 337–344, 367–371, 384–420, 435–445, 535, 537, 597, 632–676, 715–759, 800–827, 881–933, 963–981, 986, 1025–1079, 1118–1162, 1200–1227
   simple_mnl.py138795%154, 166, 272, 344, 352, 354, 356
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%3–675
   or_tools_opt.py2262260%3–666
TOTAL3982191552% 

Tests Skipped Failures Errors Time
95 0 💤 1 ❌ 0 🔥 2m 52s ⏱️

Copy link
Contributor

github-actions bot commented Oct 3, 2024

Coverage

Coverage Report for Python 3.11
FileStmtsMissCoverMissing
choice_learn/data
   choice_dataset.py6473395%198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 937, 957–961, 1140, 1159–1161, 1174–1176, 1204, 1209, 1218, 1235, 1276, 1288, 1302, 1341, 1356, 1361, 1390, 1403, 1438–1439
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   base.py38921345%38, 63–70, 92–98, 120, 144–156, 226, 232–261, 266–335, 350–399, 414–446, 455–522, 609–621, 624–627, 630, 637–648, 652–665, 674–700, 708, 714, 781, 868, 913, 962, 1047, 1132
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/models
   __init__.py13285%14–15
   base_model.py2481992%139, 181, 278, 297, 337, 344, 373, 392, 423–424, 433–434, 633–634, 790, 792–795
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 623–632, 648–669, 694–718, 722–745
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   reslogit.py132695%285, 360, 369, 374, 382, 432
   rumnet.py23715435%174–178, 189–221, 238–246, 271–275, 288–320, 337–344, 367–371, 384–420, 435–445, 535, 537, 597, 632–676, 715–759, 800–827, 881–933, 963–981, 986, 1025–1079, 1118–1162, 1200–1227
   simple_mnl.py138795%154, 166, 272, 344, 352, 354, 356
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%3–675
   or_tools_opt.py2262260%3–666
TOTAL3982191452% 

Tests Skipped Failures Errors Time
95 0 💤 0 ❌ 0 🔥 3m 4s ⏱️

Copy link
Contributor

github-actions bot commented Oct 3, 2024

Coverage

Coverage Report for Python 3.9
FileStmtsMissCoverMissing
choice_learn/data
   choice_dataset.py6473395%198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 937, 957–961, 1140, 1159–1161, 1174–1176, 1204, 1209, 1218, 1235, 1276, 1288, 1302, 1341, 1356, 1361, 1390, 1403, 1438–1439
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   base.py38921445%40–41, 63–70, 92–98, 120, 144–156, 226, 232–261, 266–335, 350–399, 414–446, 455–522, 609–621, 624–627, 630, 637–648, 652–665, 674–700, 708, 714, 781, 868, 913, 962, 1047, 1132
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/models
   __init__.py13285%14–15
   base_model.py2481992%139, 181, 278, 297, 337, 344, 373, 392, 423–424, 433–434, 633–634, 790, 792–795
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 623–632, 648–669, 694–718, 722–745
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   reslogit.py132695%285, 360, 369, 374, 382, 432
   rumnet.py23715435%174–178, 189–221, 238–246, 271–275, 288–320, 337–344, 367–371, 384–420, 435–445, 535, 537, 597, 632–676, 715–759, 800–827, 881–933, 963–981, 986, 1025–1079, 1118–1162, 1200–1227
   simple_mnl.py138795%154, 166, 272, 344, 352, 354, 356
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2362360%3–675
   or_tools_opt.py2262260%3–666
TOTAL3980191352% 

Tests Skipped Failures Errors Time
95 0 💤 0 ❌ 0 🔥 3m 14s ⏱️

Copy link
Contributor

github-actions bot commented Oct 3, 2024

Coverage

Coverage Report for Python 3.12
FileStmtsMissCoverMissing
choice_learn/data
   choice_dataset.py6473395%198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 937, 957–961, 1140, 1159–1161, 1174–1176, 1204, 1209, 1218, 1235, 1276, 1288, 1302, 1341, 1356, 1361, 1390, 1403, 1438–1439
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   base.py38921345%38, 63–70, 92–98, 120, 144–156, 226, 232–261, 266–335, 350–399, 414–446, 455–522, 609–621, 624–627, 630, 637–648, 652–665, 674–700, 708, 714, 781, 868, 913, 962, 1047, 1132
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/models
   __init__.py13285%14–15
   base_model.py2481992%139, 181, 278, 297, 337, 344, 373, 392, 423–424, 433–434, 633–634, 790, 792–795
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 623–632, 648–669, 694–718, 722–745
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   reslogit.py132695%285, 360, 369, 374, 382, 432
   rumnet.py23715435%174–178, 189–221, 238–246, 271–275, 288–320, 337–344, 367–371, 384–420, 435–445, 535, 537, 597, 632–676, 715–759, 800–827, 881–933, 963–981, 986, 1025–1079, 1118–1162, 1200–1227
   simple_mnl.py138795%154, 166, 272, 344, 352, 354, 356
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%3–675
   or_tools_opt.py2262260%3–666
TOTAL3982191452% 

Tests Skipped Failures Errors Time
95 0 💤 0 ❌ 0 🔥 4m 13s ⏱️

@julesdesir
Copy link
Collaborator Author

I ran all the tests with PyTest 5 times locally and it successfully passed every times. Fingers crossed!

Copy link
Collaborator

@VincentAuriau VincentAuriau left a comment

Choose a reason for hiding this comment

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

🤞🤞🤞

@VincentAuriau VincentAuriau merged commit b82ee45 into main Oct 3, 2024
4 checks passed
@VincentAuriau VincentAuriau deleted the develop branch October 3, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants