1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-17 17:34:35 +08:00
Files
qlib/qlib/contrib/tuner/launcher.py
SunsetWolf 144e1e2459 Fix pylint (#888)
* add_pylint_to_workflow

* fix-pylint

* fix_pylinterror

* fix-issue
2022-01-26 19:27:24 +08:00

37 lines
806 B
Python

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# pylint: skip-file
# coding=utf-8
import argparse
import importlib
import os
import yaml
from .config import TunerConfigManager
args_parser = argparse.ArgumentParser(prog="tuner")
args_parser.add_argument(
"-c",
"--config_path",
required=True,
type=str,
help="config path indicates where to load yaml config.",
)
args = args_parser.parse_args()
TUNER_CONFIG_MANAGER = TunerConfigManager(args.config_path)
def run():
# 1. Get pipeline class.
tuner_pipeline_class = getattr(importlib.import_module(".pipeline", package="qlib.contrib.tuner"), "Pipeline")
# 2. Init tuner pipeline.
tuner_pipeline = tuner_pipeline_class(TUNER_CONFIG_MANAGER)
# 3. Begin to tune
tuner_pipeline.run()