You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the attached stack-trace below: compilation fails at the point of collecting compilation feedback with a message of [6:21, byte=99]: Expected object key, and dumps the compilation-feedback (which looks like json).
I looked up the error message in LLVM, and it's a json format error. If I take the json produced by the error message and run it through a json validation tool it gives me an error at the same line and byte.
The numbers contain a comma. If I replace the comma with a dot, it parses correctly.
I'm using compile_brevitas_qat_model from concrete-ml to compile a quantized Brevitas model to trigger this. I think the bug is in the concrete compiler, but please tell me if you'd rather I open this bug in concrete-ml instead. I haven't been able to create a minimal reproducer but was hoping this is enough information to fix the issue.
Let me know if I should provide a minimal repro or more info!
I have found a minimal repro, but it requires some complex interactions to trigger the bug. I can work around it so it's not urgent to fix (and it seems quite obscure), I'll just share what I've learned for your information because it's interesting :-)
Summary: If your system defaults to a locale that uses commas instead of dots to format decimal numbers, and you use any matplotlib.pyplot function, this sets your locale to your system's default and changes the way C formats your decimal numbers.
So, the error only occurs when I use matplotlib.pyplot. I found some bugs online that reference that this resets your locale as a side-effect (?!) It seems pretty old behavior (see this blog from 2006) so not sure if this will ever be fixed.
Here's a minimal file which reproduces the error on my machine.
This is because my default locale is Spanish. From cat /etc/default/locale: LC_NUMERIC="es_ES.UTF-8".
Awesome investigation, thanks @LenaMartens . As well you are totally right json serialization should be agnostics to the systems's locale, we use llvm::json library for this CompilationFeedback object serialization so I guess the bug is in this library.
Summary
See the attached stack-trace below: compilation fails at the point of collecting compilation feedback with a message of
[6:21, byte=99]: Expected object key
, and dumps the compilation-feedback (which looks like json).I looked up the error message in LLVM, and it's a json format error. If I take the json produced by the error message and run it through a json validation tool it gives me an error at the same line and byte.
Specifically, these two lines are problematic:
The numbers contain a comma. If I replace the comma with a dot, it parses correctly.
I'm using
compile_brevitas_qat_model
fromconcrete-ml
to compile a quantized Brevitas model to trigger this. I think the bug is in theconcrete
compiler, but please tell me if you'd rather I open this bug inconcrete-ml
instead. I haven't been able to create a minimal reproducer but was hoping this is enough information to fix the issue.Let me know if I should provide a minimal repro or more info!
Description
pError
, and it introducing commas in the compilation feedback json outputFull stack-trace
The text was updated successfully, but these errors were encountered: