You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/03/22 00:29:40 UTC
[GitHub] [tvm] AndrewZhaoLuo commented on a change in pull request #10647: [FIX,AUTOTVM] Fix printing of measure results
AndrewZhaoLuo commented on a change in pull request #10647:
URL: https://github.com/apache/tvm/pull/10647#discussion_r831658290
##########
File path: python/tvm/autotvm/measure/measure.py
##########
@@ -56,7 +56,7 @@ class MeasureResult(namedtuple("MeasureResult", ["costs", "error_no", "all_cost"
def __repr__(self):
error_no_str = (
str(self.error_no)
- if self.error_no not in MeasureErrorNo
+ if not isinstance(self.error_no, (MeasureErrorNo, int))
Review comment:
Can you rewrite this without a `not` in your check?
Also write a comment that explains what happens if it's neither an int or a MeasureErrorNo? (Is it just an exception?)
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org