merrymercy commented on a change in pull request #4644: [Relay][AutoTVM] Relay
op strategy
URL: https://github.com/apache/incubator-tvm/pull/4644#discussion_r382324425
##########
File path: python/tvm/autotvm/record.py
##########
@@ -119,20 +124,29 @@ def decode(row, protocol='json'):
Parameters
----------
- row: str
+ row : str
a row in the logger file
- protocol: str
+
+ protocol : str
log protocol, json or pickle
Returns
-------
- input: autotvm.tuner.MeasureInput
- result: autotvm.tuner.MeasureResult
+ ret : tuple(autotvm.tuner.MeasureInput, autotvm.tuner.MeasureResult), or
None
+ The tuple of input and result, or None if input uses old version log
format.
"""
# pylint: disable=unused-variable
+ global _old_version_warning
+
if protocol == 'json':
row = json.loads(row)
- tgt, task_name, task_args, task_kwargs, workload, config = row['i']
+ if 'v' in row and row['v'] == 0.1:
+ if _old_version_warning:
+ logger.warning("AutoTVM log version 0.1 is no longer
supported.")
Review comment:
If it is not supported, why don't we just halt here?
I cannot think of a use case where someone mixes old logs and new logs and
wants to ignore the old logs.
The user should delete all old logs.
Then we can delete the checks like
```
if ret is not None:
continue
```
in other places.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services