Open dayo09 opened 2 years ago
Check if it's better to emplace this within onecc.
+1 for 'within onecc' because onecc also eventually needs this feature. 😸
/cc @seanshpark
in one-cmds
, utils.py
,
if not config.has_section(section):
raise AssertionError('configuration file doesn\'t have \'' + section +
'\' section')
onecc / one-build checks for the section.
What?
Let's provide a basic lexical checker on .cfg
If a user doesn't use our configuration editor, and imported an improvised .cfg file, it may contain some lexical error that can be checked simply.
Let's run a basic lexical checker and gives a feedback for that cases.
Expected Behavior
ERROR: 'There is no [onecc] section.' WARNING: 'There is [one-build] section. Do you mean [onecc] section?' (❗ icon for the config file on OneExplorer)
ERROR: 'There is no input_path for [one-import-tflite] section' (❗ icon for the config file on OneExplorer)
ERROR: 'There are more than one input_path for [one-import-tflite] section' (❗ icon for the config file on OneExplorer)
Why?
For now, we can only detect an error on model.cfg when we run the cfg directly. And it prints out an error from the specific tools rather than onecc itself.
For example
(When there are no onecc section, only one-build section instead)
onecc: ImportError: [onecc] section is required in configuration file
(When it has no input_path of one-import-tflite)
To be considered
Check if it's better to emplace this within onecc.