[v1] support switch v1 backend (#9226)
This commit is contained in:
@@ -13,11 +13,45 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
def launch():
|
||||
from llamafactory.train.tuner import run_exp # use absolute import
|
||||
def run_api():
|
||||
from llamafactory.api.app import run_api as _run_api
|
||||
|
||||
run_exp()
|
||||
_run_api()
|
||||
|
||||
|
||||
def run_chat():
|
||||
from llamafactory.chat.chat_model import run_chat as _run_chat
|
||||
|
||||
return _run_chat()
|
||||
|
||||
|
||||
def run_eval():
|
||||
raise NotImplementedError("Evaluation will be deprecated in the future.")
|
||||
|
||||
|
||||
def export_model():
|
||||
from llamafactory.train.tuner import export_model as _export_model
|
||||
|
||||
return _export_model()
|
||||
|
||||
|
||||
def run_exp():
|
||||
from llamafactory.train.tuner import run_exp as _run_exp
|
||||
|
||||
return _run_exp() # use absolute import
|
||||
|
||||
|
||||
def run_web_demo():
|
||||
from llamafactory.webui.interface import run_web_demo as _run_web_demo
|
||||
|
||||
return _run_web_demo()
|
||||
|
||||
|
||||
def run_web_ui():
|
||||
from llamafactory.webui.interface import run_web_ui as _run_web_ui
|
||||
|
||||
return _run_web_ui()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
launch()
|
||||
run_exp()
|
||||
|
||||
Reference in New Issue
Block a user