Skip to content

Commit

Permalink
Update python to 3.8 (#571)
Browse files Browse the repository at this point in the history
* Update CI python to 3.8

* Update minimum python version to 3.8

* Fix scipy version above 1.10.0

* Fix confidence interval test
  • Loading branch information
qubvel committed Apr 18, 2024
1 parent 8dfe057 commit 7a18c55
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -44,10 +44,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.8"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_spaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
python-version: "3.8"
- name: Set up default Git config
run: |
git config --global user.name evaluate-bot
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"rouge_score>=0.1.2",
"sacrebleu",
"sacremoses",
"scipy",
"scipy>=1.10.0",
"seqeval",
"scikit-learn",
"jiwer",
Expand Down Expand Up @@ -139,7 +139,7 @@
entry_points={"console_scripts": ["evaluate-cli=evaluate.commands.evaluate_cli:main"]},
install_requires=REQUIRED_PKGS,
extras_require=EXTRAS_REQUIRE,
python_requires=">=3.7.0",
python_requires=">=3.8.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand All @@ -148,7 +148,6 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
8 changes: 4 additions & 4 deletions tests/test_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ def test_bootstrap(self):
random_state=0,
)
self.assertAlmostEqual(results["accuracy"]["score"], 0.666666, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][0], 0.33333, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][1], 0.666666, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][0], 0.33557, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][1], 1.0, 5)
self.assertAlmostEqual(results["accuracy"]["standard_error"], 0.22498, 5)

def test_perf(self):
Expand Down Expand Up @@ -394,8 +394,8 @@ def test_bootstrap_and_perf(self):
random_state=0,
)
self.assertAlmostEqual(results["accuracy"]["score"], 0.666666, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][0], 0.333333, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][1], 0.666666, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][0], 0.33557, 5)
self.assertAlmostEqual(results["accuracy"]["confidence_interval"][1], 1.0, 5)
self.assertAlmostEqual(results["accuracy"]["standard_error"], 0.22498285, 5)
self.assertAlmostEqual(results["total_time_in_seconds"], 0.1, 1)
self.assertAlmostEqual(results["samples_per_second"], len(data) / results["total_time_in_seconds"], 5)
Expand Down

0 comments on commit 7a18c55

Please sign in to comment.