diff --git a/agentplatform/resources/preview/feature_store/offline_store.py b/agentplatform/resources/preview/feature_store/offline_store.py index 4ba369d168..1e55ae127c 100644 --- a/agentplatform/resources/preview/feature_store/offline_store.py +++ b/agentplatform/resources/preview/feature_store/offline_store.py @@ -116,7 +116,7 @@ def _feature_to_data_source( bq_uri = feature_group._gca_resource.big_query.big_query_source.input_uri assert bq_uri - fully_qualified_table = bq_uri.lstrip("bq://") + fully_qualified_table = bq_uri.removeprefix("bq://") assert fully_qualified_table query = ( diff --git a/google/cloud/aiplatform/preview/datasets.py b/google/cloud/aiplatform/preview/datasets.py index 1616abb991..2a19876e8b 100644 --- a/google/cloud/aiplatform/preview/datasets.py +++ b/google/cloud/aiplatform/preview/datasets.py @@ -39,7 +39,6 @@ from google.protobuf import struct_pb2 from google.protobuf import json_format - _MULTIMODAL_METADATA_SCHEMA_URI = ( "gs://google-cloud-aiplatform/schema/dataset/metadata/multimodal_1.0.0.yaml" ) @@ -1122,7 +1121,9 @@ def to_bigframes(self) -> "bigframes.pandas.DataFrame": # type: ignore # noqa: A BigFrames dataframe. """ bigframes = _try_import_bigframes() - return bigframes.pandas.read_gbq_table(self.bigquery_table.lstrip("bq://")) + return bigframes.pandas.read_gbq_table( + self.bigquery_table.removeprefix("bq://") + ) @classmethod @base.optional_sync() @@ -1409,7 +1410,7 @@ def assemble( ) result = assemble_lro.result(timeout=None) _LOGGER.log_action_completed_against_resource("data", "assembled", self) - table_id = result.bigquery_destination.lstrip("bq://") + table_id = result.bigquery_destination.removeprefix("bq://") if load_dataframe: session_options = bigframes.BigQueryOptions( credentials=initializer.global_config.credentials, diff --git a/vertexai/resources/preview/feature_store/offline_store.py b/vertexai/resources/preview/feature_store/offline_store.py index 3a785711e4..ad5bf193e7 100644 --- a/vertexai/resources/preview/feature_store/offline_store.py +++ b/vertexai/resources/preview/feature_store/offline_store.py @@ -118,7 +118,8 @@ def _feature_to_data_source( bq_uri = feature_group._gca_resource.big_query.big_query_source.input_uri assert bq_uri - fully_qualified_table = bq_uri.lstrip("bq://") + fully_qualified_table = bq_uri.removeprefix("bq://") + assert fully_qualified_table query = (