feat(components): add a check for model garden models and skip eval import
PiperOrigin-RevId: 535431767
This commit is contained in:
parent
9e5e6c6250
commit
1782ee2d89
|
|
@ -18,7 +18,7 @@ import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, Dict, List, Optional, Tuple, Iterable
|
from typing import Any, Dict, Iterable, List, Optional, Tuple
|
||||||
|
|
||||||
from google.api_core import gapic_v1
|
from google.api_core import gapic_v1
|
||||||
from google.cloud import aiplatform
|
from google.cloud import aiplatform
|
||||||
|
|
@ -135,6 +135,9 @@ def main(argv):
|
||||||
"""Calls ModelService.ImportModelEvaluation."""
|
"""Calls ModelService.ImportModelEvaluation."""
|
||||||
parsed_args, _ = parser.parse_known_args(argv)
|
parsed_args, _ = parser.parse_known_args(argv)
|
||||||
|
|
||||||
|
if parsed_args.model_name.startswith('publishers'):
|
||||||
|
return
|
||||||
|
|
||||||
_, project_id, _, location, _, model_id = parsed_args.model_name.split('/')
|
_, project_id, _, location, _, model_id = parsed_args.model_name.split('/')
|
||||||
api_endpoint = location + '-aiplatform.googleapis.com'
|
api_endpoint = location + '-aiplatform.googleapis.com'
|
||||||
resource_uri_prefix = f'https://{api_endpoint}/v1/'
|
resource_uri_prefix = f'https://{api_endpoint}/v1/'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue