Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2025 05:38 AM
@Alberto_UmanaBelow I add all the log:
File <command-3498969875739223>, line 12
10 print(UC_MODEL_NAME)
11 print(uc_registered_model_info.version)
---> 12 deployment_info = agents.deploy("emoysis_catalog.cookbook.sop_chatbot", 13)
14 # Wait for the Review App to be ready
15 print("\nWaiting for endpoint to deploy. This can take 15 - 20 minutes.", end="")
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/databricks/agents/deployments.py:479, in deploy(model_name, model_version, scale_to_zero, environment_vars, instance_profile_arn, tags, workload_size, endpoint_name, **kwargs)
451 def deploy(
452 model_name: str,
453 model_version: int,
(...)
460 **kwargs,
461 ) -> Deployment:
462 """
463 Deploy new version of the agent.
464
(...)
477 Chain deployment metadata.
478 """
--> 479 _check_model_is_rag_compatible(model_name, model_version)
480 _check_model_name(model_name)
481 if endpoint_name is None:
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/databricks/agents/utils/mlflow_utils.py:96, in _check_model_is_rag_compatible(model_name, version)
95 def _check_model_is_rag_compatible(model_name: str, version: int):
---> 96 input_schema, output_schema = _load_model_schema(model_name, version)
97 return _check_model_is_rag_compatible_helper(input_schema, output_schema)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/databricks/agents/utils/mlflow_utils.py:90, in _load_model_schema(model_name, version)
88 mlflow.set_registry_uri(get_databricks_uc_registry_uri())
89 model_uri = f"models:/{model_name}/{str(version)}"
---> 90 model_info = mlflow.models.get_model_info(model_uri)
91 signature = model_info.signature
92 return signature.inputs, signature.outputs
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/models/model.py:984, in get_model_info(model_uri)
981 from mlflow.pyfunc import _download_artifact_from_uri
983 meta_file_uri = model_uri.rstrip("/") + "/" + MLMODEL_FILE_NAME
--> 984 meta_local_path = _download_artifact_from_uri(artifact_uri=meta_file_uri)
985 model_meta = Model.load(meta_local_path)
986 return ModelInfo(
987 artifact_path=model_meta.artifact_path,
988 flavors=model_meta.flavors,
(...)
997 metadata=model_meta.metadata,
998 )
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/tracking/artifact_utils.py:111, in _download_artifact_from_uri(artifact_uri, output_path, lineage_header_info)
108 repo = get_artifact_repository(artifact_uri=root_uri)
110 if isinstance(repo, ModelsArtifactRepository):
--> 111 return repo.download_artifacts(
112 artifact_path=artifact_path,
113 dst_path=output_path,
114 lineage_header_info=lineage_header_info,
115 )
116 return repo.download_artifacts(artifact_path=artifact_path, dst_path=output_path)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/store/artifact/models_artifact_repo.py:201, in ModelsArtifactRepository.download_artifacts(self, artifact_path, dst_path, lineage_header_info)
199 # Pass lineage header info if model is registered in UC
200 if isinstance(self.repo, UnityCatalogModelsArtifactRepository):
--> 201 model_path = self.repo.download_artifacts(
202 artifact_path, dst_path, lineage_header_info=lineage_header_info
203 )
204 else:
205 model_path = self.repo.download_artifacts(artifact_path, dst_path)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/store/artifact/unity_catalog_models_artifact_repo.py:157, in UnityCatalogModelsArtifactRepository.download_artifacts(self, artifact_path, dst_path, lineage_header_info)
156 def download_artifacts(self, artifact_path, dst_path=None, lineage_header_info=None):
--> 157 return self._get_artifact_repo(lineage_header_info=lineage_header_info).download_artifacts(
158 artifact_path, dst_path
159 )
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/store/artifact/artifact_repo.py:268, in ArtifactRepository.download_artifacts(self, artifact_path, dst_path)
266 # Submit download tasks
267 futures = {}
--> 268 if self._is_directory(artifact_path):
269 for file_info in self._iter_artifacts_recursive(artifact_path):
270 if file_info.is_dir: # Empty directory
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/store/artifact/artifact_repo.py:167, in ArtifactRepository._is_directory(self, artifact_path)
166 def _is_directory(self, artifact_path):
--> 167 listing = self.list_artifacts(artifact_path)
168 return len(listing) > 0
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/store/artifact/presigned_url_artifact_repo.py:104, in PresignedUrlArtifactRepository.list_artifacts(self, path)
101 req_body = json.dumps({"page_token": page_token}) if page_token else None
103 response_proto = ListDirectoryResponse()
--> 104 resp = call_endpoint(
105 host_creds=self.db_creds,
106 endpoint=endpoint,
107 method="GET",
108 json_body=req_body,
109 response_proto=response_proto,
110 )
111 for dir_entry in resp.contents:
112 rel_path = posixpath.relpath(dir_entry.path, self.artifact_uri)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/utils/rest_utils.py:370, in call_endpoint(host_creds, endpoint, method, json_body, response_proto, extra_headers)
367 call_kwargs["json"] = json_body
368 response = http_request(**call_kwargs)
--> 370 response = verify_rest_response(response, endpoint)
371 response_to_parse = response.text
372 js_dict = json.loads(response_to_parse)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-0ea80acf-754f-4b74-9414-f078ba584e3e/lib/python3.10/site-packages/mlflow/utils/rest_utils.py:240, in verify_rest_response(response, endpoint)
238 if response.status_code != 200:
239 if _can_parse_as_json_object(response.text):
--> 240 raise RestException(json.loads(response.text))
241 else:
242 base_msg = (
243 f"API request to endpoint {endpoint} "
244 f"failed with error code {response.status_code} != 200"
245 )