Skip to content

Commit e47ca24

Browse files
ci: test Python 3.12 (#4059)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated the Python version in the CI/CD workflow from 3.11 to 3.12, enhancing compatibility and performance for testing environments. - **Bug Fixes** - Improved error reporting in parallel training tests, providing clearer output for failures to aid in debugging. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 05323f3 commit e47ca24

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/test_python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
group: [1, 2, 3, 4, 5, 6]
19-
python: ["3.8", "3.11"]
19+
python: ["3.8", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v4
@@ -68,7 +68,7 @@ jobs:
6868
strategy:
6969
fail-fast: false
7070
matrix:
71-
python: ["3.8", "3.11"]
71+
python: ["3.8", "3.12"]
7272
needs: testpython
7373
steps:
7474
- name: Get durations from cache

source/tests/tf/test_parallel_training.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ def test_two_workers(self):
4040
stdout=sp.PIPE,
4141
stderr=sp.STDOUT,
4242
)
43+
lines = []
4344
for line in iter(popen.stdout.readline, b""):
4445
if hasattr(line, "decode"):
4546
line = line.decode("utf-8")
4647
line = line.rstrip()
48+
lines.append(line)
4749
popen.wait()
48-
self.assertEqual(0, popen.returncode, "Parallel training failed!")
50+
self.assertEqual(
51+
0, popen.returncode, f"Parallel training failed!\n{''.join(lines)}"
52+
)
4953

5054

5155
if __name__ == "__main__":

0 commit comments

Comments
 (0)