Skip to content

Commit eea112e

Browse files
author
Roja Reddy Sareddy
committed
Add numpy 2.0 support
1 parent 702c3c3 commit eea112e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/integ/sagemaker/feature_store/feature_processor/test_feature_processor_integ.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,15 +1108,15 @@ def get_expected_dataframe():
11081108
expected_dataframe = pd.read_csv(os.path.join(_FEATURE_PROCESSOR_DIR, "car-data.csv"))
11091109
expected_dataframe["Model"].replace("^\d\d\d\d\s", "", regex=True, inplace=True) # noqa: W605
11101110
expected_dataframe["Mileage"].replace("(,)|(mi\.)", "", regex=True, inplace=True) # noqa: W605
1111-
expected_dataframe["Mileage"].replace("Not available", np.NaN, inplace=True)
1111+
expected_dataframe["Mileage"].replace("Not available", np.nan, inplace=True)
11121112
expected_dataframe["Price"].replace("\$", "", regex=True, inplace=True) # noqa: W605
11131113
expected_dataframe["Price"].replace(",", "", regex=True, inplace=True)
11141114
expected_dataframe["MSRP"].replace(
11151115
"(^MSRP\s\\$)|(,)", "", regex=True, inplace=True # noqa: W605
11161116
)
1117-
expected_dataframe["MSRP"].replace("Not specified", np.NaN, inplace=True)
1117+
expected_dataframe["MSRP"].replace("Not specified", np.nan, inplace=True)
11181118
expected_dataframe["MSRP"].replace(
1119-
"\\$\d+[a-zA-Z\s]+", np.NaN, regex=True, inplace=True # noqa: W605
1119+
"\\$\d+[a-zA-Z\s]+", np.nan, regex=True, inplace=True # noqa: W605
11201120
)
11211121
expected_dataframe["Mileage"] = expected_dataframe["Mileage"].astype(float)
11221122
expected_dataframe["Price"] = expected_dataframe["Price"].astype(float)

tests/integ/sagemaker/serve/test_tensorflow_serving_numpy2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ def test_tensorflow_serving_with_sample_mlflow_model(self, sagemaker_session):
6161
logger.info("Testing TensorFlow Serving with sample MLflow model")
6262

6363
# Use constant MLflow model structure from test data
64-
mlflow_model_dir = os.path.join(DATA_DIR, "serve_resources", "mlflow", "tensorflow_numpy2_removed")
64+
mlflow_model_dir = os.path.join(
65+
DATA_DIR, "serve_resources", "mlflow", "tensorflow_numpy2_removed"
66+
)
6567

6668
# Create schema builder with numpy 2.0 arrays
6769
input_data = np.array([[1.0, 2.0, 3.0, 4.0]], dtype=np.float32)

0 commit comments

Comments
 (0)