Sagemaker pipeline multi model (#3500)

* Fix broken links and cleanup

* Add new roles and cleanup

* Cleanup printing of test data

* Remove pipeline default arguments and fixed grammar in notebook

* Add back xgboost evaluate test data conversion and update endpoint name in Jupyter notebook

* Add conda_python3 compatibility of Jupyter notebook

* Add test data reading in decision tree evaluation

* Revert endpoint_name to old value

Co-authored-by: A Yacat <abiyacat@amazon.com>
Co-authored-by: atqy <95724753+atqy@users.noreply.github.com>
This commit is contained in:
yacatab
2022-07-14 04:24:20 +08:00
committed by GitHub
parent b4b39f11f7
commit d5ba3bc04a
2 changed files with 6 additions and 3 deletions
@@ -50,10 +50,15 @@ if __name__ == "__main__":
test_path = "/opt/ml/processing/test/test.csv"
logger.info("Loading test input data")
logger.info("Loading test input data")
df = pd.read_csv(test_path, header=None)
logger.debug("Reading test data.")
y_test = df.iloc[:, 0].to_numpy()
df.drop(df.columns[0], axis=1, inplace=True)
X_test = numpy.array(df.values)
logger.info("Performing predictions against test data.")
predictions = model.predict(X_test)
@@ -185,7 +185,6 @@ def get_pipeline(
print(f"Data Wrangler flow {flow_file_name} uploaded to {flow_s3_uri}")
## Input - Flow: restate-athena-russia.flow
flow_input = ProcessingInput(
source=flow_s3_uri,
destination="/opt/ml/processing/flow",
@@ -347,7 +346,6 @@ def get_pipeline(
cache_config=cache_config,
)
# dtree_image_uri = '625467769535.dkr.ecr.ap-southeast-1.amazonaws.com/sagemaker-decision-tree:latest'
dtree_image_uri = sagemaker_session.sagemaker_client.describe_image_version(
ImageName="restate-dtree"
)["ContainerImage"]