{"record":{"id":"9ba724f50cb946ad","repo":"mlflow/mlflow","slug":"invalid-parameter-value-9ba724","errorCode":"INVALID_PARAMETER_VALUE","errorMessage":"The provided directory {local_checkpoint_dir} does not contain a config.json file.Please ensure that the directory contains a valid transformers model checkpoint.","messagePattern":"The provided directory (.+?) does not contain a config\\.json file\\.Please ensure that the directory contains a valid transformers model checkpoint\\.","errorType":"validation","errorClass":"MlflowException","httpStatus":null,"severity":"error","filePath":"mlflow/transformers/flavor_config.py","lineNumber":203,"sourceCode":"def build_flavor_config_from_local_checkpoint(\n    local_checkpoint_dir: str,\n    task: str,\n    processor=None,\n    torch_dtype=None,\n) -> dict[str, Any]:\n    \"\"\"\n    Generates the flavor metadata from a Hugging Face model repository ID\n    e.g. \"meta-llama/Meta-Llama-3.1-405B, instead of the pipeline instance in-memory.\n    \"\"\"\n    import transformers\n    from transformers import AutoTokenizer, pipelines\n    from transformers.utils import is_torch_available\n\n    from mlflow.transformers.model_io import _MODEL_BINARY_FILE_NAME\n\n    config_path = os.path.join(local_checkpoint_dir, \"config.json\")\n    if not os.path.exists(config_path):\n        raise MlflowException(\n            f\"The provided directory {local_checkpoint_dir} does not contain a config.json file.\"\n            \"Please ensure that the directory contains a valid transformers model checkpoint.\",\n            error_code=INVALID_PARAMETER_VALUE,\n        )\n\n    with open(config_path) as f:\n        config = json.load(f)\n\n    task_metadata = pipelines.check_task(task)\n    pipeline_class = task_metadata[1][\"impl\"].__name__\n\n    flavor_conf = {\n        FlavorKey.TASK: task,\n        FlavorKey.INSTANCE_TYPE: pipeline_class,\n        FlavorKey.TORCH_DTYPE: str(torch_dtype) if torch_dtype else None,\n        FlavorKey.MODEL_TYPE: config[\"architectures\"][0],\n        FlavorKey.MODEL_NAME: local_checkpoint_dir,\n        FlavorKey.MODEL_BINARY: _MODEL_BINARY_FILE_NAME,","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/transformers/flavor_config.py#L185-L221","documentation":"Error \"The provided directory {local_checkpoint_dir} does not contain a config.json file.Please ensure that the directory contains a valid transformers model checkpoint.\" thrown in mlflow/mlflow.","triggerScenarios":"Thrown at mlflow/transformers/flavor_config.py:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}