nod-ai / sharktank

SHARK Inference Modeling and Serving
Apache License 2.0
7 stars 9 forks source link

Fix quantizers_test on Windows. #64

Closed ScottTodd closed 3 weeks ago

ScottTodd commented 3 weeks ago

Each call to _roundtrip was creating a file with the same name in the temp directory and the second write would fail. This gives each temp file a unique name manually.

We could also

Sample error: FAILED sharktank\tests\types\quantizers_test.py::StaticScaledQuantizerTest::testPerTensorQuantDequant - RuntimeError: Error building parameter archive: D:\a\iree\iree\c\runtime\src\iree\base\internal\file_io.c:381: UNKNOWN; failed to open file 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpejgrnsnpStaticScaledQuantizerTest\poodoo.irpa'. Full logs: https://github.com/nod-ai/sharktank/actions/runs/9509442435/job/26212392662.

References:

ScottTodd commented 3 weeks ago

Still seeing another flake in ThetaTest, reported here: https://github.com/nod-ai/sharktank/pull/43#issuecomment-2187545440