-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c1d0a7
commit 8a275ff
Showing
3 changed files
with
23 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,9 @@ | ||
# Copyright (c) Alibaba, Inc. and its affiliates. | ||
from typing import TYPE_CHECKING | ||
|
||
from swift.utils.import_utils import _LazyModule | ||
from .app_ui import gradio_chat_demo, gradio_generation_demo, llm_app_ui | ||
from .infer import llm_infer, merge_lora, prepare_model_template | ||
from .rome import rome_infer | ||
# Recommend using `xxx_main` | ||
from .run import (app_ui_main, dpo_main, infer_main, merge_lora_main, | ||
rome_main, sft_main) | ||
from .sft import llm_sft | ||
from .utils import * | ||
|
||
if TYPE_CHECKING: | ||
from .app_ui import gradio_chat_demo, gradio_generation_demo, llm_app_ui | ||
from .infer import llm_infer, merge_lora, prepare_model_template | ||
from .rome import rome_infer | ||
# Recommend using `xxx_main` | ||
from .run import (app_ui_main, dpo_main, infer_main, merge_lora_main, | ||
rome_main, sft_main) | ||
from .sft import llm_sft | ||
else: | ||
_import_structure = { | ||
'app_ui': ['gradio_chat_demo', 'gradio_generation_demo', 'llm_app_ui'], | ||
'infer': ['llm_infer', 'merge_lora', 'prepare_model_template'], | ||
'rome': ['rome_infer'], | ||
'run': [ | ||
'app_ui_main', 'dpo_main', 'infer_main', 'merge_lora_main', | ||
'rome_main', 'sft_main' | ||
], | ||
'sft': ['llm_sft'], | ||
} | ||
|
||
import sys | ||
|
||
sys.modules[__name__] = _LazyModule( | ||
__name__, | ||
globals()['__file__'], | ||
_import_structure, | ||
module_spec=__spec__, | ||
extra_objects={}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters