diff --git a/python/tvm/meta_schedule/database/json_database.py b/python/tvm/meta_schedule/database/json_database.py index 6897b82d98888..64f0d98504dfb 100644 --- a/python/tvm/meta_schedule/database/json_database.py +++ b/python/tvm/meta_schedule/database/json_database.py @@ -15,6 +15,8 @@ # specific language governing permissions and limitations # under the License. """The default database that uses a JSON File to store tuning records""" +from typing import Optional + from tvm._ffi import register_object from .. import _ffi_api @@ -38,17 +40,19 @@ class JSONDatabase(Database): def __init__( self, - path_workload: str, - path_tuning_record: str, + *, + path_workload: Optional[str] = None, + path_tuning_record: Optional[str] = None, + work_dir: Optional[str] = None, allow_missing: bool = True, ) -> None: """Constructor. Parameters ---------- - path_workload : str + path_workload : Optional[str] = None The path to the workload table. - path_tuning_record : str + path_tuning_record : Optional[str] = None The path to the tuning record table. allow_missing : bool Whether to create new file when the given path is not found.