{"record":{"id":"6890648d00fc789d","repo":"hiyouga/LlamaFactory","slug":"version-information-is-not-implemented-yet","errorCode":null,"errorMessage":"Version information is not implemented yet.","messagePattern":"Version information is not implemented yet\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"warning","filePath":"src/llamafactory/v1/launcher.py","lineNumber":137,"sourceCode":"        )\n\n        sys.exit(process.returncode)\n\n    elif command == \"chat\":\n        from .samplers.cli_sampler import run_chat\n\n        run_chat()\n\n    elif command == \"merge\":\n        from llamafactory.v1.plugins.model_plugins.peft import merge_and_export_model\n\n        merge_and_export_model()\n\n    elif command == \"env\":\n        raise NotImplementedError(\"Environment information is not implemented yet.\")\n\n    elif command == \"version\":\n        raise NotImplementedError(\"Version information is not implemented yet.\")\n\n    elif command == \"help\":\n        print(USAGE)\n\n    elif command in _DIST_TRAIN_COMMANDS:\n        # Single GPU training without torchrun\n        if command in (\"train\", \"sft\"):\n            from llamafactory.v1.trainers.sft_trainer import run_sft\n\n            run_sft()\n        elif command == \"dpo\":\n            from llamafactory.v1.trainers.dpo_trainer import run_dpo\n\n            run_dpo()\n        elif command == \"rm\":\n            from llamafactory.v1.trainers.rm_trainer import run_rm\n\n            run_rm()","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/hiyouga/LlamaFactory/blob/f28afaf6355af515454dfb16c97d728307c93897/src/llamafactory/v1/launcher.py#L119-L155","documentation":"The v1 launcher has no implementation for the 'version' subcommand yet and raises NotImplementedError. Purely a v1 coverage gap; the v0 launcher prints the version fine.","triggerScenarios":"Running `llamafactory-cli version` (or `lmf version`) with USE_V1=1.","commonSituations":"Scripts or CI that call `llamafactory-cli version` to log the installed version, executed in an environment where USE_V1=1 is exported.","solutions":["Unset USE_V1 before invoking the command: `env -u USE_V1 llamafactory-cli version`.","Use Python instead: `python -c \"import llamafactory; print(llamafactory.__version__)\"` or `pip show llamafactory`.","Remove the USE_V1=1 export from shell profile if v1 is not intended."],"exampleFix":"# before\nUSE_V1=1 llamafactory-cli version  # raises\n\n# after\npython -c \"from llamafactory.extras.misc import get_current_repo; ...\" # or simply:\nenv -u USE_V1 llamafactory-cli version","handlingStrategy":"validation","validationCode":"import os, subprocess\nif os.environ.get(\"USE_V1\") == \"1\":\n    import llamafactory\n    print(llamafactory.__version__)  # avoid the CLI gap\nelse:\n    subprocess.run([\"llamafactory-cli\", \"version\"])","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read llamafactory.__version__ programmatically instead of shelling out.","Keep CI version probes independent of USE_V1."],"tags":["cli","not-implemented","v1-api","version"],"backgroundTag":null,"analyzedSha":"f28afaf6355af515454dfb16c97d728307c93897","analyzedAt":"2026-08-14T21:57:28.298Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}