comaniac commented on a change in pull request #8421:
URL: https://github.com/apache/tvm/pull/8421#discussion_r666561570
##########
File path: python/tvm/autotvm/task/task.py
##########
@@ -264,6 +264,25 @@ def _get_inputs(out):
return inputs
+class MissingTask(TaskTemplate):
+ """
+ Dummy task template for a task lookup which cannot be resolved.
+ This can occur if the task being requested from _lookup_task()
+ has not been imported in this run.
+ """
+
+ def __init__(self, taskname: str):
+ super().__init__()
+ self._taskname = taskname
+
+ def __call__(self, *args, **kwargs):
+ raise RuntimeError(
+ f"Attempting to invoke unknown task {self._taskname}."
+ "It is possible that the function is registered in a "
+ "Python module that is not imported in this run."
Review comment:
```suggestion
f"Attempting to invoke a missing task {self._taskname}."
"It is possible that the function is registered in a "
"Python module that is not imported in this run, or the log is
out-of-date."
```
--
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]