mirror of
https://github.com/xming521/WeClone.git
synced 2026-10-18 14:36:48 +08:00
7daa270736
Integrate suffixed encrypted storage across extraction, review, training, and inference. Add shared-password web authentication with two-hour sessions, private request logging, and an isolated profile-building pipeline. Fix encrypted dataset discovery at training entrypoints and duplicate CSV imports. Add synthetic storage, authentication, and log checks; update documentation and frontend assets.
21 lines
597 B
Python
21 lines
597 B
Python
from llamafactory.hparams import get_infer_args
|
|
from llamafactory.train.tuner import export_model
|
|
|
|
from weclone.train.security import model_runtime, parsed_cli_arguments
|
|
from weclone.utils.secure_storage import is_encrypted_mode
|
|
|
|
|
|
def main():
|
|
if not is_encrypted_mode():
|
|
export_model()
|
|
return
|
|
config = parsed_cli_arguments(get_infer_args)
|
|
if config.get("export_hub_model_id"):
|
|
raise ValueError("Encrypted model export requires a local export_dir")
|
|
with model_runtime(config) as runtime:
|
|
export_model(runtime)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|