nncf icon indicating copy to clipboard operation
nncf copied to clipboard

No exception raised when passing the wrong parameter names

Open dqawami opened this issue 3 years ago • 2 comments

Hello,

Recently I tried using quantization from the NNCF toolkit, and set up the parameters by declaring the "num_init_steps" and "num_bn_adaptation_steps", which did not raise any errors even though those parameters weren't correct, and quantization was not set up. Please add some error message for when parameters passed are not usable. Let me know if there is further information needed for this particular error.

dqawami avatar May 14 '21 17:05 dqawami

Greetings, @dqawami ! Thanks for reporting this.

Please provide an exact reproducer - the NNCF config .json file or part thereof that exhibits incorrect behaviour.

vshampor avatar May 15 '21 09:05 vshampor

Greetings, @dqawami ! Thanks for reporting this.

Please provide an exact reproducer - the NNCF config .json file or part thereof that exhibits incorrect behaviour.

No needed to provide a config file. The problem is well described. To reproduce the bug you need to change the name field num_init_samples num_init_steps and NNCF will not raise any exception.

kshpv avatar May 18 '21 09:05 kshpv

NNCF configs are validated using jsonschema, and parameter mistypes should be caught on the schema validation stage. See also https://openvinotoolkit.github.io/nncf/ for visual reference to the schema used for NNCF config file validation.

vshampor avatar Feb 24 '23 16:02 vshampor