[Bug]: test/test_mlx/test_mlx_format.py failed on Mac OS
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 175
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 99
Description
### Problem Description
test/test_mlx/test_mlx_format.py failed on Mac OS
https://github.com/intel/auto-round/actions/runs/28158683624/job/83393445527?pr=1952#step:6:1086
### Reproduction Steps
Run this test case on Mac OS.
### Environment Information
_No response_
### Error Logs
```shell
=================================== FAILURES ===================================
______________ TestMLXFormat.test_mlx_native_export_bits[2-W2A16] ______________
self =
bits = 2, scheme = 'W2A16'
@pytest.mark.parametrize(
"bits, scheme",
[
(2, "W2A16"),
(3, "W3A16"),
(4, "W4A16"),
(5, "W5A16"),
(6, "W6A16"),
(8, "W8A16"),
],
)
def test_mlx_native_export_bits(self, bits, scheme):
"""Export Qwen3-0.6B as a native MLX checkpoint at 2/3/4/8 bits."""
_quantize_and_save(
output_dir=self.save_dir,
scheme=scheme,
bits=bits,
fmt="mlx",
sym=True,
group_size=128,
)
> assert os.path.exists(os.path.join(self.save_dir, "config.json"))
E AssertionError: assert False
E + where False = ('/private/var/folders/bh/cdl3cft92_dbvg852_fp7y7w0000gn/T/pytest-of-runner/pytest-0/test_mlx_native_export_bits_2_0/mlx_saved/config.json')
E + where = .exists
E + where = os.path
E + and '/private/var/folders/bh/cdl3cft92_dbvg852_fp7y7w0000gn/T/pytest-of-runner/pytest-0/test_mlx_native_export_bits_2_0/mlx_saved/config.json' = ('/private/var/folders/bh/cdl3cft92_dbvg852_fp7y7w0000gn/T/pytest-of-runner/pytest-0/test_mlx_native_export_bits_2_0/mlx_saved', 'config.json')
E + where = .join
E + where = os.path
E + and '/private/var/folders/bh/cdl3cft92_dbvg852_fp7y7w0000gn/T/pytest-of-runner/pytest-0/test_mlx_native_export_bits_2_0/mlx_saved' = .save_dir
test/test_mlx/test_mlx_format.py:187: AssertionError
```
### Additional Context
We'd have local Mac for test, so please fix directly on this PR, https://github.com/intel/auto-round/pull/1952. Test will be triggered on GHA free MacOS agent.
Contributor guide
Research direction
Start with test/test_mlx/test_mlx_format.py, especially TestMLXFormat.test_mlx_native_export_bits and the _quantize_and_save call. Run this test on macOS and inspect why the MLX export does not create config.json in the temporary output directory. Done means the failing native export test passes on macOS; the issue asks for the fix on PR 1952.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100