{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Welcome!\n", "Welcome to the Operations group! You are responsible for deploying the codes and models for your team. This guide will walk you through on how to do you job. You will:\n", "\n", "1. Train and deploy your first models\n", "1. Register your team\n", "1. Retrain and redeploy models\n", "1. Work with the event team to resolve any problems/issues your team faces" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Train and Deploy Initial Models\n", "\n", "Due to time constraint, we pre-launch the infrastructure on your behalf. You simply need to train and deploy your models. This repository already has pre-written codes designed for very simple Layout and Shoot endpoints. You will use the `startPipeline` script to train and deploy your models. The following cell shows you how to use it. To execute the codes, click one cell at a time and hold Shift + Enter keys. Alternatively, you can click on a cell. Then, go to the Cell menu and select Run Cells. You will deploy two endpoints (Shoot and Layout) below." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!cd ../.. && ./bin/startPipeline.js help" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!cd ../.. && ./bin/startPipeline.js --pipeline shoot" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!cd ../.. && ./bin/startPipeline.js --pipeline layout" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Register Team\n", "Once your two endpoints are deployed successfully, you can register your team and start playing the game. To be fair with all the teams, we will start the game counter once all teams have successfully registered their team to the Leader Board. Run the following cell to get the information needed to register your team; then, go to the registration page given to you by the event team and enter the information." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!../../bin/register_outputs.sh" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Retrain and redeploy models\n", "\n", "__IMPORTANT__: Before you retrain and redeploy your models, please check with your other two teams to make sure that they have successfully committed their changes. Otherwise, you will not be able to pull down the latest codes.- When ever the Offensive and Defensive groups made changes/revisions to their models, they will need to commit those changes to their respective CodeCommit branches. Next, merge their branches into Dev first to check for any conflicts. Then merge into Master. You will need to execute the following git commands from the SageMaker notebook terminal. To open up a terminal, navigate to the main Jupyter notebook; click on New on the upper right corner of the notebook; then, select Terminal. \n", "```shell\n", "git checkout shoot # or layout if it was the layout team\n", "git pull # pull in the new changes\n", "git checkout master # move to the master branch\n", "git merge shoot # merge in changes from development branch\n", "git push # push to master\n", "```\n", "\n", "- To update your models you can kick off new pipeline jobs using the same startPipeline.js script you used earlier\n", "```shell\n", "./bin/startPipeline.js --pipeline shoot # or layout\n", "```" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!git checkout shoot;git pull;git checkout master" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!git merge shoot;git push" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%cd /home/ec2-user/SageMaker/GameDayRepo" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!./bin/startPipeline.js --pipeline shoot" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Checking for Errors\n", "One of the resources that the earlier AWS CloudFormation template creates is an SQS Queue that holds Errors from the games. You should check this queue to make sure all the endpoints are working correctly. Go to the [SQS console](https://console.aws.amazon.com/sqs/home#), select the error queue, go to Queue actions, select \"view/Delete messages\", and select start polling. If there are any errors then your endpoint is not successfully responding. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## View build pipeline\n", "The startPipeline.js script triggers the pipeline to build and deploy the model. This is done using [AWS Step Functions](https://aws.amazon.com/step-functions/). You can view the [AWS Step Function Console](https://console.aws.amazon.com/states/home) to view and diagnose issues with the pipeline." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "conda_python3", "language": "python", "name": "conda_python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" } }, "nbformat": 4, "nbformat_minor": 4 }