[TOOLS] JSON upgrader to upgrade serialized json. (#4730)
authorTianqi Chen <tqchen@users.noreply.github.com>
Fri, 17 Jan 2020 18:07:13 +0000 (10:07 -0800)
committerGitHub <noreply@github.com>
Fri, 17 Jan 2020 18:07:13 +0000 (10:07 -0800)
commit67b97e5a459c8c1a0bc5f3c4e250338e6e53b5cc
treec81eaeb8001a01a884046db9efc3ffc3d669fda8
parenta5bb789a7b22957fafd1f91e4f7a4da5dc761ec4
[TOOLS] JSON upgrader to upgrade serialized json. (#4730)

During Unified IR refactor we will change the structure of IRs.
This will cause certain historical modules stored via json no longer
able to be loaded by the current version.

This PR introduces a backward compatible layer to try its best effort
to upgrade json from previous version(this case 0.6) to the current version.
We mainly aim to support update of high-level ir(relay).
python/tvm/api.py
python/tvm/json_compact.py [new file with mode: 0644]
tests/python/relay/test_json_compact.py [new file with mode: 0644]