Skip to content

Commit

Permalink
Fix dependencies (#141)
Browse files Browse the repository at this point in the history
ADD: Python 3.12 in CI
ADD: Python version < 3.13
FIX: poetry.lock
& small changes
  • Loading branch information
VincentAuriau authored Jul 31, 2024
1 parent be89983 commit 2b0034c
Show file tree
Hide file tree
Showing 5 changed files with 853 additions and 722 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ git clone git@github.com:artefactory/choice-learn.git

### Dependencies
For manual installation, Choice-Learn requires the following:
- Python (>=3.9)
- Python (>=3.9, <3.13)
- NumPy (>=1.24)
- pandas (>=1.5)

For modelling you need:
- TensorFlow (>=2.13)
- TensorFlow (>=2.14, <2.17)

> :warning: **Warning:** If you are a MAC user with a M1 or M2 chip, importing TensorFlow might lead to Python crashing.
> In such case, use anaconda to install TensorFlow with `conda install -c apple tensorflow`.
An optional requirement used for coefficients analysis and L-BFGS optimization is:
- TensorFlow Probability (>=0.20.1)
- TensorFlow Probability (>=0.22)

Finally for pricing or assortment optimization, you need either Gurobi or OR-Tools:
- gurobipy (>=11.0.0)
- ortools (>=9.6.2534)
- gurobipy (>=11.0)
- ortools (>=9.6)

<p align="center">
<a href="https://numpy.org/">
Expand Down
Loading

4 comments on commit 2b0034c

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage

Coverage Report for Python 3.11
FileStmtsMissCoverMissing
choice_learn
   tf_ops.py471764%45, 141–143, 199–203, 220–231
choice_learn/data
   choice_dataset.py62817971%67, 78, 101–112, 123, 145–153, 159, 168–177, 190–203, 221–288, 306–325, 333–339, 341, 353, 394–401, 408, 420, 450–451, 472, 482–483, 491, 519, 552, 559–568, 576–578, 585, 592, 633–634, 713, 727–733, 756–759, 829, 831, 867, 921, 926, 937–938, 969–970, 974–981, 986–997, 1004, 1008, 1102, 1116, 1135–1137, 1150–1152, 1180, 1185, 1194, 1206–1211, 1252, 1264, 1278, 1293, 1305, 1317, 1332, 1337, 1360, 1362, 1366, 1374–1375, 1379, 1387–1388, 1394–1398, 1403–1407, 1411, 1414–1415, 1462, 1479–1480, 1495, 1510
   indexer.py2337070%20, 31, 45, 60–67, 99, 103, 105–108, 179, 184–187, 203–205, 220–231, 261, 266, 288, 292, 336, 393, 409, 423, 492–493, 517, 524, 532, 545–567, 570–591, 601, 613
   storage.py1592386%22, 33, 51, 56, 61, 71, 151, 153, 160, 162, 166, 173, 176, 235–236, 262, 267, 295, 365, 371, 389, 419, 429
   store.py72720%2–274
choice_learn/datasets
   base.py34320141%36, 61–68, 90–96, 118, 185, 191–220, 225–294, 309–358, 373–405, 414–481, 566–578, 581–584, 587, 594–605, 609–622, 631–657, 665, 671, 738, 825, 870, 919, 1004
   expedia.py1029210%26–299
   tafeng.py49198%50
choice_learn/models
   __init__.py12283%12–13
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py1861860%3–609
   latent_class_mnl.py59590%3–299
   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
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   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%2–674
   or_tools_opt.py2262260%3–666
TOTAL3687220740% 

Tests Skipped Failures Errors Time
59 0 💤 0 ❌ 0 🔥 47.359s ⏱️

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage

Coverage Report for Python 3.9
FileStmtsMissCoverMissing
choice_learn
   tf_ops.py471764%45, 141–143, 199–203, 220–231
choice_learn/data
   choice_dataset.py62817971%67, 78, 101–112, 123, 145–153, 159, 168–177, 190–203, 221–288, 306–325, 333–339, 341, 353, 394–401, 408, 420, 450–451, 472, 482–483, 491, 519, 552, 559–568, 576–578, 585, 592, 633–634, 713, 727–733, 756–759, 829, 831, 867, 921, 926, 937–938, 969–970, 974–981, 986–997, 1004, 1008, 1102, 1116, 1135–1137, 1150–1152, 1180, 1185, 1194, 1206–1211, 1252, 1264, 1278, 1293, 1305, 1317, 1332, 1337, 1360, 1362, 1366, 1374–1375, 1379, 1387–1388, 1394–1398, 1403–1407, 1411, 1414–1415, 1462, 1479–1480, 1495, 1510
   indexer.py2337070%20, 31, 45, 60–67, 99, 103, 105–108, 179, 184–187, 203–205, 220–231, 261, 266, 288, 292, 336, 393, 409, 423, 492–493, 517, 524, 532, 545–567, 570–591, 601, 613
   storage.py1592386%22, 33, 51, 56, 61, 71, 151, 153, 160, 162, 166, 173, 176, 235–236, 262, 267, 295, 365, 371, 389, 419, 429
   store.py72720%2–274
choice_learn/datasets
   base.py34320241%38–39, 61–68, 90–96, 118, 185, 191–220, 225–294, 309–358, 373–405, 414–481, 566–578, 581–584, 587, 594–605, 609–622, 631–657, 665, 671, 738, 825, 870, 919, 1004
   expedia.py1029210%26–299
   tafeng.py49198%50
choice_learn/models
   __init__.py12283%12–13
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py1861860%3–609
   latent_class_mnl.py59590%3–299
   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
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   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%2–674
   or_tools_opt.py2262260%3–666
TOTAL3685220640% 

Tests Skipped Failures Errors Time
59 0 💤 0 ❌ 0 🔥 46.161s ⏱️

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage

Coverage Report for Python 3.10
FileStmtsMissCoverMissing
choice_learn
   tf_ops.py471764%45, 141–143, 199–203, 220–231
choice_learn/data
   choice_dataset.py62817971%67, 78, 101–112, 123, 145–153, 159, 168–177, 190–203, 221–288, 306–325, 333–339, 341, 353, 394–401, 408, 420, 450–451, 472, 482–483, 491, 519, 552, 559–568, 576–578, 585, 592, 633–634, 713, 727–733, 756–759, 829, 831, 867, 921, 926, 937–938, 969–970, 974–981, 986–997, 1004, 1008, 1102, 1116, 1135–1137, 1150–1152, 1180, 1185, 1194, 1206–1211, 1252, 1264, 1278, 1293, 1305, 1317, 1332, 1337, 1360, 1362, 1366, 1374–1375, 1379, 1387–1388, 1394–1398, 1403–1407, 1411, 1414–1415, 1462, 1479–1480, 1495, 1510
   indexer.py2337070%20, 31, 45, 60–67, 99, 103, 105–108, 179, 184–187, 203–205, 220–231, 261, 266, 288, 292, 336, 393, 409, 423, 492–493, 517, 524, 532, 545–567, 570–591, 601, 613
   storage.py1592386%22, 33, 51, 56, 61, 71, 151, 153, 160, 162, 166, 173, 176, 235–236, 262, 267, 295, 365, 371, 389, 419, 429
   store.py72720%2–274
choice_learn/datasets
   base.py34320141%36, 61–68, 90–96, 118, 185, 191–220, 225–294, 309–358, 373–405, 414–481, 566–578, 581–584, 587, 594–605, 609–622, 631–657, 665, 671, 738, 825, 870, 919, 1004
   expedia.py1029210%26–299
   tafeng.py49198%50
choice_learn/models
   __init__.py12283%12–13
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py1861860%3–609
   latent_class_mnl.py59590%3–299
   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
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   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%2–674
   or_tools_opt.py2262260%3–666
TOTAL3687220740% 

Tests Skipped Failures Errors Time
59 0 💤 0 ❌ 0 🔥 46.871s ⏱️

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage

Coverage Report for Python 3.12
FileStmtsMissCoverMissing
choice_learn
   tf_ops.py471764%45, 141–143, 199–203, 220–231
choice_learn/data
   choice_dataset.py62817971%67, 78, 101–112, 123, 145–153, 159, 168–177, 190–203, 221–288, 306–325, 333–339, 341, 353, 394–401, 408, 420, 450–451, 472, 482–483, 491, 519, 552, 559–568, 576–578, 585, 592, 633–634, 713, 727–733, 756–759, 829, 831, 867, 921, 926, 937–938, 969–970, 974–981, 986–997, 1004, 1008, 1102, 1116, 1135–1137, 1150–1152, 1180, 1185, 1194, 1206–1211, 1252, 1264, 1278, 1293, 1305, 1317, 1332, 1337, 1360, 1362, 1366, 1374–1375, 1379, 1387–1388, 1394–1398, 1403–1407, 1411, 1414–1415, 1462, 1479–1480, 1495, 1510
   indexer.py2337070%20, 31, 45, 60–67, 99, 103, 105–108, 179, 184–187, 203–205, 220–231, 261, 266, 288, 292, 336, 393, 409, 423, 492–493, 517, 524, 532, 545–567, 570–591, 601, 613
   storage.py1592386%22, 33, 51, 56, 61, 71, 151, 153, 160, 162, 166, 173, 176, 235–236, 262, 267, 295, 365, 371, 389, 419, 429
   store.py72720%2–274
choice_learn/datasets
   base.py34320141%36, 61–68, 90–96, 118, 185, 191–220, 225–294, 309–358, 373–405, 414–481, 566–578, 581–584, 587, 594–605, 609–622, 631–657, 665, 671, 738, 825, 870, 919, 1004
   expedia.py1029210%26–299
   tafeng.py49198%50
choice_learn/models
   __init__.py12283%12–13
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py1861860%3–609
   latent_class_mnl.py59590%3–299
   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
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   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%2–674
   or_tools_opt.py2262260%3–666
TOTAL3687220740% 

Tests Skipped Failures Errors Time
59 0 💤 0 ❌ 0 🔥 1m 6s ⏱️

Please sign in to comment.