我已经为这个错误挣扎了一天。我试图在colab上使用VertexAI运行Kubeflow管道进行模型微调。这是我的代码
# Get the current date for model namingdate = datetime.datetime.now().strftime("%Y-%m-%d")MODEL_NAME = f"qa-model-{date}"# Pipeline argumentspipeline_arguments = { "model_display_name": MODEL_NAME, "location": REGION, "project": PROJECT_ID, "large_model_reference": "gemini-1.0-pro-002", # Model reference for question answering "train_steps": TRAINING_STEPS, "dataset_uri": TRAINING_DATA_URI, "evaluation_interval": EVALUATION_INTERVAL, "evaluation_data_uri": EVALUATION_DATA_URI,}# Define the pipeline template path for model tuningtemplate_path = "https://us-kfp.pkg.dev/ml-pipeline/large-language-model-pipelines/tune-large-model/v2.0.0"# Create a pipeline job for fine-tuning the modeljob = aiplatform.PipelineJob( template_path=template_path, display_name="fine-tune-gemini-qa", parameter_values=pipeline_arguments, location=REGION, pipeline_root="gs://zeinab-llmops-vertexai/pipeline_root", # GCS path for storing pipeline artifacts enable_caching=True)# Submit the pipeline jobjob.submit()
显然,我试图使用Gemini,但却得到了以下错误,该错误抱怨使用了Bison并建议我使用Gemini!!
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.FAILED_PRECONDITION details = "Bison model tuning is deprecated. Please migrate to Gemini tuning." debug_error_string = "UNKNOWN:Error received from peer ipv4:172.217.203.95:443 {created_time:"2025-02-28T06:30:14.731451386+00:00", grpc_status:9, grpc_message:"Bison model tuning is deprecated. Please migrate to Gemini tuning."}">The above exception was the direct cause of the following exception:FailedPrecondition Traceback (most recent call last)/usr/local/lib/python3.11/dist-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs) 76 return callable_(*args, **kwargs) 77 except grpc.RpcError as exc:---> 78 raise exceptions.from_grpc_error(exc) from exc 79 80 return error_remapped_callableFailedPrecondition: 400 Bison model tuning is deprecated. Please migrate to Gemini tuning.
我有一个付费的GCP账户,信用额度充足,并且在项目中拥有Vertex AI用户角色。任何帮助我都会非常感激!
回答:
你可以在这里找到如何调优Gemini: https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini-use-supervised-tuning
你使用的SDK语法确实是来自已弃用的Bison