Skip to content

Commit

Permalink
Sagemaker pipeline multi model (aws#3500)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: atqy <[email protected]>
  • Loading branch information
3 people authored Jul 13, 2022
1 parent b4b39f1 commit d5ba3bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@

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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit d5ba3bc

Please sign in to comment.