{"record":{"id":"1e9e1ef73c88092a","repo":"hiyouga/LlamaFactory","slug":"environment-information-is-not-implemented-yet","errorCode":null,"errorMessage":"Environment information is not implemented yet.","messagePattern":"Environment information is not implemented yet\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"warning","filePath":"src/llamafactory/v1/launcher.py","lineNumber":134,"sourceCode":"            torchrun_args + script_args,\n            env=env,\n            check=True,\n        )\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\":","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/hiyouga/LlamaFactory/blob/f28afaf6355af515454dfb16c97d728307c93897/src/llamafactory/v1/launcher.py#L116-L152","documentation":"The v1 launcher dispatches CLI subcommands to v1 implementations, but the 'env' command has no v1 implementation yet, so it raises NotImplementedError. It is a known gap in the experimental v1 architecture, not a broken environment.","triggerScenarios":"Running `llamafactory-cli env` (or `lmf env`) with USE_V1=1 set in the environment.","commonSituations":"User switches to the experimental v1 path to try new trainers, then runs the familiar `env` diagnostics command from v0 docs.","solutions":["Unset USE_V1 and run `llamafactory-cli env` under v0.","Gather environment info manually: `pip list | grep -E 'torch|transformers|deepspeed'` and `nvidia-smi`.","Track/watch the v1 launcher for the implementation landing."],"exampleFix":"# before\nUSE_V1=1 llamafactory-cli env\n\n# after\nunset USE_V1\nllamafactory-cli env","handlingStrategy":"validation","validationCode":"import os\nassert os.environ.get(\"USE_V1\") != \"1\" or command != \"env\", \"'env' is unimplemented in v1; unset USE_V1\"","typeGuard":null,"tryCatchPattern":"try:\n    run_cli(\"env\")\nexcept NotImplementedError:\n    os.environ.pop(\"USE_V1\", None)\n    run_cli(\"env\")","preventionTips":["Wrap llamafactory-cli in project scripts that unset USE_V1 for env/version subcommands.","Document which subcommands are v1-complete before adopting USE_V1=1."],"tags":["cli","not-implemented","v1-api","environment"],"backgroundTag":null,"analyzedSha":"f28afaf6355af515454dfb16c97d728307c93897","analyzedAt":"2026-08-14T21:57:28.298Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}