llvm / llvm/torch-mlir

Python tests are failing in Windows build

Open
#4,040 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.9k
Forks
736
Avg merge
5d 22h
Merged PRs (30d)
15

Description

There are two types of failures when running the python based tests on Windows:

  1. End-to-end execution tests are failing due to the signal.SIGALRM (used for timeout handling in the following piece of testing code) is not available for Windows https://github.com/llvm/torch-mlir/blob/a265d283357f572c5437f9217ea85fa9770d374c/projects/pt1/python/torch_mlir_e2e_test/framework.py#L310-L323
    One possible solution is to use the https://pypi.org/project/pytest-timeout/ plugin with pytest which offers portability across different platforms.

  2. Python API unit tests using LLVM's lit testing framework are failing due to pwd module not being available in Windows. This failure is a bit puzzling as it seems to be triggered from fx.export_and_import as seen in the logs, but running the file from CLI directly such as python test\python\fx_importer\v2.3\types_test.py doesn't produce any error.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with projects/pt1/python/torch_mlir_e2e_test/framework.py at the timeout-handling code around lines 310-323, then review the pytest-timeout option mentioned in the issue. Reproduce the Windows failures in the end-to-end tests and the LLVM lit Python API tests, including test/python/fx_importer/v2.3/types_test.py and the fx.export_and_import path. Done means both Windows test failures are resolved and the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.