Samsung / ONE

On-device Neural Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[onecc] file path with # comment

seanshpark opened this issue · comments

When we add a comment at the path line, it isn't stripped.

[onecc]
one-import-onnx = True

[one-import-onnx]
input_path = avg_pool_test.onnx # 1
output_path = avg_pool_test.circle #  2

expected: converts avg_pool_test.onnx to avg_pool_test.circle
actual: ends with error

one-import-onnx: FileNotFoundError: [Errno 2] No such file or directory: 'avg_pool_test.onnx # 1'

And log file 'avg_pool_test.circle # 2.log' is generated, which I expected to be avg_pool_test.circle.log

https://docs.python.org/3/library/configparser.html

By default inline comments are disabled and '#' and ';' are used as prefixes for whole line comments.
Inline comments can be harmful because they prevent users from using the delimiting characters as parts of values.

That being said, we can support an inline comment. What's your take on this?

we can support an inline comment. What's your take on this?

Hope to work # or ; as comments afterwards :)

whole line comments.

Need to check this...

For

key=value # comment

I expect to get an dict like this

{
 "key" : "value"
}

done :)