gromero commented on a change in pull request #9229:
URL: https://github.com/apache/tvm/pull/9229#discussion_r738586393
##########
File path: python/tvm/micro/project_api/server.py
##########
@@ -42,15 +42,24 @@
_LOG = logging.getLogger(__name__)
-_ProjectOption = collections.namedtuple("ProjectOption", ("name", "choices",
"help"))
+_ProjectOption = collections.namedtuple(
+ "ProjectOption", ("name", "choices", "default", "type", "required",
"optional", "help")
+)
class ProjectOption(_ProjectOption):
+ """Class used to keep the metadata associated to project options."""
+
def __new__(cls, name, **kw):
"""Override __new__ to force all options except name to be specified
as kwargs."""
assert "name" not in kw
+ assert "required" in kw or "optional" in kw, "'required' or 'optional'
must be specified."
Review comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]