mirror of
https://github.com/GoogleCloudPlatform/vertex-ai-samples.git
synced 2026-09-26 14:42:04 +00:00
refactor: Use raw string in regex (#4016)
* refactor: Use raw string in regex * np.NaN was removed in the NumPy 2.0 * Move default python version to 3.10 * Move back default python version to 3.9 * Remove version mistmatched tes notebooks
This commit is contained in:
@@ -238,7 +238,7 @@ def _get_notebook_python_version(notebook_path: str) -> str:
|
||||
|
||||
# Look for the python version specification pattern
|
||||
re_match = re.search(
|
||||
"python version = (\d+\.\d+)", markdown, flags=re.IGNORECASE
|
||||
r"python version = (\d+\.\d+)", markdown, flags=re.IGNORECASE
|
||||
)
|
||||
if re_match:
|
||||
# get the version number
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
notebooks/official/vizier/gapic-vizier-multi-objective-optimization.ipynb
|
||||
notebooks/official/pipelines/lightweight_functions_component_io_kfp.ipynb
|
||||
notebooks/official/ml_metadata/sdk-metric-parameter-tracking-for-locally-trained-models.ipynb
|
||||
notebooks/official/custom/custom-tabular-bq-managed-dataset.ipynb
|
||||
.cloud-build/tests/python_version_test.ipynb
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
"df = bq_client.list_rows(table).to_dataframe()\n",
|
||||
"\n",
|
||||
"# Drop unusable rows\n",
|
||||
"df = df.replace(to_replace=NA_VALUES, value=np.NaN).dropna()\n",
|
||||
"df = df.replace(to_replace=NA_VALUES, value=np.nan).dropna()\n",
|
||||
"\n",
|
||||
"# Convert categorical columns to numeric\n",
|
||||
"df[\"island\"], _ = pd.factorize(df[\"island\"])\n",
|
||||
|
||||
Reference in New Issue
Block a user