@mehrdadh thanks for the review!
Yes, if a Project API method implementation is absent a `TypeError` will be
raised at the server side because the abstract method is not implemented when
the Handler class is derived. Also as per
https://github.com/apache/tvm-rfcs/blame/main/rfcs/0008-microtvm-project-api.md#L363
I understand the implementation for all of the methods are indeed mandatory.
Thus, just as a reference something similar to the following will happen:
```
gromero@amd:~/git/tvm$ tvmc micro create-project --force /tmp/x46
~/scripts/sine.tar zephyr --project-option zephyr_board=stm32f746g_disco
project_type=host_driven
Traceback (most recent call last):
File
"/home/gromero/git/tvm/apps/microtvm/zephyr/template_project/microtvm_api_server.py",
line 739, in
server.main(Handler())
TypeError: Can't instantiate abstract class Handler with abstract method build
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/gromero/git/tvm/python/tvm/driver/tvmc/__main__.py", line 24, in
tvmc.main.main()
File "/home/gromero/git/tvm/python/tvm/driver/tvmc/main.py", line 94, in main
sys.exit(_main(sys.argv[1:]))
File "/home/gromero/git/tvm/python/tvm/driver/tvmc/main.py", line 69, in _main
make_subparser(subparser, parser)
File "/home/gromero/git/tvm/python/tvm/driver/tvmc/micro.py", line 173, in
add_micro_parser
template = project.TemplateProject.from_directory(template_dir)
File "/home/gromero/git/tvm/python/tvm/micro/project.py", line 110, in
from_directory
return cls(client.instantiate_from_dir(template_project_dir))
File "/home/gromero/git/tvm/python/tvm/micro/project.py", line 114, in
__init__
self._info = self._api_client.server_info_query(__version__)
File "/home/gromero/git/tvm/python/tvm/micro/project_api/client.py", line
143, in server_info_query
reply = self._request_reply("server_info_query", {"tvm_version":
tvm_version})
File "/home/gromero/git/tvm/python/tvm/micro/project_api/client.py", line
119, in _request_reply
raise ConnectionShutdownError("got EOF reading reply from API server")
tvm.micro.project_api.client.ConnectionShutdownError: got EOF reading reply
from API server
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm-rfcs/pull/43#issuecomment-955016008