├── .github └── workflows │ └── pythonapp.yml ├── .gitignore ├── Baseball_Predictions_Export_Model.ipynb ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── app.py ├── buildspec.yml ├── cli.py ├── htwtmlb.csv ├── mlib.py ├── model.joblib ├── predict.sh ├── recipes └── aws-lambda-sam │ ├── README.md │ └── sam-ml-predict │ ├── .aws-sam │ └── build.toml │ ├── .gitignore │ ├── README.md │ ├── __init__.py │ ├── events │ └── event.json │ ├── ml_hello_world │ ├── Dockerfile │ ├── __init__.py │ ├── app.py │ ├── htwtmlb.csv │ ├── mlib.py │ ├── model.joblib │ └── requirements.txt │ ├── payload.json │ ├── predict-lambda.sh │ ├── samconfig.toml │ ├── template.yaml │ └── tests │ ├── __init__.py │ └── unit │ ├── __init__.py │ └── test_handler.py ├── requirements.txt ├── resize.sh ├── run_docker.sh ├── test_mlib.py ├── utils └── resize.sh └── utilscli.py /.github/workflows/pythonapp.yml: -------------------------------------------------------------------------------- 1 | name: MLOPs Python Cookbook with Github Actions 2 | on: [push] 3 | jobs: 4 | build: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | - name: Set up Python 3.8 9 | uses: actions/setup-python@v1 10 | with: 11 | python-version: 3.8 12 | - name: Install dependencies 13 | run: | 14 | make install 15 | - name: Lint with pylint 16 | run: | 17 | make lint 18 | - name: Test with pytest 19 | run: | 20 | make test 21 | - name: Format code 22 | run: | 23 | make format 24 | 25 | build-container: 26 | runs-on: ubuntu-latest 27 | steps: 28 | - uses: actions/checkout@v2 29 | - name: Loging to Github registry 30 | uses: docker/login-action@v1 31 | with: 32 | registry: ghcr.io 33 | username: ${{ github.repository_owner }} 34 | password: ${{ secrets.BUILDCONTAINERS }} 35 | - name: build flask app 36 | uses: docker/build-push-action@v2 37 | with: 38 | context: ./ 39 | #tags: alfredodeza/flask-roberta:latest 40 | tags: ghcr.io/noahgift/python-mlops-cookbook:latest 41 | push: true 42 | 43 | 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.8.8-slim-buster 2 | 3 | # Working Directory 4 | WORKDIR /app 5 | 6 | # Copy source code to working directory 7 | COPY . app.py /app/ 8 | 9 | # Install packages from requirements.txt 10 | # hadolint ignore=DL3013 11 | RUN pip install --no-cache-dir --upgrade pip &&\ 12 | pip install --no-cache-dir --trusted-host pypi.python.org -r requirements.txt 13 | 14 | EXPOSE 8080 15 | 16 | ENTRYPOINT [ "python" ] 17 | 18 | CMD [ "app.py" ] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | pip install --upgrade pip &&\ 3 | pip install -r requirements.txt 4 | 5 | test: 6 | python -m pytest -vv --cov=cli --cov=mlib --cov=utilscli --cov=app test_mlib.py 7 | 8 | format: 9 | black *.py 10 | 11 | lint: 12 | pylint --disable=R,C,W1203,E1101 mlib cli utilscli 13 | #lint Dockerfile 14 | #docker run --rm -i hadolint/hadolint < Dockerfile 15 | 16 | deploy: 17 | #push to ECR for deploy 18 | aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 561744971673.dkr.ecr.us-east-1.amazonaws.com 19 | docker build -t mlops . 20 | docker tag mlops:latest 561744971673.dkr.ecr.us-east-1.amazonaws.com/mlops:latest 21 | docker push 561744971673.dkr.ecr.us-east-1.amazonaws.com/mlops:latest 22 | 23 | all: install lint test format deploy -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Python application test with Github Actions](https://github.com/noahgift/Python-MLOps-Cookbook/actions/workflows/pythonapp.yml/badge.svg)](https://github.com/noahgift/Python-MLOps-Cookbook/actions/workflows/pythonapp.yml) 2 | [![Python application test with AWS Code Builde](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiSjN4ZXRiNllSOVlYWmZqQ2tyS05OOC8wUElNZ05uUFZkVDdKSHVrNzU2L2FzajJXUmlKUngxUkFvOGFTaStMNW9rOUJSS0VTWFRadVpHdWgyN1BLMjA4PSIsIml2UGFyYW1ldGVyU3BlYyI6IjB0anA4VWxkNFBvejJIcE0iLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main) 3 | 4 | ## 🎓 Pragmatic AI Labs | Join 1M+ ML Engineers 5 | 6 | ### 🔥 Hot Course Offers: 7 | * 🤖 [Master GenAI Engineering](https://ds500.paiml.com/learn/course/0bbb5/) - Build Production AI Systems 8 | * 🦀 [Learn Professional Rust](https://ds500.paiml.com/learn/course/g6u1k/) - Industry-Grade Development 9 | * 📊 [AWS AI & Analytics](https://ds500.paiml.com/learn/course/31si1/) - Scale Your ML in Cloud 10 | * ⚡ [Production GenAI on AWS](https://ds500.paiml.com/learn/course/ehks1/) - Deploy at Enterprise Scale 11 | * 🛠️ [Rust DevOps Mastery](https://ds500.paiml.com/learn/course/ex8eu/) - Automate Everything 12 | 13 | ### 🚀 Level Up Your Career: 14 | * 💼 [Production ML Program](https://paiml.com) - Complete MLOps & Cloud Mastery 15 | * 🎯 [Start Learning Now](https://ds500.paiml.com) - Fast-Track Your ML Career 16 | * 🏢 Trusted by Fortune 500 Teams 17 | 18 | Learn end-to-end ML engineering from industry veterans at [PAIML.COM](https://paiml.com) 19 | 20 | 21 | # Python MLOps Cookbook 22 | This is an example of a Containerized Flask Application that can be the core ingredient in many "recipes", i.e. deploy targets.. 23 | 24 | ![mlops-color](https://user-images.githubusercontent.com/58792/121539559-c6787e80-c9d3-11eb-9f48-5d25924fad25.png) 25 | * [Read Practical MLOps Online](https://learning.oreilly.com/library/view/practical-mlops/9781098103002/) 26 | * [Purchase Practical MLOps](https://www.amazon.com/Practical-MLOps-Operationalizing-Machine-Learning/dp/1098103017) 27 | 28 | 29 | ## Github Container Registery 30 | Feel free to test my ML project: `docker pull ghcr.io/noahgift/python-mlops-cookbook:latest` 31 | 32 | 33 | ## Assets in repo 34 | 35 | * `Makefile`: [View Makefile](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/Makefile) 36 | * `requirements.txt`: [View requirements.txt](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/requirements.txt) 37 | * `cli.py`: [View cli.py](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/cli.py) 38 | * `utilscli.py`: [View utilscli.py](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/utilscli.py) 39 | * `app.py`: [View app.py](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/app.py) 40 | * `mlib.py`: [View mlib.py](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/mlib.py)Model Handling Library 41 | * `htwtmlb.csv`: [View CSV](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/htwtmlb.csv) Useful for input scaling 42 | * `model.joblib`: [View model.joblib](https://github.com/noahgift/Python-MLOps-Cookbook/raw/781053e4d45ebeeb64ecdf2dc1b896b338530aab/model.joblib) 43 | * `Dockerfile`: [View Dockerfile](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/Dockerfile) 44 | * `Baseball_Predictions_Export_Model.ipynb`: [Baseball_Predictions_Export_Model.ipynb](https://colab.research.google.com/drive/1mTTXGWp6jERDIBDLIQzBDvvwRciuEGcj?usp=sharing) 45 | 46 | ![Course2-Duke-Flask-Containerized](https://user-images.githubusercontent.com/58792/110816231-289cd880-8259-11eb-8ab7-45c4ef5190ad.png) 47 | 48 | ### CLI Tools 49 | 50 | There are two CLI tools. First, the main `cli.py` is the endpoint that serves out predictions. 51 | To predict the height of an MLB player you use the following: ` ./cli.py --weight 180` 52 | 53 | ![predict-height-weight](https://user-images.githubusercontent.com/58792/110970118-6c5e1380-8327-11eb-95b2-aeba679c0270.png) 54 | 55 | The second cli tool is `utilscli.py', and this performs model retraining, and could serve as the entry point to do more things. 56 | For example, this version doesn't change the default `model_name`, but you could add that as an option by forking this repo. 57 | 58 | `./utilscli.py retrain --tsize 0.4` 59 | 60 | Here is an example retraining the model. 61 | ![model-retraining](https://user-images.githubusercontent.com/58792/110986838-31b2a600-833c-11eb-977f-13143d4471c7.png) 62 | 63 | Additionally you can query the API via the CLI, allowing you to change both the host and the value passed into the API. 64 | This is accomplished through the requests library. 65 | 66 | `./utilscli.py predict --weight 400` 67 | 68 | ![predict-cli](https://user-images.githubusercontent.com/58792/111043970-b6bcbe80-8413-11eb-9298-5d091e5db0dd.png) 69 | 70 | 71 | 72 | ### Flask Microservice 73 | 74 | The Flask ML Microservice can be run many ways. 75 | 76 | #### Containerized Flask Microservice Locally 77 | 78 | You can run the Flask Microservice as follows with the commmand: `python app.py`. 79 | 80 | ``` 81 | (.venv) ec2-user:~/environment/Python-MLOps-Cookbook (main) $ python app.py 82 | * Serving Flask app "app" (lazy loading) 83 | * Environment: production 84 | WARNING: This is a development server. Do not use it in a production deployment. 85 | Use a production WSGI server instead. 86 | * Debug mode: on 87 | INFO:werkzeug: * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit) 88 | INFO:werkzeug: * Restarting with stat 89 | WARNING:werkzeug: * Debugger is active! 90 | INFO:werkzeug: * Debugger PIN: 251-481-511 91 | ``` 92 | 93 | To serve a prediction against the application, run the `predict.sh`. 94 | 95 | 96 | ``` 97 | (.venv) ec2-user:~/environment/Python-MLOps-Cookbook (main) $ ./predict.sh 98 | Port: 8080 99 | { 100 | "prediction": { 101 | "height_human_readable": "6 foot, 2 inches", 102 | "height_inches": 73.61 103 | } 104 | } 105 | ``` 106 | 107 | 108 | #### Containerized Flask Microservice 109 | 110 | Here is an example of how to build the container and run it locally, this is the contents of [predict.sh](https://github.com/noahgift/Python-MLOps-Cookbook/blob/main/predict.sh) 111 | 112 | ``` 113 | #!/usr/bin/env bash 114 | 115 | # Build image 116 | #change tag for new container registery, gcr.io/bob 117 | docker build --tag=noahgift/mlops-cookbook . 118 | 119 | # List docker images 120 | docker image ls 121 | 122 | # Run flask app 123 | docker run -p 127.0.0.1:8080:8080 noahgift/mlops-cookbook 124 | ``` 125 | 126 | #### Automatically Build Container via Github Actions and Push to Github Container Registery 127 | 128 | To setup the container build process do the following. This is also covered by Alfredo Deza in Practical MLOps book in greater detail. 129 | 130 | ``` 131 | build-container: 132 | runs-on: ubuntu-latest 133 | steps: 134 | - uses: actions/checkout@v2 135 | - name: Loging to Github registry 136 | uses: docker/login-action@v1 137 | with: 138 | registry: ghcr.io 139 | username: ${{ github.repository_owner }} 140 | password: ${{ secrets.BUILDCONTAINERS }} 141 | - name: build flask app 142 | uses: docker/build-push-action@v2 143 | with: 144 | context: ./ 145 | #tags: alfredodeza/flask-roberta:latest 146 | tags: ghcr.io/noahgift/python-mlops-cookbook:latest 147 | push: true 148 | 149 | ``` 150 | 151 | ![container-registry](https://user-images.githubusercontent.com/58792/111001486-d8ee0800-8351-11eb-984a-967558023cc8.png) 152 | 153 | #### Automatically Build Container via Github Actions and Push to Dockerhub Container Registery 154 | 155 | 156 | ## Build Targets 157 | 158 | With the project using DevOps/MLOps best practices including linting, testing, and deployment, this project can be the base to deploy to many deployment targets. 159 | 160 | [In progress....] 161 | 162 | 163 | ### Other Tools and Frameworks 164 | 165 | [In progress....] 166 | 167 | #### FastAPI 168 | 169 | * [fastapi](https://fastapi.tiangolo.com) 170 | 171 | 172 | ### AWS 173 | 174 | #### Elastic Beanstalk 175 | 176 | #### AWS Lambda Recipes 177 | 178 | Install [SAM as documented here](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html), AWS Cloud9 has it installed already. 179 | 180 | You can [find the recipes here](https://github.com/noahgift/Python-MLOps-Cookbook/tree/main/recipes/aws-lambda-sam) 181 | 182 | 183 | ##### AWS Lambda-SAM Local 184 | 185 | ![sam-directory-layout](https://user-images.githubusercontent.com/58792/111075610-32277a00-84bf-11eb-9f61-41adc9f97a21.png) 186 | 187 | ##### AWS Lambda-SAM Containerized Deploy 188 | 189 | Follow recipe in recipe section. 190 | 191 | ![sam-guided-deploy](https://user-images.githubusercontent.com/58792/111085621-7d0cb600-84ee-11eb-8405-e94ceb5d737e.png) 192 | 193 | When deployed an easy way to verify image is via Console. 194 | 195 | ![invoke-lambda-console](https://user-images.githubusercontent.com/58792/111085839-92361480-84ef-11eb-8cdb-092dbd94e2d1.png) 196 | 197 | A great way to test the API Endpoint is with the Cloud9 Environment: 198 | 199 | ![invoke-api-gateway](https://user-images.githubusercontent.com/58792/111086910-2b1b5e80-84f5-11eb-901e-807032b7427a.png) 200 | 201 | Another way is the the tool "Postman": 202 | 203 | ![post-man](https://user-images.githubusercontent.com/58792/111086967-746bae00-84f5-11eb-9ca1-6315d3cfa5ed.png) 204 | 205 | 206 | 207 | #### AWS App Runner 208 | 209 | Watch a YouTube Walkthrough on AWS App Runner for this repo here: https://www.youtube.com/watch?v=zzNnxDTWtXA 210 | 211 | ![mlops](https://user-images.githubusercontent.com/58792/119266194-d3196c00-bbb7-11eb-929e-77718411ffd5.jpg) 212 | 213 | #### AWS Co-Pilot 214 | 215 | 216 | Following setup here and then deploy project using cli 217 | https://docs.aws.amazon.com/AmazonECS/latest/developerguide/getting-started-aws-copilot-cli.html 218 | 219 | ### GCP 220 | 221 | #### Cloudrun (CaaS: Container as a Service) 222 | 223 | It is trivial (if you select project): 224 | 225 | `gcloud config set project ` 226 | 227 | A. Get GCP Account 228 | B. Checkout project 229 | C. `cloud run deploy` inside of project 230 | D. Verify it works by using `./utilscli.py` 231 | 232 | ![gcp-cloud-run](https://user-images.githubusercontent.com/58792/138346831-6d203164-e224-429f-8fb3-0d7314954697.png) 233 | 234 | 235 | 236 | #### App Engine 237 | 238 | #### GKE (Kubernetes) 239 | 240 | ### Azure App Services 241 | 242 | 243 | ## Production Patterns 244 | 245 | [In progress....] 246 | 247 | * Cached model (deploy) 248 | * Load-testing 249 | 250 | 251 | ## DataScience Workflow 252 | 253 | ![mlb-ht-wt](https://user-images.githubusercontent.com/58792/110829008-a7980e00-8265-11eb-883d-4a87fe6f0a84.png) 254 | 255 | This repository is focused on MLOps. To see more about Data Storytelling, you can go to this [Github repo on Data Story Telling](https://github.com/noahgift/data-story-telling) 256 | 257 | 258 | #### Next Steps: Take Coursera MLOps Course 259 | 260 | ![cloud-specialization](https://user-images.githubusercontent.com/58792/121041040-650ca180-c780-11eb-956e-8d1ecb134641.png) 261 | 262 | * [Take the Specialization](https://www.coursera.org/learn/cloud-computing-foundations-duke?specialization=building-cloud-computing-solutions-at-scale) 263 | * [Cloud Computing Foundations](https://www.coursera.org/learn/cloud-computing-foundations-duke?specialization=building-cloud-computing-solutions-at-scale) 264 | * [Cloud Virtualization, Containers and APIs](https://www.coursera.org/learn/cloud-virtualization-containers-api-duke?specialization=building-cloud-computing-solutions-at-scale) 265 | * [Cloud Data Engineering](https://www.coursera.org/learn/cloud-data-engineering-duke?specialization=building-cloud-computing-solutions-at-scale) 266 | * [Cloud Machine Learning Engineering and MLOps](https://www.coursera.org/learn/cloud-machine-learning-engineering-mlops-duke?specialization=building-cloud-computing-solutions-at-scale) 267 | 268 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request, jsonify 2 | from flask.logging import create_logger 3 | import logging 4 | 5 | import mlib 6 | 7 | app = Flask(__name__) 8 | LOG = create_logger(app) 9 | LOG.setLevel(logging.INFO) 10 | 11 | 12 | @app.route("/") 13 | def home(): 14 | html = f"

Predict the Height From Weight of MLB Players. CD

" 15 | return html.format(format) 16 | 17 | 18 | @app.route("/predict", methods=["POST"]) 19 | def predict(): 20 | """Predicts the Height of MLB Players""" 21 | 22 | json_payload = request.json 23 | LOG.info(f"JSON payload: {json_payload}") 24 | prediction = mlib.predict(json_payload["Weight"]) 25 | return jsonify({"prediction": prediction}) 26 | 27 | 28 | if __name__ == "__main__": 29 | app.run(host="0.0.0.0", port=8080, debug=True) 30 | -------------------------------------------------------------------------------- /buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | phases: 4 | build: 5 | commands: 6 | - make all -------------------------------------------------------------------------------- /cli.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import click 3 | from mlib import predict 4 | 5 | # var= 6 | 7 | 8 | @click.command() 9 | @click.option( 10 | "--weight", 11 | prompt="MLB Player Weight", 12 | help="Pass in the weight of a MLB player to predict the height", 13 | ) 14 | def predictcli(weight): 15 | """Predicts Height of an MLB player based on weight""" 16 | 17 | result = predict(weight) 18 | inches = result["height_inches"] 19 | human_readable = result["height_human_readable"] 20 | if int(inches) > 72: 21 | click.echo(click.style(human_readable, bg="green", fg="white")) 22 | else: 23 | click.echo(click.style(human_readable, bg="red", fg="white")) 24 | 25 | 26 | if __name__ == "__main__": 27 | # pylint: disable=no-value-for-parameter 28 | predictcli() 29 | -------------------------------------------------------------------------------- /htwtmlb.csv: -------------------------------------------------------------------------------- 1 | ,Name,Team,Position,Height,Weight,Age 2 | 0,Adam_Donachie,BAL,Catcher,74,180.0,22.99 3 | 1,Paul_Bako,BAL,Catcher,74,215.0,34.69 4 | 2,Ramon_Hernandez,BAL,Catcher,72,210.0,30.78 5 | 3,Kevin_Millar,BAL,First_Baseman,72,210.0,35.43 6 | 4,Chris_Gomez,BAL,First_Baseman,73,188.0,35.71 7 | 5,Brian_Roberts,BAL,Second_Baseman,69,176.0,29.39 8 | 6,Miguel_Tejada,BAL,Shortstop,69,209.0,30.77 9 | 7,Melvin_Mora,BAL,Third_Baseman,71,200.0,35.07 10 | 8,Aubrey_Huff,BAL,Third_Baseman,76,231.0,30.19 11 | 9,Adam_Stern,BAL,Outfielder,71,180.0,27.05 12 | 10,Jeff_Fiorentino,BAL,Outfielder,73,188.0,23.88 13 | 11,Freddie_Bynum,BAL,Outfielder,73,180.0,26.96 14 | 12,Nick_Markakis,BAL,Outfielder,74,185.0,23.29 15 | 13,Brandon_Fahey,BAL,Outfielder,74,160.0,26.11 16 | 14,Corey_Patterson,BAL,Outfielder,69,180.0,27.55 17 | 15,Jay_Payton,BAL,Outfielder,70,185.0,34.27 18 | 16,Jay_Gibbons,BAL,Designated_Hitter,72,197.0,30.0 19 | 17,Erik_Bedard,BAL,Starting_Pitcher,73,189.0,27.99 20 | 18,Hayden_Penn,BAL,Starting_Pitcher,75,185.0,22.38 21 | 19,Adam_Loewen,BAL,Starting_Pitcher,78,219.0,22.89 22 | 20,Daniel_Cabrera,BAL,Starting_Pitcher,79,230.0,25.76 23 | 21,Steve_Trachsel,BAL,Starting_Pitcher,76,205.0,36.33 24 | 22,Jaret_Wright,BAL,Starting_Pitcher,74,230.0,31.17 25 | 23,Kris_Benson,BAL,Starting_Pitcher,76,195.0,32.31 26 | 24,Scott_Williamson,BAL,Relief_Pitcher,72,180.0,31.03 27 | 25,John_Parrish,BAL,Relief_Pitcher,71,192.0,29.26 28 | 26,Danys_Baez,BAL,Relief_Pitcher,75,225.0,29.47 29 | 27,Chad_Bradford,BAL,Relief_Pitcher,77,203.0,32.46 30 | 28,Jamie_Walker,BAL,Relief_Pitcher,74,195.0,35.67 31 | 29,Brian_Burres,BAL,Relief_Pitcher,73,182.0,25.89 32 | 30,Kurt_Birkins,BAL,Relief_Pitcher,74,188.0,26.55 33 | 31,James_Hoey,BAL,Relief_Pitcher,78,200.0,24.17 34 | 32,Sendy_Rleal,BAL,Relief_Pitcher,73,180.0,26.69 35 | 33,Chris_Ray,BAL,Relief_Pitcher,75,200.0,25.13 36 | 34,Jeremy_Guthrie,BAL,Relief_Pitcher,73,200.0,27.9 37 | 35,A.J._Pierzynski,CWS,Catcher,75,245.0,30.17 38 | 36,Toby_Hall,CWS,Catcher,75,240.0,31.36 39 | 37,Paul_Konerko,CWS,First_Baseman,74,215.0,30.99 40 | 38,Tadahito_Iguchi,CWS,Second_Baseman,69,185.0,32.24 41 | 39,Juan_Uribe,CWS,Shortstop,71,175.0,27.61 42 | 40,Alex_Cintron,CWS,Shortstop,74,199.0,28.2 43 | 41,Joe_Crede,CWS,Third_Baseman,73,200.0,28.85 44 | 42,Josh_Fields,CWS,Third_Baseman,73,215.0,24.21 45 | 43,Ryan_Sweeney,CWS,Outfielder,76,200.0,22.02 46 | 44,Brian_N._Anderson,CWS,Outfielder,74,205.0,24.97 47 | 45,Luis_Terrero,CWS,Outfielder,74,206.0,26.78 48 | 46,Pablo_Ozuna,CWS,Outfielder,70,186.0,32.51 49 | 47,Scott_Podsednik,CWS,Outfielder,72,188.0,30.95 50 | 48,Jermaine_Dye,CWS,Outfielder,77,220.0,33.09 51 | 49,Darin_Erstad,CWS,Outfielder,74,210.0,32.74 52 | 50,Rob_Mackowiak,CWS,Outfielder,70,195.0,30.69 53 | 51,Jim_Thome,CWS,Designated_Hitter,76,244.0,36.51 54 | 52,Jerry_Owens,CWS,Designated_Hitter,75,195.0,26.03 55 | 53,Charlie_Haeger,CWS,Starting_Pitcher,73,200.0,23.45 56 | 54,Heath_Phillips,CWS,Starting_Pitcher,75,200.0,24.94 57 | 55,Gavin_Floyd,CWS,Starting_Pitcher,76,212.0,24.09 58 | 56,Jose_Contreras,CWS,Starting_Pitcher,76,224.0,35.23 59 | 57,Jon_Garland,CWS,Starting_Pitcher,78,210.0,27.43 60 | 58,Javier_Vazquez,CWS,Starting_Pitcher,74,205.0,30.6 61 | 59,Mark_Buehrle,CWS,Starting_Pitcher,74,220.0,27.94 62 | 60,Mike_MacDougal,CWS,Relief_Pitcher,76,195.0,29.99 63 | 61,David_Aardsma,CWS,Relief_Pitcher,77,200.0,25.17 64 | 62,Andrew_Sisco,CWS,Relief_Pitcher,81,260.0,24.13 65 | 63,Matt_Thornton,CWS,Relief_Pitcher,78,228.0,30.46 66 | 64,Bobby_Jenks,CWS,Relief_Pitcher,75,270.0,25.96 67 | 65,Boone_Logan,CWS,Relief_Pitcher,77,200.0,22.55 68 | 66,Sean_Tracey,CWS,Relief_Pitcher,75,210.0,26.29 69 | 67,Nick_Masset,CWS,Relief_Pitcher,76,190.0,24.79 70 | 68,Jose_Molina,ANA,Catcher,74,220.0,31.74 71 | 69,Jeff_Mathis,ANA,Catcher,72,180.0,23.92 72 | 70,Mike_Napoli,ANA,Catcher,72,205.0,25.33 73 | 71,Casey_Kotchman,ANA,First_Baseman,75,210.0,24.02 74 | 72,Kendry_Morales,ANA,First_Baseman,73,220.0,23.7 75 | 73,Shea_Hillenbrand,ANA,First_Baseman,73,211.0,31.59 76 | 74,Robb_Quinlan,ANA,First_Baseman,73,200.0,29.95 77 | 75,Howie_Kendrick,ANA,First_Baseman,70,180.0,23.64 78 | 76,Orlando_Cabrera,ANA,Shortstop,70,190.0,32.33 79 | 77,Erick_Aybar,ANA,Shortstop,70,170.0,23.13 80 | 78,Dallas_McPherson,ANA,Third_Baseman,76,230.0,26.6 81 | 79,Maicer_Izturis,ANA,Third_Baseman,68,155.0,26.46 82 | 80,Reggie_Willits,ANA,Outfielder,71,185.0,25.75 83 | 81,Tommy_Murphy,ANA,Outfielder,72,185.0,27.51 84 | 82,Terry_Evans,ANA,Outfielder,75,200.0,25.11 85 | 83,Gary_Matthews_Jr.,ANA,Outfielder,75,225.0,32.51 86 | 84,Garret_Anderson,ANA,Outfielder,75,225.0,34.67 87 | 85,Vladimir_Guerrero,ANA,Outfielder,75,220.0,31.06 88 | 86,Chone_Figgins,ANA,Outfielder,68,160.0,29.1 89 | 87,Juan_Rivera,ANA,Outfielder,74,205.0,28.66 90 | 88,John_Lackey,ANA,Starting_Pitcher,78,235.0,28.35 91 | 89,Bartolo_Colon,ANA,Starting_Pitcher,71,250.0,33.77 92 | 90,Kelvim_Escobar,ANA,Starting_Pitcher,73,210.0,30.89 93 | 91,Dustin_Moseley,ANA,Starting_Pitcher,76,190.0,37.74 94 | 92,Ervin_Santana,ANA,Starting_Pitcher,74,160.0,24.14 95 | 93,Joe_Saunders,ANA,Starting_Pitcher,74,200.0,25.71 96 | 94,Jered_Weaver,ANA,Starting_Pitcher,79,205.0,24.41 97 | 95,Chris_Resop,ANA,Relief_Pitcher,75,222.0,24.32 98 | 96,Phil_Seibel,ANA,Relief_Pitcher,73,195.0,28.09 99 | 97,Justin_Speier,ANA,Relief_Pitcher,76,205.0,33.31 100 | 98,Darren_Oliver,ANA,Relief_Pitcher,74,220.0,36.4 101 | 99,Hector_Carrasco,ANA,Relief_Pitcher,74,220.0,37.36 102 | 100,Scot_Shields,ANA,Relief_Pitcher,73,170.0,31.61 103 | 101,Francisco_Rodriguez,ANA,Relief_Pitcher,72,185.0,25.14 104 | 102,Greg_Jones,ANA,Relief_Pitcher,74,195.0,30.29 105 | 103,Doug_Mirabelli,BOS,Catcher,73,220.0,36.37 106 | 104,Jason_Varitek,BOS,Catcher,74,230.0,34.89 107 | 105,George_Kottaras,BOS,Catcher,72,180.0,23.79 108 | 106,Kevin_Youkilis,BOS,First_Baseman,73,220.0,27.96 109 | 107,Dustin_Pedroia,BOS,Second_Baseman,69,180.0,23.54 110 | 108,Alex_Cora,BOS,Shortstop,72,180.0,31.37 111 | 109,Julio_Lugo,BOS,Shortstop,73,170.0,31.29 112 | 110,Mike_Lowell,BOS,Third_Baseman,75,210.0,33.01 113 | 111,Wily_Mo_Pe?a,BOS,Outfielder,75,215.0,25.1 114 | 112,J.D._Drew,BOS,Outfielder,73,200.0,31.28 115 | 113,Manny_Ramirez,BOS,Outfielder,72,213.0,34.75 116 | 114,Brandon_Moss,BOS,Outfielder,72,180.0,23.46 117 | 115,David_Murphy,BOS,Outfielder,76,192.0,25.37 118 | 116,Eric_Hinske,BOS,Outfielder,74,235.0,29.57 119 | 117,Coco_Crisp,BOS,Outfielder,72,185.0,27.33 120 | 118,David_Ortiz,BOS,Designated_Hitter,76,230.0,31.28 121 | 119,Curt_Schilling,BOS,Starting_Pitcher,77,235.0,40.29 122 | 120,Tim_Wakefield,BOS,Starting_Pitcher,74,210.0,40.58 123 | 121,Josh_Beckett,BOS,Starting_Pitcher,77,222.0,26.79 124 | 122,Matt_Clement,BOS,Starting_Pitcher,75,210.0,32.55 125 | 123,Jonathan_Papelbon,BOS,Starting_Pitcher,76,230.0,26.27 126 | 124,Kyle_Snyder,BOS,Starting_Pitcher,80,220.0,29.47 127 | 125,Devern_Hansack,BOS,Starting_Pitcher,74,180.0,29.07 128 | 126,Jon_Lester,BOS,Starting_Pitcher,74,190.0,23.15 129 | 127,Kason_Gabbard,BOS,Starting_Pitcher,75,200.0,24.9 130 | 128,Craig_Hansen,BOS,Relief_Pitcher,78,210.0,23.29 131 | 129,Hideki_Okajima,BOS,Relief_Pitcher,73,194.0,31.18 132 | 130,Craig_Breslow,BOS,Relief_Pitcher,73,180.0,26.56 133 | 131,Manny_Delcarmen,BOS,Relief_Pitcher,74,190.0,25.03 134 | 132,Brendan_Donnelly,BOS,Relief_Pitcher,75,240.0,35.66 135 | 133,Javier_Lopez,BOS,Relief_Pitcher,76,200.0,29.64 136 | 134,J.C._Romero,BOS,Relief_Pitcher,71,198.0,30.74 137 | 135,Joel_Pineiro,BOS,Relief_Pitcher,73,200.0,28.43 138 | 136,Julian_Tavarez,BOS,Relief_Pitcher,74,195.0,33.77 139 | 137,Mike_Timlin,BOS,Relief_Pitcher,76,210.0,40.97 140 | 138,Nick_DeBarr,BOS,Relief_Pitcher,76,220.0,23.52 141 | 139,Victor_Martinez,CLE,Catcher,74,190.0,28.19 142 | 140,Kelly_Shoppach,CLE,Catcher,73,210.0,26.84 143 | 141,Ryan_Garko,CLE,First_Baseman,74,225.0,26.16 144 | 142,Joe_Inglett,CLE,Second_Baseman,70,180.0,28.67 145 | 143,Josh_Barfield,CLE,Second_Baseman,72,185.0,24.2 146 | 144,Hector_Luna,CLE,Second_Baseman,73,170.0,27.08 147 | 145,Jhonny_Peralta,CLE,Shortstop,73,185.0,24.76 148 | 146,Andy_Marte,CLE,Third_Baseman,73,185.0,23.36 149 | 147,Ben_Francisco,CLE,Outfielder,73,180.0,25.35 150 | 148,Shin-Soo_Choo,CLE,Outfielder,71,178.0,24.63 151 | 149,Franklin_Gutierrez,CLE,Outfielder,74,175.0,24.02 152 | 150,Grady_Sizemore,CLE,Outfielder,74,200.0,24.58 153 | 151,Jason_Michaels,CLE,Outfielder,72,204.0,30.82 154 | 152,Trot_Nixon,CLE,Outfielder,74,211.0,32.89 155 | 153,David_Dellucci,CLE,Outfielder,71,190.0,33.33 156 | 154,Casey_Blake,CLE,Outfielder,74,210.0,33.52 157 | 155,Travis_Hafner,CLE,Designated_Hitter,75,240.0,29.74 158 | 156,Paul_Byrd,CLE,Starting_Pitcher,73,190.0,36.24 159 | 157,Cliff_Lee,CLE,Starting_Pitcher,75,190.0,28.5 160 | 158,Jake_Westbrook,CLE,Starting_Pitcher,75,185.0,29.42 161 | 159,C.C._Sabathia,CLE,Starting_Pitcher,79,290.0,26.61 162 | 160,Jeremy_Sowers,CLE,Starting_Pitcher,73,175.0,23.79 163 | 161,Rafael_Perez,CLE,Relief_Pitcher,75,185.0,24.96 164 | 162,Brian_Slocum,CLE,Relief_Pitcher,76,200.0,25.93 165 | 163,Edward_Mujica,CLE,Relief_Pitcher,74,220.0,22.81 166 | 164,Fernando_Cabrera,CLE,Relief_Pitcher,76,170.0,25.29 167 | 165,Tom_Mastny,CLE,Relief_Pitcher,78,220.0,26.07 168 | 166,Juan_Lara,CLE,Relief_Pitcher,74,190.0,26.09 169 | 167,Fausto_Carmona,CLE,Relief_Pitcher,76,220.0,23.23 170 | 168,Aaron_Fultz,CLE,Relief_Pitcher,72,205.0,33.49 171 | 169,Rafael_Betancourt,CLE,Relief_Pitcher,74,200.0,31.84 172 | 170,Roberto_Hernandez,CLE,Relief_Pitcher,76,250.0,42.3 173 | 171,Joe_Borowski,CLE,Relief_Pitcher,74,225.0,35.82 174 | 172,Matt_Miller,CLE,Relief_Pitcher,75,215.0,35.27 175 | 173,Jason_Davis,CLE,Relief_Pitcher,78,210.0,26.81 176 | 174,Mike_Piazza,OAK,Catcher,75,215.0,38.49 177 | 175,Jason_Kendall,OAK,Catcher,72,195.0,32.68 178 | 176,Adam_Melhuse,OAK,Catcher,74,200.0,34.93 179 | 177,Nick_Swisher,OAK,First_Baseman,72,194.0,26.26 180 | 178,Dan_Johnson,OAK,First_Baseman,74,220.0,27.56 181 | 179,Donald_Murphy,OAK,Second_Baseman,70,180.0,23.98 182 | 180,Mark_Ellis,OAK,Second_Baseman,71,180.0,29.73 183 | 181,Marco_Scutaro,OAK,Shortstop,70,170.0,31.33 184 | 182,Bobby_Crosby,OAK,Shortstop,75,195.0,27.13 185 | 183,Mark_Kiger,OAK,Shortstop,71,180.0,26.75 186 | 184,Antonio_Perez,OAK,Third_Baseman,71,170.0,27.09 187 | 185,Eric_Chavez,OAK,Third_Baseman,73,206.0,29.23 188 | 186,Milton_Bradley,OAK,Outfielder,72,205.0,28.88 189 | 187,Shannon_Stewart,OAK,Outfielder,71,200.0,33.01 190 | 188,Bobby_Kielty,OAK,Outfielder,73,225.0,30.57 191 | 189,Mark_Kotsay,OAK,Outfielder,72,201.0,31.24 192 | 190,Ryan_Goleski,OAK,Outfielder,75,225.0,24.95 193 | 191,Jeremy_Brown,OAK,Designated_Hitter,70,226.0,27.35 194 | 192,Jason_Windsor,OAK,Starting_Pitcher,74,233.0,24.62 195 | 193,David_Shafer,OAK,Starting_Pitcher,74,180.0,24.98 196 | 194,Joe_Blanton,OAK,Starting_Pitcher,75,225.0,26.22 197 | 195,Brad_Halsey,OAK,Starting_Pitcher,73,180.0,26.04 198 | 196,Dan_Haren,OAK,Starting_Pitcher,77,220.0,26.45 199 | 197,Rich_Harden,OAK,Starting_Pitcher,73,180.0,25.25 200 | 198,Joe_Kennedy,OAK,Starting_Pitcher,76,237.0,27.77 201 | 199,Esteban_Loaiza,OAK,Starting_Pitcher,75,215.0,35.16 202 | 200,Alan_Embree,OAK,Relief_Pitcher,74,190.0,37.1 203 | 201,Jay_Witasick,OAK,Relief_Pitcher,76,235.0,34.51 204 | 202,Justin_Duchscherer,OAK,Relief_Pitcher,75,190.0,29.28 205 | 203,Kiko_Calero,OAK,Relief_Pitcher,73,180.0,32.14 206 | 204,Chad_Gaudin,OAK,Relief_Pitcher,71,165.0,23.94 207 | 205,Lenny_DiNardo,OAK,Relief_Pitcher,76,195.0,27.45 208 | 206,Scott_Dunn,OAK,Relief_Pitcher,75,200.0,28.77 209 | 207,Huston_Street,OAK,Relief_Pitcher,72,190.0,23.58 210 | 208,Ron_Flores,OAK,Relief_Pitcher,71,190.0,27.56 211 | 209,Jay_Marshall,OAK,Relief_Pitcher,77,185.0,24.01 212 | 210,Marcus_McBeth,OAK,Relief_Pitcher,73,185.0,26.52 213 | 211,Jorge_Posada,NYY,Catcher,74,205.0,35.54 214 | 212,Wil_Nieves,NYY,Catcher,71,190.0,29.43 215 | 213,Andy_Phillips,NYY,First_Baseman,72,205.0,29.9 216 | 214,Doug_Mientkiewicz,NYY,First_Baseman,74,206.0,32.7 217 | 215,Josh_Phelps,NYY,First_Baseman,75,220.0,28.8 218 | 216,Miguel_Cairo,NYY,Second_Baseman,73,208.0,32.82 219 | 217,Robinson_Cano,NYY,Second_Baseman,72,170.0,24.36 220 | 218,Derek_Jeter,NYY,Shortstop,75,195.0,32.68 221 | 219,Alex_Rodriguez,NYY,Third_Baseman,75,210.0,31.59 222 | 220,Johnny_Damon,NYY,Outfielder,74,190.0,33.32 223 | 221,Bobby_Abreu,NYY,Outfielder,72,211.0,32.97 224 | 222,Hideki_Matsui,NYY,Outfielder,74,230.0,32.72 225 | 223,Melky_Cabrera,NYY,Outfielder,71,170.0,22.55 226 | 224,Kevin_Thompson,NYY,Outfielder,70,185.0,27.45 227 | 225,Jason_Giambi,NYY,Designated_Hitter,75,230.0,36.14 228 | 226,Mike_Mussina,NYY,Starting_Pitcher,74,185.0,38.23 229 | 227,Carl_Pavano,NYY,Starting_Pitcher,77,241.0,31.14 230 | 228,Andy_Pettitte,NYY,Starting_Pitcher,77,225.0,34.71 231 | 229,Darrell_Rasner,NYY,Starting_Pitcher,75,210.0,26.13 232 | 230,Jeff_Karstens,NYY,Starting_Pitcher,75,175.0,24.43 233 | 231,Humberto_Sanchez,NYY,Starting_Pitcher,78,230.0,23.76 234 | 232,Chien-Ming_Wang,NYY,Starting_Pitcher,75,200.0,26.92 235 | 233,Sean_Henn,NYY,Relief_Pitcher,76,215.0,25.85 236 | 234,Scott_Proctor,NYY,Relief_Pitcher,73,198.0,30.16 237 | 235,Brian_Bruney,NYY,Relief_Pitcher,75,226.0,25.03 238 | 236,Chris_Britton,NYY,Relief_Pitcher,75,278.0,24.21 239 | 237,T.J._Beam,NYY,Relief_Pitcher,79,215.0,26.51 240 | 238,Jose_Veras,NYY,Relief_Pitcher,77,230.0,26.36 241 | 239,Kyle_Farnsworth,NYY,Relief_Pitcher,76,240.0,30.88 242 | 240,Luis_Vizcaino,NYY,Relief_Pitcher,71,184.0,32.57 243 | 241,Mike_Myers,NYY,Relief_Pitcher,75,219.0,37.68 244 | 242,Mariano_Rivera,NYY,Relief_Pitcher,74,170.0,37.25 245 | 243,Ivan_Rodriguez,DET,Catcher,69,218.0,35.25 246 | 244,Vance_Wilson,DET,Catcher,71,190.0,33.95 247 | 245,Sean_Casey,DET,First_Baseman,76,225.0,32.66 248 | 246,Chris_Shelton,DET,First_Baseman,72,220.0,26.68 249 | 247,Omar_Infante,DET,Second_Baseman,72,176.0,25.18 250 | 248,Placido_Polanco,DET,Second_Baseman,70,190.0,31.39 251 | 249,Neifi_Perez,DET,Second_Baseman,72,197.0,33.74 252 | 250,Carlos_Guillen,DET,Shortstop,73,204.0,31.42 253 | 251,Ramon_Santiago,DET,Shortstop,71,167.0,27.5 254 | 252,Tony_Giarratano,DET,Shortstop,72,180.0,24.25 255 | 253,Brandon_Inge,DET,Third_Baseman,71,195.0,29.78 256 | 254,Craig_Monroe,DET,Outfielder,73,220.0,30.0 257 | 255,Magglio_Ordo?ez,DET,Outfielder,72,215.0,33.09 258 | 256,Curtis_Granderson,DET,Outfielder,73,185.0,25.96 259 | 257,Brent_Clevlen,DET,Outfielder,74,190.0,23.34 260 | 258,Marcus_Thames,DET,Outfielder,74,205.0,29.98 261 | 259,Gary_Sheffield,DET,Outfielder,72,205.0,38.28 262 | 260,Mike_Rabelo,DET,Designated_Hitter,73,200.0,27.12 263 | 261,Zach_Miner,DET,Starting_Pitcher,75,200.0,24.97 264 | 262,Jeremy_Bonderman,DET,Starting_Pitcher,74,210.0,24.34 265 | 263,Nate_Robertson,DET,Starting_Pitcher,74,215.0,29.49 266 | 264,Justin_Verlander,DET,Starting_Pitcher,77,200.0,24.02 267 | 265,Virgil_Vasquez,DET,Starting_Pitcher,75,205.0,24.73 268 | 266,Kenny_Rogers,DET,Starting_Pitcher,73,211.0,42.3 269 | 267,Mike_Maroth,DET,Starting_Pitcher,72,190.0,29.54 270 | 268,Fernando_Rodney,DET,Relief_Pitcher,71,208.0,29.95 271 | 269,Chad_Durbin,DET,Relief_Pitcher,74,200.0,29.24 272 | 270,Jason_Grilli,DET,Relief_Pitcher,77,210.0,30.3 273 | 271,Jose_Mesa,DET,Relief_Pitcher,75,232.0,40.77 274 | 272,Todd_Jones,DET,Relief_Pitcher,75,230.0,38.85 275 | 273,Joel_Zumaya,DET,Relief_Pitcher,75,210.0,22.31 276 | 274,Jordan_Tata,DET,Relief_Pitcher,78,220.0,25.44 277 | 275,Andrew_Miller,DET,Relief_Pitcher,78,210.0,21.78 278 | 276,Yorman_Bazardo,DET,Relief_Pitcher,74,202.0,22.64 279 | 277,Wilfredo_Ledezma,DET,Relief_Pitcher,76,212.0,26.11 280 | 278,Roman_Colon,DET,Relief_Pitcher,78,225.0,27.55 281 | 279,Edward_Campusano,DET,Relief_Pitcher,76,170.0,24.63 282 | 280,Rene_Rivera,SEA,Catcher,70,190.0,23.58 283 | 281,Kenji_Johjima,SEA,Catcher,72,200.0,30.73 284 | 282,Richie_Sexson,SEA,First_Baseman,80,237.0,32.17 285 | 283,Ben_Broussard,SEA,First_Baseman,74,220.0,30.43 286 | 284,Jose_Lopez,SEA,Second_Baseman,74,170.0,23.27 287 | 285,Jose_Vidro,SEA,Second_Baseman,71,193.0,32.51 288 | 286,Yuniesky_Betancourt,SEA,Shortstop,70,190.0,25.08 289 | 287,Oswaldo_Navarro,SEA,Shortstop,72,150.0,22.41 290 | 288,Adrian_Beltre,SEA,Third_Baseman,71,220.0,27.9 291 | 289,Raul_Ibanez,SEA,Outfielder,74,200.0,34.74 292 | 290,Jose_Guillen,SEA,Outfielder,71,190.0,30.79 293 | 291,Jeremy_Reed,SEA,Outfielder,72,185.0,25.71 294 | 292,Willie_Bloomquist,SEA,Outfielder,71,185.0,29.26 295 | 293,Adam_Jones,SEA,Outfielder,74,200.0,21.58 296 | 294,Ichiro_Suzuki,SEA,Outfielder,69,172.0,33.36 297 | 295,Mike_Morse,SEA,Outfielder,76,220.0,24.94 298 | 296,Felix_Hernandez,SEA,Starting_Pitcher,75,225.0,20.9 299 | 297,Ryan_Feierabend,SEA,Starting_Pitcher,75,190.0,21.52 300 | 298,Sean_White,SEA,Starting_Pitcher,76,195.0,25.85 301 | 299,Horacio_Ramirez,SEA,Starting_Pitcher,73,219.0,27.27 302 | 300,Cha_Baek,SEA,Starting_Pitcher,76,190.0,26.75 303 | 301,Miguel_Batista,SEA,Starting_Pitcher,73,197.0,36.03 304 | 302,Jeff_Weaver,SEA,Starting_Pitcher,77,200.0,30.52 305 | 303,Jarrod_Washburn,SEA,Starting_Pitcher,73,195.0,32.55 306 | 304,George_Sherrill,SEA,Relief_Pitcher,72,210.0,29.86 307 | 305,Julio_Mateo,SEA,Relief_Pitcher,72,177.0,29.58 308 | 306,J.J._Putz,SEA,Relief_Pitcher,77,220.0,30.02 309 | 307,Chris_Reitsma,SEA,Relief_Pitcher,77,235.0,29.16 310 | 308,Cesar_Jimenez,SEA,Relief_Pitcher,71,180.0,22.3 311 | 309,Eric_O'Flaherty,SEA,Relief_Pitcher,74,195.0,22.06 312 | 310,Jon_Huber,SEA,Relief_Pitcher,74,195.0,25.65 313 | 311,Jake_Woods,SEA,Relief_Pitcher,73,190.0,25.49 314 | 312,Sean_Green,SEA,Relief_Pitcher,78,230.0,27.86 315 | 313,Mark_Lowe,SEA,Relief_Pitcher,75,190.0,23.73 316 | 314,Josh_Paul,TB,Catcher,73,200.0,31.78 317 | 315,Dioner_Navarro,TB,Catcher,70,190.0,23.06 318 | 316,Shawn_Riggans,TB,Catcher,74,190.0,26.6 319 | 317,Ty_Wigginton,TB,First_Baseman,72,200.0,29.39 320 | 318,Brendan_Harris,TB,Second_Baseman,73,200.0,26.51 321 | 319,Jorge_Cantu,TB,Second_Baseman,73,184.0,25.08 322 | 320,Ben_Zobrist,TB,Shortstop,75,200.0,25.76 323 | 321,B.J._Upton,TB,Third_Baseman,75,180.0,22.52 324 | 322,Carl_Crawford,TB,Outfielder,74,219.0,25.57 325 | 323,Rocco_Baldelli,TB,Outfielder,76,187.0,25.43 326 | 324,Greg_Norton,TB,Outfielder,73,200.0,34.65 327 | 325,Elijah_Dukes,TB,Outfielder,74,220.0,22.68 328 | 326,Delmon_Young,TB,Outfielder,75,205.0,21.46 329 | 327,Jonny_Gomes,TB,Designated_Hitter,73,205.0,26.27 330 | 328,Edwin_Jackson,TB,Starting_Pitcher,75,190.0,23.47 331 | 329,Scott_Kazmir,TB,Starting_Pitcher,72,170.0,23.1 332 | 330,Casey_Fossum,TB,Starting_Pitcher,73,160.0,29.14 333 | 331,Jae_Seo,TB,Starting_Pitcher,73,215.0,29.77 334 | 332,J.P._Howell,TB,Starting_Pitcher,72,175.0,23.85 335 | 333,Tim_Corcoran,TB,Starting_Pitcher,74,205.0,28.88 336 | 334,Jason_Hammel,TB,Starting_Pitcher,78,200.0,24.49 337 | 335,James_Shields,TB,Starting_Pitcher,76,214.0,25.19 338 | 336,Brian_Stokes,TB,Starting_Pitcher,73,200.0,27.48 339 | 337,Juan_Salas,TB,Relief_Pitcher,74,190.0,28.31 340 | 338,Jeff_Ridgway,TB,Relief_Pitcher,75,180.0,26.54 341 | 339,Ruddy_Lugo,TB,Relief_Pitcher,70,205.0,26.77 342 | 340,Jae-Kuk_Ryu,TB,Relief_Pitcher,75,220.0,23.75 343 | 341,Chad_Orvella,TB,Relief_Pitcher,71,190.0,26.41 344 | 342,Dan_Miceli,TB,Relief_Pitcher,72,215.0,36.47 345 | 343,Seth_McClung,TB,Relief_Pitcher,78,235.0,26.06 346 | 344,Jon_Switzer,TB,Relief_Pitcher,75,191.0,27.55 347 | 345,Shawn_Camp,TB,Relief_Pitcher,73,200.0,31.28 348 | 346,Scott_Dohmann,TB,Relief_Pitcher,73,181.0,29.04 349 | 347,Jason_LaRue,KC,Catcher,71,200.0,32.95 350 | 348,John_Buck,KC,Catcher,75,210.0,26.65 351 | 349,Ryan_Shealy,KC,First_Baseman,77,240.0,27.5 352 | 350,Ross_Gload,KC,First_Baseman,72,185.0,30.9 353 | 351,Esteban_German,KC,Second_Baseman,69,165.0,29.09 354 | 352,Mark_Grudzielanek,KC,Second_Baseman,73,190.0,36.67 355 | 353,Angel_Sanchez,KC,Second_Baseman,74,185.0,23.44 356 | 354,Angel_Berroa,KC,Shortstop,72,175.0,29.09 357 | 355,Andres_Blanco,KC,Shortstop,70,155.0,22.89 358 | 356,Mark_Teahen,KC,Third_Baseman,75,210.0,25.48 359 | 357,Joey_Gathright,KC,Outfielder,70,170.0,25.84 360 | 358,David_DeJesus,KC,Outfielder,72,175.0,27.2 361 | 359,Shane_Costa,KC,Outfielder,72,220.0,25.22 362 | 360,Mitch_Maier,KC,Outfielder,74,210.0,24.67 363 | 361,Reggie_Sanders,KC,Outfielder,73,205.0,39.25 364 | 362,Emil_Brown,KC,Outfielder,74,200.0,32.17 365 | 363,Mike_Sweeney,KC,Designated_Hitter,75,225.0,33.61 366 | 364,John_Bale,KC,Starting_Pitcher,76,205.0,32.77 367 | 365,Luke_Hudson,KC,Starting_Pitcher,75,195.0,29.83 368 | 366,Scott_Elarton,KC,Starting_Pitcher,80,240.0,31.02 369 | 367,Odalis_Perez,KC,Starting_Pitcher,72,150.0,29.73 370 | 368,Gil_Meche,KC,Starting_Pitcher,75,200.0,28.48 371 | 369,Neal_Musser,KC,Starting_Pitcher,73,215.0,26.51 372 | 370,Brian_Bannister,KC,Starting_Pitcher,74,202.0,26.0 373 | 371,Zack_Greinke,KC,Starting_Pitcher,74,200.0,23.36 374 | 372,Jorge_De_La_Rosa,KC,Starting_Pitcher,73,190.0,25.9 375 | 373,Todd_Wellemeyer,KC,Relief_Pitcher,75,205.0,28.5 376 | 374,Jimmy_Gobble,KC,Relief_Pitcher,75,190.0,25.62 377 | 375,Joel_Peralta,KC,Relief_Pitcher,71,160.0,30.94 378 | 376,Ryan_Braun,KC,Relief_Pitcher,73,215.0,26.59 379 | 377,Joakim_Soria,KC,Relief_Pitcher,75,185.0,22.78 380 | 378,Ken_Ray,KC,Relief_Pitcher,74,200.0,32.26 381 | 379,David_Riske,KC,Relief_Pitcher,74,190.0,30.35 382 | 380,Octavio_Dotel,KC,Relief_Pitcher,72,210.0,33.26 383 | 381,Joe_Nelson,KC,Relief_Pitcher,74,185.0,32.35 384 | 382,Gerald_Laird,TEX,Catcher,74,220.0,27.3 385 | 383,Miguel_Ojeda,TEX,Catcher,74,190.0,32.08 386 | 384,Guillermo_Quiroz,TEX,Catcher,73,202.0,25.25 387 | 385,Chris_Stewart,TEX,Catcher,76,205.0,25.03 388 | 386,Mark_Teixeira,TEX,First_Baseman,75,220.0,26.89 389 | 387,Ian_Kinsler,TEX,Second_Baseman,72,175.0,24.69 390 | 388,Joaquin_Arias,TEX,Shortstop,73,160.0,22.44 391 | 389,Michael_Young,TEX,Shortstop,73,190.0,30.36 392 | 390,Hank_Blalock,TEX,Third_Baseman,73,200.0,26.27 393 | 391,Marlon_Byrd,TEX,Outfielder,72,229.0,29.5 394 | 392,Brad_Wilkerson,TEX,Outfielder,72,206.0,29.75 395 | 393,Sammy_Sosa,TEX,Outfielder,72,220.0,38.3 396 | 394,Kenny_Lofton,TEX,Outfielder,72,180.0,39.75 397 | 395,Frank_Catalanotto,TEX,Outfielder,71,195.0,32.84 398 | 396,Nelson_Cruz,TEX,Outfielder,75,175.0,26.66 399 | 397,Jason_Botts,TEX,Designated_Hitter,77,250.0,26.6 400 | 398,Robinson_Tejeda,TEX,Starting_Pitcher,75,188.0,24.94 401 | 399,John_Rheinecker,TEX,Starting_Pitcher,74,230.0,27.76 402 | 400,Edinson_Volquez,TEX,Starting_Pitcher,73,190.0,23.66 403 | 401,A.J._Murray,TEX,Starting_Pitcher,75,200.0,24.96 404 | 402,Brandon_McCarthy,TEX,Starting_Pitcher,79,190.0,23.65 405 | 403,Vicente_Padilla,TEX,Starting_Pitcher,74,219.0,29.42 406 | 404,Kevin_Millwood,TEX,Starting_Pitcher,76,235.0,32.18 407 | 405,John_Koronka,TEX,Starting_Pitcher,73,180.0,26.66 408 | 406,Frank_Francisco,TEX,Relief_Pitcher,74,180.0,27.47 409 | 407,Francisco_Cruceta,TEX,Relief_Pitcher,74,180.0,25.66 410 | 408,Akinori_Otsuka,TEX,Relief_Pitcher,72,200.0,35.13 411 | 409,Eric_Gagne,TEX,Relief_Pitcher,74,234.0,31.15 412 | 410,Ron_Mahay,TEX,Relief_Pitcher,74,185.0,35.67 413 | 411,Joaquin_Benoit,TEX,Relief_Pitcher,75,220.0,29.6 414 | 412,Rick_Bauer,TEX,Relief_Pitcher,78,223.0,30.14 415 | 413,Josh_Rupe,TEX,Relief_Pitcher,74,200.0,24.53 416 | 414,Wes_Littleton,TEX,Relief_Pitcher,74,210.0,24.49 417 | 415,C.J._Wilson,TEX,Relief_Pitcher,74,200.0,26.28 418 | 416,Scott_Feldman,TEX,Relief_Pitcher,77,210.0,24.06 419 | 417,Gregg_Zaun,TOR,Catcher,70,190.0,35.88 420 | 418,Jason_Phillips,TOR,Catcher,73,177.0,30.42 421 | 419,Lyle_Overbay,TOR,First_Baseman,74,227.0,30.09 422 | 420,Russ_Adams,TOR,Second_Baseman,73,180.0,26.5 423 | 421,Aaron_Hill,TOR,Second_Baseman,71,195.0,24.94 424 | 422,Jason_Smith,TOR,Second_Baseman,75,199.0,29.6 425 | 423,John_McDonald,TOR,Shortstop,71,175.0,32.43 426 | 424,Royce_Clayton,TOR,Shortstop,72,185.0,37.16 427 | 425,Troy_Glaus,TOR,Third_Baseman,77,240.0,30.57 428 | 426,John_Hattig,TOR,Third_Baseman,74,210.0,27.01 429 | 427,Reed_Johnson,TOR,Outfielder,70,180.0,30.23 430 | 428,Alex_Rios,TOR,Outfielder,77,194.0,26.03 431 | 429,Vernon_Wells,TOR,Outfielder,73,225.0,28.23 432 | 430,Frank_Thomas,TOR,Designated_Hitter,77,275.0,38.76 433 | 431,Adam_Lind,TOR,Designated_Hitter,74,195.0,23.62 434 | 432,Shaun_Marcum,TOR,Starting_Pitcher,72,180.0,25.21 435 | 433,Casey_Janssen,TOR,Starting_Pitcher,76,205.0,25.45 436 | 434,Gustavo_Chacin,TOR,Starting_Pitcher,71,193.0,26.24 437 | 435,A.J._Burnett,TOR,Starting_Pitcher,76,230.0,30.15 438 | 436,Roy_Halladay,TOR,Starting_Pitcher,78,230.0,29.8 439 | 437,John_Thomson,TOR,Starting_Pitcher,75,220.0,33.41 440 | 438,Tomo_Ohka,TOR,Starting_Pitcher,73,200.0,30.95 441 | 439,B.J._Ryan,TOR,Relief_Pitcher,78,249.0,31.17 442 | 440,Scott_Downs,TOR,Relief_Pitcher,74,190.0,30.95 443 | 441,Brian_Tallet,TOR,Relief_Pitcher,79,208.0,29.44 444 | 442,Matt_Roney,TOR,Relief_Pitcher,75,245.0,27.14 445 | 443,Tracy_Thorpe,TOR,Relief_Pitcher,76,250.0,26.21 446 | 444,Jean_Machi,TOR,Relief_Pitcher,72,160.0,24.08 447 | 445,Brandon_League,TOR,Relief_Pitcher,75,192.0,23.96 448 | 446,Dustin_McGowan,TOR,Relief_Pitcher,75,220.0,24.94 449 | 447,Jason_Frasor,TOR,Relief_Pitcher,70,170.0,29.56 450 | 448,Francisco_Rosario,TOR,Relief_Pitcher,72,197.0,26.42 451 | 449,Davis_Romero,TOR,Relief_Pitcher,70,155.0,23.92 452 | 450,Jeremy_Accardo,TOR,Relief_Pitcher,74,190.0,25.23 453 | 451,Mike_Redmond,MIN,Catcher,71,200.0,35.82 454 | 452,Joe_Mauer,MIN,Catcher,76,220.0,23.87 455 | 453,Chris_Heintz,MIN,Catcher,73,210.0,32.57 456 | 454,Justin_Morneau,MIN,First_Baseman,76,228.0,25.79 457 | 455,Luis_Castillo,MIN,Second_Baseman,71,190.0,31.47 458 | 456,Alexi_Casilla,MIN,Second_Baseman,69,160.0,22.61 459 | 457,Alejandro_Machado,MIN,Second_Baseman,72,184.0,24.85 460 | 458,Jason_Bartlett,MIN,Shortstop,72,180.0,27.33 461 | 459,Luis_Rodriguez,MIN,Third_Baseman,69,180.0,26.67 462 | 460,Jeff_Cirillo,MIN,Third_Baseman,73,200.0,37.43 463 | 461,Nick_Punto,MIN,Third_Baseman,69,176.0,29.31 464 | 462,Jason_Tyner,MIN,Outfielder,73,160.0,29.85 465 | 463,Michael_Cuddyer,MIN,Outfielder,74,222.0,27.93 466 | 464,Torii_Hunter,MIN,Outfielder,74,211.0,31.62 467 | 465,Lew_Ford,MIN,Outfielder,72,195.0,30.55 468 | 466,Jason_Kubel,MIN,Outfielder,71,200.0,24.77 469 | 467,Josh_Rabe,MIN,Designated_Hitter,74,210.0,28.38 470 | 468,Rondell_White,MIN,Designated_Hitter,73,225.0,35.02 471 | 469,Ramon_Ortiz,MIN,Starting_Pitcher,72,175.0,33.77 472 | 470,Johan_Santana,MIN,Starting_Pitcher,72,206.0,27.97 473 | 471,Carlos_Silva,MIN,Starting_Pitcher,76,240.0,27.85 474 | 472,Matt_Garza,MIN,Starting_Pitcher,76,185.0,23.26 475 | 473,Boof_Bonser,MIN,Starting_Pitcher,76,260.0,25.38 476 | 474,Francisco_Liriano,MIN,Starting_Pitcher,74,185.0,23.35 477 | 475,Scott_Baker,MIN,Starting_Pitcher,76,221.0,25.45 478 | 476,Pat_Neshek,MIN,Relief_Pitcher,75,205.0,26.49 479 | 477,Glen_Perkins,MIN,Relief_Pitcher,71,200.0,24.0 480 | 478,Julio_DePaula,MIN,Relief_Pitcher,72,170.0,24.16 481 | 479,Juan_Rincon,MIN,Relief_Pitcher,71,201.0,28.1 482 | 480,Jesse_Crain,MIN,Relief_Pitcher,73,205.0,25.65 483 | 481,Matt_Guerrier,MIN,Relief_Pitcher,75,185.0,28.58 484 | 482,Joe_Nathan,MIN,Relief_Pitcher,76,205.0,32.27 485 | 483,Dennys_Reyes,MIN,Relief_Pitcher,75,245.0,29.86 486 | 484,Brayan_Pe?a,ATL,Catcher,71,220.0,25.14 487 | 485,Brian_McCann,ATL,Catcher,75,210.0,23.03 488 | 486,Craig_Wilson,ATL,First_Baseman,74,220.0,30.25 489 | 487,Chris_Woodward,ATL,Second_Baseman,72,185.0,30.67 490 | 488,Pete_Orr,ATL,Second_Baseman,73,175.0,27.73 491 | 489,Martin_Prado,ATL,Second_Baseman,73,170.0,23.34 492 | 490,Tony_Pe?a,ATL,Shortstop,73,180.0,25.94 493 | 491,Edgar_Renteria,ATL,Shortstop,73,200.0,31.56 494 | 492,Chipper_Jones,ATL,Third_Baseman,76,210.0,34.85 495 | 493,Willy_Aybar,ATL,Third_Baseman,72,175.0,23.98 496 | 494,Jeff_Francoeur,ATL,Outfielder,76,220.0,23.14 497 | 495,Matt_Diaz,ATL,Outfielder,73,206.0,28.99 498 | 496,Kelly_Johnson,ATL,Outfielder,73,180.0,25.02 499 | 497,Andruw_Jones,ATL,Outfielder,73,210.0,29.85 500 | 498,Ryan_Langerhans,ATL,Outfielder,75,195.0,27.03 501 | 499,Scott_Thorman,ATL,Outfielder,75,200.0,25.15 502 | 500,T.J._Bohn,ATL,Outfielder,77,200.0,27.12 503 | 501,Tim_Hudson,ATL,Starting_Pitcher,73,164.0,31.63 504 | 502,Jonathan_Johnson,ATL,Starting_Pitcher,72,180.0,32.62 505 | 503,John_Smoltz,ATL,Starting_Pitcher,75,220.0,39.79 506 | 504,Mike_Hampton,ATL,Starting_Pitcher,70,195.0,34.47 507 | 505,Kyle_Davies,ATL,Starting_Pitcher,74,205.0,23.47 508 | 506,Chuck_James,ATL,Starting_Pitcher,72,170.0,25.31 509 | 507,Phil_Stockman,ATL,Relief_Pitcher,80,240.0,27.1 510 | 508,Macay_McBride,ATL,Relief_Pitcher,71,210.0,24.35 511 | 509,Joey_Devine,ATL,Relief_Pitcher,71,195.0,23.45 512 | 510,Peter_Moylan,ATL,Relief_Pitcher,74,200.0,28.24 513 | 511,Mike_Gonzalez,ATL,Relief_Pitcher,74,205.0,28.77 514 | 512,Lance_Cormier,ATL,Relief_Pitcher,73,192.0,26.53 515 | 513,Blaine_Boyer,ATL,Relief_Pitcher,75,190.0,25.64 516 | 514,Manny_Acosta,ATL,Relief_Pitcher,76,170.0,25.83 517 | 515,Bob_Wickman,ATL,Relief_Pitcher,73,240.0,38.06 518 | 516,Tanyon_Sturtze,ATL,Relief_Pitcher,77,200.0,36.38 519 | 517,Oscar_Villarreal,ATL,Relief_Pitcher,72,205.0,25.27 520 | 518,Rafael_Soriano,ATL,Relief_Pitcher,73,175.0,27.2 521 | 519,Chad_Paronto,ATL,Relief_Pitcher,77,250.0,31.59 522 | 520,Tyler_Yates,ATL,Relief_Pitcher,76,220.0,29.56 523 | 521,Henry_Blanco,CHC,Catcher,71,224.0,35.5 524 | 522,Michael_Barrett,CHC,Catcher,75,210.0,30.35 525 | 523,Geovany_Soto,CHC,Catcher,73,195.0,24.11 526 | 524,Scott_Moore,CHC,First_Baseman,74,180.0,23.29 527 | 525,Derrek_Lee,CHC,First_Baseman,77,245.0,31.48 528 | 526,Ryan_Theriot,CHC,Second_Baseman,71,175.0,27.23 529 | 527,Ronny_Cedeno,CHC,Shortstop,72,180.0,24.07 530 | 528,Aramis_Ramirez,CHC,Third_Baseman,73,215.0,28.68 531 | 529,Cesar_Izturis,CHC,Third_Baseman,69,175.0,27.05 532 | 530,Alfonso_Soriano,CHC,Outfielder,73,180.0,31.15 533 | 531,Jacque_Jones,CHC,Outfielder,70,195.0,31.85 534 | 532,Daryle_Ward,CHC,Outfielder,74,230.0,31.68 535 | 533,Cliff_Floyd,CHC,Outfielder,76,230.0,34.23 536 | 534,Mark_DeRosa,CHC,Outfielder,73,205.0,32.01 537 | 535,Matt_Murton,CHC,Outfielder,73,215.0,25.41 538 | 536,Buck_Coats,CHC,Outfielder,75,195.0,24.73 539 | 537,Angel_Pagan,CHC,Outfielder,73,180.0,25.66 540 | 538,Sean_Marshall,CHC,Starting_Pitcher,79,205.0,24.5 541 | 539,Carlos_Marmol,CHC,Starting_Pitcher,74,180.0,24.38 542 | 540,Ryan_O'Malley,CHC,Starting_Pitcher,73,190.0,26.89 543 | 541,Juan_Mateo,CHC,Starting_Pitcher,74,180.0,24.2 544 | 542,Rich_Hill,CHC,Starting_Pitcher,77,190.0,26.97 545 | 543,Angel_Guzman,CHC,Starting_Pitcher,75,190.0,25.21 546 | 544,Wade_Miller,CHC,Starting_Pitcher,74,220.0,30.46 547 | 545,Jason_Marquis,CHC,Starting_Pitcher,73,210.0,28.53 548 | 546,Carlos_Zambrano,CHC,Starting_Pitcher,77,255.0,25.75 549 | 547,Ted_Lilly,CHC,Starting_Pitcher,73,190.0,31.15 550 | 548,Mark_Prior,CHC,Starting_Pitcher,77,230.0,26.48 551 | 549,Neal_Cotts,CHC,Relief_Pitcher,74,200.0,26.93 552 | 550,Will_Ohman,CHC,Relief_Pitcher,74,205.0,29.55 553 | 551,Scott_Eyre,CHC,Relief_Pitcher,73,210.0,34.75 554 | 552,Kerry_Wood,CHC,Relief_Pitcher,77,225.0,29.71 555 | 553,Ryan_Dempster,CHC,Relief_Pitcher,74,215.0,29.83 556 | 554,Bob_Howry,CHC,Relief_Pitcher,77,220.0,33.57 557 | 555,Mike_Wuertz,CHC,Relief_Pitcher,75,205.0,28.21 558 | 556,Roberto_Novoa,CHC,Relief_Pitcher,77,200.0,27.54 559 | 557,Chris_Snyder,ARZ,Catcher,75,220.0,26.05 560 | 558,Miguel_Montero,ARZ,Catcher,71,197.0,23.64 561 | 559,Conor_Jackson,ARZ,First_Baseman,74,225.0,24.82 562 | 560,Robby_Hammock,ARZ,First_Baseman,70,187.0,29.8 563 | 561,Tony_Clark,ARZ,First_Baseman,79,245.0,34.71 564 | 562,Orlando_Hudson,ARZ,Second_Baseman,72,185.0,29.22 565 | 563,Stephen_Drew,ARZ,Shortstop,72,185.0,23.96 566 | 564,Alberto_Callaspo,ARZ,Shortstop,70,175.0,23.87 567 | 565,Chad_Tracy,ARZ,Third_Baseman,74,200.0,26.77 568 | 566,Chris_Young,ARZ,Outfielder,74,180.0,23.49 569 | 567,Scott_Hairston,ARZ,Outfielder,72,188.0,26.77 570 | 568,Carlos_Quentin,ARZ,Outfielder,73,225.0,24.51 571 | 569,Jeff_DaVanon,ARZ,Outfielder,72,200.0,33.23 572 | 570,Eric_Byrnes,ARZ,Outfielder,74,210.0,31.04 573 | 571,Livan_Hernandez,ARZ,Starting_Pitcher,74,245.0,32.02 574 | 572,Doug_Davis,ARZ,Starting_Pitcher,76,213.0,31.44 575 | 573,Randy_Johnson,ARZ,Starting_Pitcher,82,231.0,43.47 576 | 574,Juan_Cruz,ARZ,Starting_Pitcher,74,165.0,28.38 577 | 575,Brandon_Webb,ARZ,Starting_Pitcher,74,228.0,27.81 578 | 576,Enrique_Gonzalez,ARZ,Starting_Pitcher,70,210.0,24.57 579 | 577,Dana_Eveland,ARZ,Starting_Pitcher,73,250.0,23.34 580 | 578,Brandon_Medders,ARZ,Relief_Pitcher,73,191.0,27.09 581 | 579,Tony_Pe?a,ARZ,Relief_Pitcher,74,190.0,25.14 582 | 580,Doug_Slaten,ARZ,Relief_Pitcher,77,200.0,27.07 583 | 581,Edgar_Gonzalez,ARZ,Relief_Pitcher,72,215.0,24.02 584 | 582,Jose_Valverde,ARZ,Relief_Pitcher,76,254.0,27.6 585 | 583,Jorge_Julio,ARZ,Relief_Pitcher,73,232.0,27.99 586 | 584,Brandon_Lyon,ARZ,Relief_Pitcher,73,180.0,27.56 587 | 585,Miguel_Olivo,FLA,Catcher,72,215.0,28.63 588 | 586,Matt_Treanor,FLA,Catcher,74,220.0,30.99 589 | 587,Mike_Jacobs,FLA,First_Baseman,74,180.0,26.33 590 | 588,Dan_Uggla,FLA,Second_Baseman,71,200.0,26.97 591 | 589,Robert_Andino,FLA,Shortstop,72,170.0,22.85 592 | 590,Hanley_Ramirez,FLA,Shortstop,75,195.0,23.19 593 | 591,Miguel_Cabrera,FLA,Third_Baseman,74,210.0,23.87 594 | 592,Aaron_Boone,FLA,Third_Baseman,74,200.0,33.98 595 | 593,Joe_Borchard,FLA,Outfielder,77,220.0,28.26 596 | 594,Alfredo_Amezaga,FLA,Outfielder,70,165.0,29.12 597 | 595,Cody_Ross,FLA,Outfielder,71,180.0,26.18 598 | 596,Josh_Willingham,FLA,Outfielder,73,200.0,28.03 599 | 597,Jeremy_Hermida,FLA,Outfielder,76,200.0,23.08 600 | 598,Eric_Reed,FLA,Outfielder,71,170.0,26.24 601 | 599,Reggi_Abercrombie,FLA,Outfielder,75,224.0,26.63 602 | 600,Ricky_Nolasco,FLA,Starting_Pitcher,74,220.0,24.21 603 | 601,Anibal_Sanchez,FLA,Starting_Pitcher,72,180.0,23.01 604 | 602,Scott_Olsen,FLA,Starting_Pitcher,76,198.0,23.13 605 | 603,Josh_Johnson,FLA,Starting_Pitcher,79,240.0,23.08 606 | 604,Dontrelle_Willis,FLA,Starting_Pitcher,76,239.0,25.13 607 | 605,Logan_Kensing,FLA,Relief_Pitcher,73,185.0,24.66 608 | 606,Sergio_Mitre,FLA,Relief_Pitcher,76,210.0,26.03 609 | 607,Kevin_Gregg,FLA,Relief_Pitcher,78,220.0,28.7 610 | 608,Travis_Bowyer,FLA,Relief_Pitcher,75,200.0,25.57 611 | 609,Renyel_Pinto,FLA,Relief_Pitcher,76,195.0,24.65 612 | 610,Randy_Messenger,FLA,Relief_Pitcher,72,220.0,25.55 613 | 611,Yusmeiro_Petit,FLA,Relief_Pitcher,72,230.0,22.27 614 | 612,Carlos_Martinez,FLA,Relief_Pitcher,73,170.0,24.76 615 | 613,Taylor_Tankersley,FLA,Relief_Pitcher,73,220.0,23.98 616 | 614,Henry_Owens,FLA,Relief_Pitcher,75,230.0,27.85 617 | 615,Jose_Garcia,FLA,Relief_Pitcher,71,165.0,22.14 618 | 616,Matt_Lindstrom,FLA,Relief_Pitcher,76,205.0,27.05 619 | 617,Javier_Valentin,CIN,Catcher,70,192.0,31.45 620 | 618,Chad_Moeller,CIN,Catcher,75,210.0,32.03 621 | 619,David_Ross,CIN,Catcher,74,205.0,29.95 622 | 620,Joey_Votto,CIN,First_Baseman,75,200.0,23.47 623 | 621,Scott_Hatteberg,CIN,First_Baseman,73,210.0,37.21 624 | 622,Brandon_Phillips,CIN,Second_Baseman,71,185.0,25.67 625 | 623,Juan_Castro,CIN,Shortstop,71,195.0,34.69 626 | 624,Alex_Gonzalez,CIN,Shortstop,72,202.0,30.04 627 | 625,Mark_Bellhorn,CIN,Third_Baseman,73,205.0,32.52 628 | 626,Edwin_Encarnacion,CIN,Third_Baseman,73,195.0,24.15 629 | 627,Jeff_Keppinger,CIN,Third_Baseman,72,180.0,26.86 630 | 628,Norris_Hopper,CIN,Outfielder,69,200.0,27.94 631 | 629,Chris_Denorfia,CIN,Outfielder,73,185.0,26.63 632 | 630,Adam_Dunn,CIN,Outfielder,78,240.0,27.31 633 | 631,Bubba_Crosby,CIN,Outfielder,71,185.0,30.55 634 | 632,Jeff_Conine,CIN,Outfielder,73,220.0,40.68 635 | 633,Ken_Griffey_Jr.,CIN,Outfielder,75,205.0,37.27 636 | 634,Josh_Hamilton,CIN,Outfielder,76,205.0,25.78 637 | 635,Ryan_Freel,CIN,Outfielder,70,180.0,30.98 638 | 636,Kyle_Lohse,CIN,Starting_Pitcher,74,201.0,28.41 639 | 637,Bronson_Arroyo,CIN,Starting_Pitcher,77,190.0,30.01 640 | 638,Eric_Milton,CIN,Starting_Pitcher,75,208.0,31.57 641 | 639,Aaron_Harang,CIN,Starting_Pitcher,79,240.0,28.81 642 | 641,Elizardo_Ramirez,CIN,Starting_Pitcher,72,180.0,24.09 643 | 642,Todd_Coffey,CIN,Relief_Pitcher,77,230.0,26.47 644 | 643,Brian_Shackelford,CIN,Relief_Pitcher,73,195.0,30.5 645 | 644,Bill_Bray,CIN,Relief_Pitcher,75,215.0,23.74 646 | 645,Bobby_Livingston,CIN,Relief_Pitcher,75,190.0,24.49 647 | 646,Matt_Belisle,CIN,Relief_Pitcher,75,195.0,26.73 648 | 647,Gary_Majewski,CIN,Relief_Pitcher,73,215.0,27.01 649 | 648,Mike_Stanton,CIN,Relief_Pitcher,73,215.0,39.75 650 | 649,Brad_Salmon,CIN,Relief_Pitcher,76,220.0,27.16 651 | 650,Jared_Burton,CIN,Relief_Pitcher,77,220.0,25.74 652 | 651,David_Weathers,CIN,Relief_Pitcher,75,230.0,37.43 653 | 652,Rheal_Cormier,CIN,Relief_Pitcher,70,195.0,39.85 654 | 653,Yorvit_Torrealba,COL,Catcher,71,190.0,28.62 655 | 654,Chris_Iannetta,COL,Catcher,71,195.0,23.9 656 | 655,Alvin_Colina,COL,Catcher,75,209.0,25.18 657 | 656,Todd_Helton,COL,First_Baseman,74,204.0,33.53 658 | 657,Jamey_Carroll,COL,Second_Baseman,69,170.0,33.03 659 | 658,Kaz_Matsui,COL,Second_Baseman,70,185.0,31.35 660 | 659,Troy_Tulowitzki,COL,Shortstop,75,205.0,22.39 661 | 660,Clint_Barmes,COL,Shortstop,72,175.0,27.99 662 | 661,Garrett_Atkins,COL,Third_Baseman,75,210.0,27.22 663 | 662,Ryan_Spilborghs,COL,Outfielder,73,190.0,27.49 664 | 663,Cory_Sullivan,COL,Outfielder,72,180.0,27.53 665 | 664,Jeff_Salazar,COL,Outfielder,72,180.0,26.26 666 | 665,Willy_Taveras,COL,Outfielder,72,160.0,25.18 667 | 666,Matt_Holliday,COL,Outfielder,76,235.0,27.12 668 | 667,Brad_Hawpe,COL,Outfielder,75,200.0,27.69 669 | 668,Jeff_Baker,COL,Outfielder,74,210.0,25.69 670 | 669,Javy_Lopez,COL,Designated_Hitter,75,224.0,36.32 671 | 670,Byung-Hyun_Kim,COL,Starting_Pitcher,69,180.0,28.11 672 | 671,Rodrigo_Lopez,COL,Starting_Pitcher,73,190.0,31.21 673 | 672,Brian_Lawrence,COL,Starting_Pitcher,72,197.0,30.8 674 | 673,Josh_Fogg,COL,Starting_Pitcher,72,203.0,30.21 675 | 674,Aaron_Cook,COL,Starting_Pitcher,75,205.0,28.06 676 | 675,Denny_Bautista,COL,Starting_Pitcher,77,170.0,26.52 677 | 676,Ubaldo_Jimenez,COL,Starting_Pitcher,76,200.0,23.1 678 | 677,Jason_Hirsh,COL,Starting_Pitcher,80,250.0,25.02 679 | 678,Jeff_Francis,COL,Starting_Pitcher,77,200.0,26.14 680 | 679,Taylor_Buchholz,COL,Starting_Pitcher,76,220.0,25.38 681 | 680,Ryan_Speier,COL,Relief_Pitcher,79,200.0,27.6 682 | 681,Ramon_Ramirez,COL,Relief_Pitcher,71,190.0,25.5 683 | 682,Manny_Corpas,COL,Relief_Pitcher,75,170.0,24.24 684 | 683,Juan_Morillo,COL,Relief_Pitcher,73,190.0,23.32 685 | 684,Brian_Fuentes,COL,Relief_Pitcher,76,220.0,31.56 686 | 685,LaTroy_Hawkins,COL,Relief_Pitcher,77,215.0,34.19 687 | 686,Tom_Martin,COL,Relief_Pitcher,73,206.0,36.78 688 | 687,Jeremy_Affeldt,COL,Relief_Pitcher,76,215.0,27.73 689 | 688,Paul_Lo_Duca,NYM,Catcher,70,185.0,34.88 690 | 689,Ramon_Castro,NYM,Catcher,75,235.0,31.0 691 | 690,Julio_Franco,NYM,First_Baseman,73,188.0,48.52 692 | 691,Carlos_Delgado,NYM,First_Baseman,75,230.0,34.68 693 | 692,Jose_Valentin,NYM,Second_Baseman,70,195.0,37.38 694 | 693,Anderson_Hernandez,NYM,Second_Baseman,69,168.0,24.33 695 | 694,Damion_Easley,NYM,Shortstop,71,190.0,37.3 696 | 695,Jose_Reyes,NYM,Shortstop,72,160.0,23.72 697 | 696,David_Wright,NYM,Third_Baseman,72,200.0,24.19 698 | 697,Ben_Johnson,NYM,Outfielder,73,200.0,25.7 699 | 698,Endy_Chavez,NYM,Outfielder,70,189.0,29.06 700 | 699,David_Newhan,NYM,Outfielder,70,180.0,33.48 701 | 700,Carlos_Beltran,NYM,Outfielder,73,190.0,29.85 702 | 701,Shawn_Green,NYM,Outfielder,76,200.0,34.3 703 | 702,Moises_Alou,NYM,Outfielder,75,220.0,40.66 704 | 703,Lastings_Milledge,NYM,Outfielder,72,187.0,21.9 705 | 704,Alay_Soler,NYM,Starting_Pitcher,73,240.0,27.39 706 | 705,Mike_Pelfrey,NYM,Starting_Pitcher,79,190.0,23.13 707 | 706,Pedro_Martinez,NYM,Starting_Pitcher,71,180.0,35.35 708 | 707,Tom_Glavine,NYM,Starting_Pitcher,72,185.0,40.93 709 | 708,Chan_Ho_Park,NYM,Starting_Pitcher,74,210.0,33.67 710 | 709,Orlando_Hernandez,NYM,Starting_Pitcher,74,220.0,37.39 711 | 710,Dave_Williams,NYM,Starting_Pitcher,74,219.0,27.97 712 | 711,Oliver_Perez,NYM,Starting_Pitcher,72,190.0,25.54 713 | 712,John_Maine,NYM,Starting_Pitcher,76,193.0,25.81 714 | 713,Marcos_Carvajal,NYM,Relief_Pitcher,76,175.0,22.53 715 | 714,Ambiorix_Burgos,NYM,Relief_Pitcher,72,180.0,22.86 716 | 715,Jason_Vargas,NYM,Relief_Pitcher,72,215.0,24.07 717 | 716,Jon_Adkins,NYM,Relief_Pitcher,71,210.0,29.5 718 | 717,Juan_Padilla,NYM,Relief_Pitcher,72,200.0,30.03 719 | 718,Duaner_Sanchez,NYM,Relief_Pitcher,72,190.0,27.38 720 | 719,Pedro_Feliciano,NYM,Relief_Pitcher,70,185.0,30.51 721 | 720,Aaron_Heilman,NYM,Relief_Pitcher,77,220.0,28.3 722 | 721,Jorge_Sosa,NYM,Relief_Pitcher,74,170.0,29.84 723 | 722,Scott_Schoeneweis,NYM,Relief_Pitcher,72,195.0,33.41 724 | 723,Guillermo_Mota,NYM,Relief_Pitcher,76,205.0,33.6 725 | 724,Billy_Wagner,NYM,Relief_Pitcher,71,195.0,35.6 726 | 725,Philip_Humber,NYM,Relief_Pitcher,76,210.0,24.19 727 | 726,Brad_Ausmus,HOU,Catcher,71,190.0,37.88 728 | 727,Humberto_Quintero,HOU,Catcher,73,190.0,27.56 729 | 728,Hector_Gimenez,HOU,Catcher,70,180.0,24.42 730 | 729,Lance_Berkman,HOU,First_Baseman,73,220.0,31.05 731 | 730,Mike_Lamb,HOU,First_Baseman,73,190.0,31.56 732 | 731,Mark_Loretta,HOU,Second_Baseman,72,186.0,35.55 733 | 732,Craig_Biggio,HOU,Second_Baseman,71,185.0,41.21 734 | 733,Brooks_Conrad,HOU,Second_Baseman,71,190.0,27.12 735 | 734,Chris_Burke,HOU,Second_Baseman,71,180.0,26.97 736 | 735,Eric_Bruntlett,HOU,Second_Baseman,72,190.0,28.92 737 | 736,Adam_Everett,HOU,Shortstop,72,170.0,30.06 738 | 737,Morgan_Ensberg,HOU,Third_Baseman,74,210.0,31.51 739 | 738,Carlos_Lee,HOU,Outfielder,74,240.0,30.69 740 | 739,Jason_Lane,HOU,Outfielder,74,220.0,30.19 741 | 740,Orlando_Palmeiro,HOU,Outfielder,71,180.0,38.11 742 | 741,Luke_Scott,HOU,Outfielder,72,210.0,28.68 743 | 742,Charlton_Jimerson,HOU,Outfielder,75,210.0,27.44 744 | 743,Fernando_Nieve,HOU,Starting_Pitcher,72,195.0,24.63 745 | 744,Wandy_Rodriguez,HOU,Starting_Pitcher,71,160.0,28.11 746 | 745,Brandon_Backe,HOU,Starting_Pitcher,72,180.0,28.9 747 | 746,Matt_Albers,HOU,Starting_Pitcher,72,205.0,24.11 748 | 747,Woody_Williams,HOU,Starting_Pitcher,72,200.0,40.53 749 | 748,Roy_Oswalt,HOU,Starting_Pitcher,72,185.0,29.5 750 | 749,Jason_Jennings,HOU,Starting_Pitcher,74,245.0,28.62 751 | 750,Miguel_Asencio,HOU,Relief_Pitcher,74,190.0,26.42 752 | 751,Brad_Lidge,HOU,Relief_Pitcher,77,210.0,30.18 753 | 752,Trever_Miller,HOU,Relief_Pitcher,75,200.0,33.75 754 | 753,David_Borkowski,HOU,Relief_Pitcher,73,200.0,30.06 755 | 754,Dan_Wheeler,HOU,Relief_Pitcher,75,222.0,29.22 756 | 755,Paul_Estrada,HOU,Relief_Pitcher,73,215.0,24.47 757 | 756,Lincoln_Holdzkom,HOU,Relief_Pitcher,76,240.0,24.94 758 | 757,Chris_Sampson,HOU,Relief_Pitcher,72,170.0,28.77 759 | 758,Chad_Qualls,HOU,Relief_Pitcher,77,220.0,28.54 760 | 759,Ezequiel_Astacio,HOU,Relief_Pitcher,75,156.0,27.32 761 | 760,Mike_Lieberthal,LA,Catcher,72,190.0,35.12 762 | 761,Russell_Martin,LA,Catcher,71,202.0,24.04 763 | 762,Olmedo_Saenz,LA,First_Baseman,71,221.0,36.39 764 | 763,James_Loney,LA,First_Baseman,75,200.0,22.81 765 | 764,Nomar_Garciaparra,LA,First_Baseman,72,190.0,33.6 766 | 765,Jeff_Kent,LA,Second_Baseman,73,210.0,38.98 767 | 766,Ramon_Martinez,LA,Second_Baseman,73,190.0,34.39 768 | 767,Marlon_Anderson,LA,Second_Baseman,71,200.0,33.15 769 | 768,Rafael_Furcal,LA,Shortstop,70,165.0,29.35 770 | 769,Wilson_Betemit,LA,Third_Baseman,75,190.0,26.59 771 | 770,Andy_LaRoche,LA,Third_Baseman,71,185.0,23.46 772 | 771,Matt_Kemp,LA,Outfielder,76,230.0,22.43 773 | 772,Andre_Ethier,LA,Outfielder,73,208.0,24.89 774 | 773,Delwyn_Young,LA,Outfielder,68,209.0,24.67 775 | 774,Jason_Repko,LA,Outfielder,71,175.0,26.17 776 | 775,Juan_Pierre,LA,Outfielder,72,180.0,29.54 777 | 776,Luis_Gonzalez,LA,Outfielder,74,200.0,39.49 778 | 777,Jason_Schmidt,LA,Starting_Pitcher,77,205.0,34.08 779 | 778,Randy_Wolf,LA,Starting_Pitcher,72,200.0,30.52 780 | 779,Brad_Penny,LA,Starting_Pitcher,76,250.0,28.77 781 | 780,Derek_Lowe,LA,Starting_Pitcher,78,210.0,33.75 782 | 781,Mark_Hendrickson,LA,Starting_Pitcher,81,230.0,32.69 783 | 782,Chad_Billingsley,LA,Starting_Pitcher,72,244.0,22.59 784 | 783,Takashi_Saito,LA,Relief_Pitcher,73,202.0,37.04 785 | 784,Jonathan_Broxton,LA,Relief_Pitcher,76,240.0,22.7 786 | 785,Hong-Chih_Kuo,LA,Relief_Pitcher,72,200.0,25.6 787 | 786,Eric_Stults,LA,Relief_Pitcher,72,215.0,27.23 788 | 787,Chin-Hui_Tsao,LA,Relief_Pitcher,74,177.0,25.74 789 | 788,Tim_Hamulack,LA,Relief_Pitcher,76,210.0,30.29 790 | 789,Yhency_Brazoban,LA,Relief_Pitcher,73,170.0,26.72 791 | 790,Brett_Tomko,LA,Relief_Pitcher,76,215.0,33.9 792 | 791,Joe_Beimel,LA,Relief_Pitcher,75,217.0,29.86 793 | 792,Elmer_Dessens,LA,Relief_Pitcher,70,198.0,36.13 794 | 793,Ryan_Budde,PHI,Catcher,71,200.0,27.54 795 | 794,Rod_Barajas,PHI,Catcher,74,220.0,31.49 796 | 795,Carlos_Ruiz,PHI,Catcher,72,170.0,28.1 797 | 796,Chris_Coste,PHI,Catcher,73,200.0,34.07 798 | 797,Ryan_Howard,PHI,First_Baseman,76,230.0,27.28 799 | 798,Wes_Helms,PHI,First_Baseman,76,231.0,30.8 800 | 799,Chase_Utley,PHI,Second_Baseman,73,183.0,28.2 801 | 800,Danny_Sandoval,PHI,Second_Baseman,71,192.0,27.9 802 | 801,Jimmy_Rollins,PHI,Shortstop,68,167.0,28.26 803 | 802,Abraham_Nu?ez,PHI,Third_Baseman,71,190.0,30.96 804 | 803,Michael_Bourn,PHI,Outfielder,71,180.0,24.18 805 | 804,Chris_Roberson,PHI,Outfielder,74,180.0,27.52 806 | 805,Jayson_Werth,PHI,Outfielder,77,215.0,27.78 807 | 806,Shane_Victorino,PHI,Outfielder,69,160.0,26.25 808 | 807,Aaron_Rowand,PHI,Outfielder,72,205.0,29.5 809 | 808,Pat_Burrell,PHI,Outfielder,76,223.0,30.39 810 | 809,Greg_Dobbs,PHI,Designated_Hitter,73,205.0,28.66 811 | 810,Cole_Hamels,PHI,Starting_Pitcher,75,175.0,23.18 812 | 811,Alfredo_Simon,PHI,Starting_Pitcher,76,170.0,25.81 813 | 812,Scott_Mathieson,PHI,Starting_Pitcher,75,190.0,23.01 814 | 813,Freddy_Garcia,PHI,Starting_Pitcher,76,240.0,31.72 815 | 814,Jamie_Moyer,PHI,Starting_Pitcher,72,175.0,44.28 816 | 815,Jon_Lieber,PHI,Starting_Pitcher,74,230.0,36.91 817 | 816,Brett_Myers,PHI,Starting_Pitcher,76,223.0,26.54 818 | 817,Adam_Eaton,PHI,Starting_Pitcher,74,196.0,29.27 819 | 818,Geoff_Geary,PHI,Relief_Pitcher,72,167.0,30.51 820 | 819,Clay_Condrey,PHI,Relief_Pitcher,75,195.0,31.28 821 | 820,Ryan_Madson,PHI,Relief_Pitcher,78,190.0,26.51 822 | 821,Antonio_Alfonseca,PHI,Relief_Pitcher,77,250.0,34.87 823 | 822,Tom_Gordon,PHI,Relief_Pitcher,70,190.0,39.28 824 | 823,Brian_Sanches,PHI,Relief_Pitcher,72,190.0,28.56 825 | 824,Jim_Ed_Warden,PHI,Relief_Pitcher,79,190.0,27.82 826 | 825,Anderson_Garcia,PHI,Relief_Pitcher,74,170.0,25.94 827 | 826,Eude_Brito,PHI,Relief_Pitcher,71,160.0,28.53 828 | 827,Fabio_Castro,PHI,Relief_Pitcher,68,150.0,22.11 829 | 828,Matt_Smith,PHI,Relief_Pitcher,77,225.0,27.71 830 | 829,Damian_Miller,MLW,Catcher,75,220.0,37.38 831 | 830,Johnny_Estrada,MLW,Catcher,71,209.0,30.67 832 | 831,Mike_Rivera,MLW,Catcher,72,210.0,30.48 833 | 832,J.D._Closser,MLW,Catcher,70,176.0,27.12 834 | 833,Prince_Fielder,MLW,First_Baseman,72,260.0,22.81 835 | 834,Rickie_Weeks,MLW,Second_Baseman,72,195.0,24.46 836 | 835,Tony_Graffanino,MLW,Second_Baseman,73,190.0,34.73 837 | 836,Craig_Counsell,MLW,Shortstop,72,184.0,36.53 838 | 837,J.J._Hardy,MLW,Shortstop,74,180.0,24.53 839 | 838,Bill_Hall,MLW,Shortstop,72,195.0,27.17 840 | 839,Vinny_Rottino,MLW,Third_Baseman,72,195.0,26.9 841 | 840,Corey_Koskie,MLW,Third_Baseman,75,219.0,33.67 842 | 841,Kevin_Mench,MLW,Outfielder,72,225.0,29.14 843 | 842,Geoff_Jenkins,MLW,Outfielder,73,212.0,32.61 844 | 843,Brady_Clark,MLW,Outfielder,74,202.0,33.87 845 | 844,Tony_Gwynn_Jr.,MLW,Outfielder,72,185.0,24.41 846 | 845,Corey_Hart,MLW,Outfielder,78,200.0,24.94 847 | 846,Gabe_Gross,MLW,Outfielder,75,209.0,27.36 848 | 847,Laynce_Nix,MLW,Outfielder,72,200.0,26.33 849 | 848,Drew_Anderson,MLW,Outfielder,74,195.0,25.72 850 | 849,Claudio_Vargas,MLW,Starting_Pitcher,75,228.0,28.7 851 | 850,Chris_Capuano,MLW,Starting_Pitcher,75,210.0,28.53 852 | 851,Ben_Hendrickson,MLW,Starting_Pitcher,76,190.0,26.07 853 | 852,Dave_Bush,MLW,Starting_Pitcher,74,212.0,27.31 854 | 853,Carlos_Villanueva,MLW,Starting_Pitcher,74,190.0,23.26 855 | 854,Ben_Sheets,MLW,Starting_Pitcher,73,218.0,28.62 856 | 855,Jeff_Suppan,MLW,Starting_Pitcher,74,220.0,32.16 857 | 856,Brian_Shouse,MLW,Relief_Pitcher,71,190.0,38.43 858 | 857,Francisco_Cordero,MLW,Relief_Pitcher,74,235.0,31.81 859 | 858,Derrick_Turnbow,MLW,Relief_Pitcher,75,210.0,29.1 860 | 859,Matt_Wise,MLW,Relief_Pitcher,76,200.0,31.28 861 | 860,Grant_Balfour,MLW,Relief_Pitcher,74,188.0,29.17 862 | 861,Dennis_Sarfate,MLW,Relief_Pitcher,76,210.0,25.89 863 | 862,Jose_Capellan,MLW,Relief_Pitcher,76,235.0,26.13 864 | 863,Greg_Aquino,MLW,Relief_Pitcher,73,188.0,29.13 865 | 864,Josh_Bard,SD,Catcher,75,215.0,28.92 866 | 865,Rob_Bowen,SD,Catcher,75,216.0,26.01 867 | 866,Adrian_Gonzalez,SD,First_Baseman,74,220.0,24.81 868 | 867,Marcus_Giles,SD,Second_Baseman,68,180.0,28.79 869 | 868,Todd_Walker,SD,Second_Baseman,72,185.0,33.77 870 | 869,Geoff_Blum,SD,Shortstop,75,200.0,33.85 871 | 870,Khalil_Greene,SD,Shortstop,71,210.0,27.36 872 | 871,Paul_McAnulty,SD,Outfielder,70,220.0,26.01 873 | 872,Terrmel_Sledge,SD,Outfielder,72,185.0,29.95 874 | 873,Jack_Cust,SD,Outfielder,73,231.0,28.12 875 | 874,Jose_Cruz_Jr.,SD,Outfielder,72,210.0,32.87 876 | 875,Russell_Branyan,SD,Outfielder,75,195.0,31.2 877 | 876,Mike_Cameron,SD,Outfielder,74,200.0,34.14 878 | 877,Brian_Giles,SD,Outfielder,70,205.0,36.11 879 | 878,Kevin_Kouzmanoff,SD,Designated_Hitter,73,200.0,25.6 880 | 879,Mike_Thompson,SD,Starting_Pitcher,76,200.0,26.31 881 | 880,Clay_Hensley,SD,Starting_Pitcher,71,190.0,27.5 882 | 881,Chris_Young,SD,Starting_Pitcher,82,250.0,27.77 883 | 882,Greg_Maddux,SD,Starting_Pitcher,72,185.0,40.88 884 | 883,Jake_Peavy,SD,Starting_Pitcher,73,180.0,25.75 885 | 884,Scott_Cassidy,SD,Relief_Pitcher,74,170.0,31.41 886 | 885,Scott_Strickland,SD,Relief_Pitcher,71,180.0,30.84 887 | 886,Scott_Linebrink,SD,Relief_Pitcher,75,208.0,30.57 888 | 887,Doug_Brocail,SD,Relief_Pitcher,77,235.0,39.79 889 | 888,Trevor_Hoffman,SD,Relief_Pitcher,72,215.0,39.38 890 | 889,Heath_Bell,SD,Relief_Pitcher,74,244.0,29.42 891 | 890,Royce_Ring,SD,Relief_Pitcher,72,220.0,26.19 892 | 891,Cla_Meredith,SD,Relief_Pitcher,73,185.0,23.74 893 | 892,Andrew_Brown,SD,Relief_Pitcher,78,230.0,26.03 894 | 893,Mike_Adams,SD,Relief_Pitcher,77,190.0,28.59 895 | 894,Justin_Hampson,SD,Relief_Pitcher,73,200.0,26.77 896 | 895,Kevin_Cameron,SD,Relief_Pitcher,73,180.0,27.21 897 | 896,Ryan_Ketchner,SD,Relief_Pitcher,73,190.0,24.87 898 | 897,Brian_Schneider,WAS,Catcher,73,196.0,30.26 899 | 898,Jesus_Flores,WAS,Catcher,73,180.0,22.34 900 | 899,Larry_Broadway,WAS,First_Baseman,76,230.0,26.2 901 | 900,Nick_Johnson,WAS,First_Baseman,75,224.0,28.45 902 | 901,Bernie_Castro,WAS,Second_Baseman,70,160.0,27.63 903 | 902,Josh_Wilson,WAS,Shortstop,73,178.0,25.93 904 | 903,Cristian_Guzman,WAS,Shortstop,72,205.0,28.94 905 | 904,Felipe_Lopez,WAS,Shortstop,73,185.0,26.8 906 | 905,Ryan_Zimmerman,WAS,Third_Baseman,75,210.0,22.42 907 | 906,Nook_Logan,WAS,Outfielder,74,180.0,27.26 908 | 907,Ryan_Church,WAS,Outfielder,73,190.0,28.38 909 | 908,Kory_Casto,WAS,Outfielder,73,200.0,25.23 910 | 909,Mike_Restovich,WAS,Outfielder,76,257.0,28.16 911 | 910,Alex_Escobar,WAS,Outfielder,73,190.0,28.48 912 | 911,Austin_Kearns,WAS,Outfielder,75,220.0,26.78 913 | 912,Chris_Snelling,WAS,Outfielder,70,165.0,25.24 914 | 913,Billy_Traber,WAS,Starting_Pitcher,77,205.0,27.45 915 | 914,Tim_Redding,WAS,Starting_Pitcher,72,200.0,29.05 916 | 915,John_Patterson,WAS,Starting_Pitcher,77,208.0,29.08 917 | 916,Shawn_Hill,WAS,Starting_Pitcher,74,185.0,25.84 918 | 917,Joel_Hanrahan,WAS,Starting_Pitcher,75,215.0,25.4 919 | 918,Mike_O'Connor,WAS,Starting_Pitcher,75,170.0,26.54 920 | 919,Emiliano_Fruto,WAS,Relief_Pitcher,75,235.0,22.73 921 | 920,Chris_Schroder,WAS,Relief_Pitcher,75,210.0,28.53 922 | 921,Brett_Campbell,WAS,Relief_Pitcher,72,170.0,25.37 923 | 922,Beltran_Perez,WAS,Relief_Pitcher,74,180.0,25.35 924 | 923,Levale_Speigner,WAS,Relief_Pitcher,71,170.0,26.43 925 | 924,Jason_Bergmann,WAS,Relief_Pitcher,76,190.0,25.43 926 | 925,Saul_Rivera,WAS,Relief_Pitcher,71,150.0,29.23 927 | 926,Chris_Booker,WAS,Relief_Pitcher,75,230.0,30.22 928 | 927,Micah_Bowie,WAS,Relief_Pitcher,76,203.0,32.3 929 | 928,Jon_Rauch,WAS,Relief_Pitcher,83,260.0,28.42 930 | 929,Jerome_Williams,WAS,Relief_Pitcher,75,246.0,25.24 931 | 930,Luis_Ayala,WAS,Relief_Pitcher,74,186.0,29.13 932 | 931,Ryan_Wagner,WAS,Relief_Pitcher,76,210.0,24.63 933 | 932,Chad_Cordero,WAS,Relief_Pitcher,72,198.0,24.95 934 | 933,Humberto_Cota,PIT,Catcher,72,210.0,28.06 935 | 934,Ronny_Paulino,PIT,Catcher,75,215.0,25.86 936 | 935,Adam_LaRoche,PIT,First_Baseman,75,180.0,27.32 937 | 936,Ryan_Doumit,PIT,First_Baseman,72,200.0,25.91 938 | 937,Brad_Eldred,PIT,First_Baseman,77,245.0,26.63 939 | 938,Jose_Castillo,PIT,Second_Baseman,73,200.0,25.95 940 | 939,Jack_Wilson,PIT,Shortstop,72,192.0,29.17 941 | 940,Freddy_Sanchez,PIT,Third_Baseman,70,192.0,29.19 942 | 941,Jason_Bay,PIT,Outfielder,74,200.0,28.44 943 | 942,Jose_Bautista,PIT,Outfielder,72,192.0,26.36 944 | 943,Xavier_Nady,PIT,Outfielder,74,205.0,28.29 945 | 944,Jody_Gerut,PIT,Outfielder,72,190.0,29.45 946 | 945,Nate_McLouth,PIT,Outfielder,71,186.0,25.34 947 | 946,Chris_Duffy,PIT,Outfielder,70,170.0,26.86 948 | 947,Rajai_Davis,PIT,Outfielder,71,197.0,26.36 949 | 948,Shane_Youman,PIT,Starting_Pitcher,76,219.0,27.39 950 | 949,Yoslan_Herrera,PIT,Starting_Pitcher,74,200.0,25.84 951 | 950,Josh_Shortslef,PIT,Starting_Pitcher,76,220.0,25.08 952 | 951,Zach_Duke,PIT,Starting_Pitcher,74,207.0,23.87 953 | 952,Paul_Maholm,PIT,Starting_Pitcher,74,225.0,24.68 954 | 953,Tom_Gorzelanny,PIT,Starting_Pitcher,74,207.0,24.64 955 | 954,Shawn_Chacon,PIT,Starting_Pitcher,75,212.0,29.19 956 | 955,Tony_Armas_Jr.,PIT,Starting_Pitcher,75,225.0,28.84 957 | 956,Ian_Snell,PIT,Starting_Pitcher,71,170.0,25.33 958 | 957,Sean_Burnett,PIT,Starting_Pitcher,71,190.0,24.45 959 | 958,John_Grabow,PIT,Relief_Pitcher,74,210.0,28.32 960 | 959,Marty_McLeary,PIT,Relief_Pitcher,77,230.0,32.34 961 | 960,Salomon_Torres,PIT,Relief_Pitcher,71,210.0,34.97 962 | 961,Damaso_Marte,PIT,Relief_Pitcher,74,200.0,32.04 963 | 962,Matt_Capps,PIT,Relief_Pitcher,75,238.0,23.49 964 | 963,Josh_Sharpless,PIT,Relief_Pitcher,77,234.0,26.09 965 | 964,Bryan_Bullington,PIT,Relief_Pitcher,76,222.0,26.41 966 | 965,Jonah_Bayliss,PIT,Relief_Pitcher,74,200.0,26.55 967 | 966,Brian_Rogers,PIT,Relief_Pitcher,76,190.0,24.62 968 | 967,Juan_Perez,PIT,Relief_Pitcher,72,170.0,28.49 969 | 968,Bengie_Molina,SF,Catcher,71,220.0,32.61 970 | 969,Eliezer_Alfonzo,SF,Catcher,72,223.0,28.06 971 | 970,Lance_Niekro,SF,First_Baseman,75,210.0,28.08 972 | 971,Mark_Sweeney,SF,First_Baseman,73,215.0,37.34 973 | 972,Ray_Durham,SF,Second_Baseman,68,196.0,35.25 974 | 973,Kevin_Frandsen,SF,Second_Baseman,72,175.0,24.77 975 | 974,Omar_Vizquel,SF,Shortstop,69,175.0,39.85 976 | 975,Rich_Aurilia,SF,Third_Baseman,73,189.0,35.49 977 | 976,Pedro_Feliz,SF,Third_Baseman,73,205.0,31.84 978 | 977,Todd_Linden,SF,Outfielder,75,210.0,26.67 979 | 978,Dave_Roberts,SF,Outfielder,70,180.0,34.75 980 | 979,Jason_Ellison,SF,Outfielder,70,180.0,28.91 981 | 980,Randy_Winn,SF,Outfielder,74,197.0,32.73 982 | 981,Ryan_Klesko,SF,Outfielder,75,220.0,35.72 983 | 982,Barry_Bonds,SF,Outfielder,74,228.0,42.6 984 | 983,Fred_Lewis,SF,Outfielder,74,190.0,26.22 985 | 984,Kelyn_Acosta,SF,Starting_Pitcher,73,204.0,21.85 986 | 985,Jonathan_Sanchez,SF,Starting_Pitcher,74,165.0,24.28 987 | 986,Matt_Cain,SF,Starting_Pitcher,75,216.0,22.41 988 | 987,Matt_Morris,SF,Starting_Pitcher,77,220.0,32.56 989 | 988,Russ_Ortiz,SF,Starting_Pitcher,73,208.0,32.74 990 | 989,Noah_Lowry,SF,Starting_Pitcher,74,210.0,26.39 991 | 990,Barry_Zito,SF,Starting_Pitcher,76,215.0,28.8 992 | 991,Vinnie_Chulk,SF,Relief_Pitcher,74,195.0,28.2 993 | 992,Kevin_Correia,SF,Relief_Pitcher,75,200.0,26.52 994 | 993,Steve_Kline,SF,Relief_Pitcher,73,215.0,34.52 995 | 994,Armando_Benitez,SF,Relief_Pitcher,76,229.0,34.32 996 | 995,Scott_Munter,SF,Relief_Pitcher,78,240.0,26.98 997 | 996,Jack_Taschner,SF,Relief_Pitcher,75,207.0,28.86 998 | 997,Brian_Wilson,SF,Relief_Pitcher,73,205.0,24.96 999 | 998,Merkin_Valdez,SF,Relief_Pitcher,77,208.0,25.3 1000 | 999,Brad_Hennessey,SF,Relief_Pitcher,74,185.0,27.06 1001 | 1000,Billy_Sadler,SF,Relief_Pitcher,72,190.0,25.44 1002 | 1001,Pat_Misch,SF,Relief_Pitcher,74,170.0,25.53 1003 | 1002,Gary_Bennett,STL,Catcher,72,208.0,34.87 1004 | 1003,Yadier_Molina,STL,Catcher,71,225.0,24.63 1005 | 1004,John_Nelson,STL,First_Baseman,73,190.0,27.99 1006 | 1005,Albert_Pujols,STL,First_Baseman,75,225.0,27.12 1007 | 1006,Adam_Kennedy,STL,Second_Baseman,73,185.0,31.14 1008 | 1007,Aaron_Miles,STL,Second_Baseman,67,180.0,30.21 1009 | 1008,David_Eckstein,STL,Shortstop,67,165.0,32.11 1010 | 1009,Scott_Rolen,STL,Third_Baseman,76,240.0,31.91 1011 | 1010,Scott_Spiezio,STL,Third_Baseman,74,220.0,34.44 1012 | 1011,Jim_Edmonds,STL,Outfielder,73,212.0,36.68 1013 | 1012,So_Taguchi,STL,Outfielder,70,163.0,37.66 1014 | 1013,Juan_Encarnacion,STL,Outfielder,75,215.0,30.98 1015 | 1014,Skip_Schumaker,STL,Outfielder,70,175.0,27.07 1016 | 1015,John_Rodriguez,STL,Outfielder,72,205.0,29.11 1017 | 1016,Chris_Duncan,STL,Outfielder,77,210.0,25.82 1018 | 1017,Adam_Wainwright,STL,Starting_Pitcher,79,205.0,25.5 1019 | 1018,Mark_Mulder,STL,Starting_Pitcher,78,208.0,29.57 1020 | 1019,Anthony_Reyes,STL,Starting_Pitcher,74,215.0,25.37 1021 | 1020,Ryan_Franklin,STL,Starting_Pitcher,75,180.0,33.99 1022 | 1021,Kip_Wells,STL,Starting_Pitcher,75,200.0,29.86 1023 | 1022,Chris_Carpenter,STL,Starting_Pitcher,78,230.0,31.84 1024 | 1023,Russ_Springer,STL,Relief_Pitcher,76,211.0,38.31 1025 | 1024,Jason_Isringhausen,STL,Relief_Pitcher,75,230.0,34.48 1026 | 1025,Ricardo_Rincon,STL,Relief_Pitcher,69,190.0,36.88 1027 | 1026,Braden_Looper,STL,Relief_Pitcher,75,220.0,32.34 1028 | 1027,Randy_Flores,STL,Relief_Pitcher,72,180.0,31.58 1029 | 1028,Josh_Hancock,STL,Relief_Pitcher,75,205.0,28.89 1030 | 1029,Brad_Thompson,STL,Relief_Pitcher,73,190.0,25.08 1031 | 1030,Tyler_Johnson,STL,Relief_Pitcher,74,180.0,25.73 1032 | 1031,Chris_Narveson,STL,Relief_Pitcher,75,205.0,25.19 1033 | 1032,Randy_Keisler,STL,Relief_Pitcher,75,190.0,31.01 1034 | 1033,Josh_Kinney,STL,Relief_Pitcher,73,195.0,27.92 1035 | -------------------------------------------------------------------------------- /mlib.py: -------------------------------------------------------------------------------- 1 | """MLOps Library""" 2 | 3 | import numpy as np 4 | import pandas as pd 5 | from sklearn.linear_model import Ridge 6 | import joblib 7 | from sklearn.preprocessing import StandardScaler 8 | from sklearn.model_selection import train_test_split 9 | import logging 10 | 11 | logging.basicConfig(level=logging.INFO) 12 | 13 | import warnings 14 | 15 | warnings.filterwarnings("ignore", category=UserWarning) 16 | 17 | 18 | def load_model(model="model.joblib"): 19 | """Grabs model from disk""" 20 | 21 | clf = joblib.load(model) 22 | return clf 23 | 24 | 25 | def data(): 26 | df = pd.read_csv("htwtmlb.csv") 27 | return df 28 | 29 | 30 | def retrain(tsize=0.1, model_name="model.joblib"): 31 | """Retrains the model 32 | 33 | See this notebook: Baseball_Predictions_Export_Model.ipynb 34 | """ 35 | df = data() 36 | y = df["Height"].values # Target 37 | y = y.reshape(-1, 1) 38 | X = df["Weight"].values # Feature(s) 39 | X = X.reshape(-1, 1) 40 | scaler = StandardScaler() 41 | X_scaler = scaler.fit(X) 42 | X = X_scaler.transform(X) 43 | y_scaler = scaler.fit(y) 44 | y = y_scaler.transform(y) 45 | X_train, X_test, y_train, y_test = train_test_split( 46 | X, y, test_size=tsize, random_state=3 47 | ) 48 | clf = Ridge() 49 | model = clf.fit(X_train, y_train) 50 | accuracy = model.score(X_test, y_test) 51 | logging.debug(f"Model Accuracy: {accuracy}") 52 | joblib.dump(model, model_name) 53 | return accuracy, model_name 54 | 55 | 56 | def format_input(x): 57 | """Takes int and converts to numpy array""" 58 | 59 | val = np.array(x) 60 | feature = val.reshape(-1, 1) 61 | return feature 62 | 63 | 64 | def scale_input(val): 65 | """Scales input to training feature values""" 66 | 67 | df = data() 68 | features = df["Weight"].values 69 | features = features.reshape(-1, 1) 70 | input_scaler = StandardScaler().fit(features) 71 | scaled_input = input_scaler.transform(val) 72 | return scaled_input 73 | 74 | 75 | def scale_target(target): 76 | """Scales Target 'y' Value""" 77 | 78 | df = data() 79 | y = df["Height"].values # Target 80 | y = y.reshape(-1, 1) # Reshape 81 | scaler = StandardScaler() 82 | y_scaler = scaler.fit(y) 83 | scaled_target = y_scaler.inverse_transform(target) 84 | return scaled_target 85 | 86 | 87 | def height_human(float_inches): 88 | """Takes float inches and converts to human height in ft/inches""" 89 | 90 | feet = int(round(float_inches / 12, 2)) # round down 91 | inches_left = round(float_inches - feet * 12) 92 | result = f"{feet} foot, {inches_left} inches" 93 | return result 94 | 95 | 96 | def human_readable_payload(predict_value): 97 | """Takes numpy array and returns back human readable dictionary""" 98 | 99 | height_inches = float(np.round(predict_value, 2)) 100 | result = { 101 | "height_inches": height_inches, 102 | "height_human_readable": height_human(height_inches), 103 | } 104 | return result 105 | 106 | 107 | def predict(weight): 108 | """Takes weight and predicts height""" 109 | 110 | clf = load_model() # loadmodel 111 | np_array_weight = format_input(weight) 112 | scaled_input_result = scale_input(np_array_weight) # scale feature input 113 | scaled_height_prediction = clf.predict(scaled_input_result) # scaled prediction 114 | height_predict = scale_target(scaled_height_prediction) 115 | payload = human_readable_payload(height_predict) 116 | predict_log_data = { 117 | "weight": weight, 118 | "scaled_input_result": scaled_input_result, 119 | "scaled_height_prediction": scaled_height_prediction, 120 | "height_predict": height_predict, 121 | "human_readable_payload": payload, 122 | } 123 | logging.debug(f"Prediction: {predict_log_data}") 124 | return payload 125 | -------------------------------------------------------------------------------- /model.joblib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahgift/Python-MLOps-Cookbook/b9ed9ccd4604aa38eb91adeb59ff8bdde60b9e5a/model.joblib -------------------------------------------------------------------------------- /predict.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PORT=8080 4 | echo "Port: $PORT" 5 | 6 | # POST method predict 7 | curl -d '{ 8 | "Weight":200 9 | }'\ 10 | -H "Content-Type: application/json" \ 11 | -X POST http://localhost:$PORT/predict -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/README.md: -------------------------------------------------------------------------------- 1 | ## Project Steps 2 | 3 | * Install SAM 4 | * `sam init` 5 | * `sam buid` 6 | * `sam local invoke -e payload.json` 7 | * `sam deploy --guided` 8 | 9 | ### Notes 10 | 11 | If building on Cloud9, probably a good idea to resize using utils/resize.sh. 12 | `utils/resize.sh 30` -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/.aws-sam/build.toml: -------------------------------------------------------------------------------- 1 | # This file is auto generated by SAM CLI build command 2 | 3 | [function_build_definitions] 4 | [function_build_definitions.be87f1c3-ceae-4db0-9f27-0a5e061b4c66] 5 | packagetype = "Image" 6 | functions = ["HelloWorldMLFunction"] 7 | 8 | [function_build_definitions.be87f1c3-ceae-4db0-9f27-0a5e061b4c66.metadata] 9 | Dockerfile = "Dockerfile" 10 | DockerContext = "./ml_hello_world" 11 | DockerTag = "python3.8-v1" 12 | 13 | [layer_build_definitions] 14 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/osx,linux,python,windows,pycharm,visualstudiocode 3 | 4 | ### Linux ### 5 | *~ 6 | 7 | # temporary files which can be created if a process still has a handle open of a deleted file 8 | .fuse_hidden* 9 | 10 | # KDE directory preferences 11 | .directory 12 | 13 | # Linux trash folder which might appear on any partition or disk 14 | .Trash-* 15 | 16 | # .nfs files are created when an open file is removed but is still being accessed 17 | .nfs* 18 | 19 | ### OSX ### 20 | *.DS_Store 21 | .AppleDouble 22 | .LSOverride 23 | 24 | # Icon must end with two \r 25 | Icon 26 | 27 | # Thumbnails 28 | ._* 29 | 30 | # Files that might appear in the root of a volume 31 | .DocumentRevisions-V100 32 | .fseventsd 33 | .Spotlight-V100 34 | .TemporaryItems 35 | .Trashes 36 | .VolumeIcon.icns 37 | .com.apple.timemachine.donotpresent 38 | 39 | # Directories potentially created on remote AFP share 40 | .AppleDB 41 | .AppleDesktop 42 | Network Trash Folder 43 | Temporary Items 44 | .apdisk 45 | 46 | ### PyCharm ### 47 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 48 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 49 | 50 | # User-specific stuff: 51 | .idea/**/workspace.xml 52 | .idea/**/tasks.xml 53 | .idea/dictionaries 54 | 55 | # Sensitive or high-churn files: 56 | .idea/**/dataSources/ 57 | .idea/**/dataSources.ids 58 | .idea/**/dataSources.xml 59 | .idea/**/dataSources.local.xml 60 | .idea/**/sqlDataSources.xml 61 | .idea/**/dynamic.xml 62 | .idea/**/uiDesigner.xml 63 | 64 | # Gradle: 65 | .idea/**/gradle.xml 66 | .idea/**/libraries 67 | 68 | # CMake 69 | cmake-build-debug/ 70 | 71 | # Mongo Explorer plugin: 72 | .idea/**/mongoSettings.xml 73 | 74 | ## File-based project format: 75 | *.iws 76 | 77 | ## Plugin-specific files: 78 | 79 | # IntelliJ 80 | /out/ 81 | 82 | # mpeltonen/sbt-idea plugin 83 | .idea_modules/ 84 | 85 | # JIRA plugin 86 | atlassian-ide-plugin.xml 87 | 88 | # Cursive Clojure plugin 89 | .idea/replstate.xml 90 | 91 | # Ruby plugin and RubyMine 92 | /.rakeTasks 93 | 94 | # Crashlytics plugin (for Android Studio and IntelliJ) 95 | com_crashlytics_export_strings.xml 96 | crashlytics.properties 97 | crashlytics-build.properties 98 | fabric.properties 99 | 100 | ### PyCharm Patch ### 101 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 102 | 103 | # *.iml 104 | # modules.xml 105 | # .idea/misc.xml 106 | # *.ipr 107 | 108 | # Sonarlint plugin 109 | .idea/sonarlint 110 | 111 | ### Python ### 112 | # Byte-compiled / optimized / DLL files 113 | __pycache__/ 114 | *.py[cod] 115 | *$py.class 116 | 117 | # C extensions 118 | *.so 119 | 120 | # Distribution / packaging 121 | .Python 122 | build/ 123 | develop-eggs/ 124 | dist/ 125 | downloads/ 126 | eggs/ 127 | .eggs/ 128 | lib/ 129 | lib64/ 130 | parts/ 131 | sdist/ 132 | var/ 133 | wheels/ 134 | *.egg-info/ 135 | .installed.cfg 136 | *.egg 137 | 138 | # PyInstaller 139 | # Usually these files are written by a python script from a template 140 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 141 | *.manifest 142 | *.spec 143 | 144 | # Installer logs 145 | pip-log.txt 146 | pip-delete-this-directory.txt 147 | 148 | # Unit test / coverage reports 149 | htmlcov/ 150 | .tox/ 151 | .coverage 152 | .coverage.* 153 | .cache 154 | .pytest_cache/ 155 | nosetests.xml 156 | coverage.xml 157 | *.cover 158 | .hypothesis/ 159 | 160 | # Translations 161 | *.mo 162 | *.pot 163 | 164 | # Flask stuff: 165 | instance/ 166 | .webassets-cache 167 | 168 | # Scrapy stuff: 169 | .scrapy 170 | 171 | # Sphinx documentation 172 | docs/_build/ 173 | 174 | # PyBuilder 175 | target/ 176 | 177 | # Jupyter Notebook 178 | .ipynb_checkpoints 179 | 180 | # pyenv 181 | .python-version 182 | 183 | # celery beat schedule file 184 | celerybeat-schedule.* 185 | 186 | # SageMath parsed files 187 | *.sage.py 188 | 189 | # Environments 190 | .env 191 | .venv 192 | env/ 193 | venv/ 194 | ENV/ 195 | env.bak/ 196 | venv.bak/ 197 | 198 | # Spyder project settings 199 | .spyderproject 200 | .spyproject 201 | 202 | # Rope project settings 203 | .ropeproject 204 | 205 | # mkdocs documentation 206 | /site 207 | 208 | # mypy 209 | .mypy_cache/ 210 | 211 | ### VisualStudioCode ### 212 | .vscode/* 213 | !.vscode/settings.json 214 | !.vscode/tasks.json 215 | !.vscode/launch.json 216 | !.vscode/extensions.json 217 | .history 218 | 219 | ### Windows ### 220 | # Windows thumbnail cache files 221 | Thumbs.db 222 | ehthumbs.db 223 | ehthumbs_vista.db 224 | 225 | # Folder config file 226 | Desktop.ini 227 | 228 | # Recycle Bin used on file shares 229 | $RECYCLE.BIN/ 230 | 231 | # Windows Installer files 232 | *.cab 233 | *.msi 234 | *.msm 235 | *.msp 236 | 237 | # Windows shortcuts 238 | *.lnk 239 | 240 | # Build folder 241 | 242 | */build/* 243 | 244 | # End of https://www.gitignore.io/api/osx,linux,python,windows,pycharm,visualstudiocode -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/README.md: -------------------------------------------------------------------------------- 1 | # sam-ml-predict 2 | 3 | This project contains source code and supporting files for a serverless application that you can deploy with the SAM CLI. It includes the following files and folders. 4 | 5 | - hello_world - Code for the application's Lambda function and Project Dockerfile. 6 | - events - Invocation events that you can use to invoke the function. 7 | - tests - Unit tests for the application code. 8 | - template.yaml - A template that defines the application's AWS resources. 9 | 10 | The application uses several AWS resources, including Lambda functions and an API Gateway API. These resources are defined in the `template.yaml` file in this project. You can update the template to add AWS resources through the same deployment process that updates your application code. 11 | 12 | ## Deploy the sample application 13 | 14 | The Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for building and testing Lambda applications. It uses Docker to run your functions in an Amazon Linux environment that matches Lambda. It can also emulate your application's build environment and API. 15 | 16 | To use the SAM CLI, you need the following tools. 17 | 18 | * SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) 19 | * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) 20 | 21 | You may need the following for local testing. 22 | * [Python 3 installed](https://www.python.org/downloads/) 23 | 24 | To build and deploy your application for the first time, run the following in your shell: 25 | 26 | ```bash 27 | sam build 28 | sam deploy --guided 29 | ``` 30 | 31 | The first command will build a docker image from a Dockerfile and then copy the source of your application inside the Docker image. The second command will package and deploy your application to AWS, with a series of prompts: 32 | 33 | * **Stack Name**: The name of the stack to deploy to CloudFormation. This should be unique to your account and region, and a good starting point would be something matching your project name. 34 | * **AWS Region**: The AWS region you want to deploy your app to. 35 | * **Confirm changes before deploy**: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes. 36 | * **Allow SAM CLI IAM role creation**: Many AWS SAM templates, including this example, create AWS IAM roles required for the AWS Lambda function(s) included to access AWS services. By default, these are scoped down to minimum required permissions. To deploy an AWS CloudFormation stack which creates or modified IAM roles, the `CAPABILITY_IAM` value for `capabilities` must be provided. If permission isn't provided through this prompt, to deploy this example you must explicitly pass `--capabilities CAPABILITY_IAM` to the `sam deploy` command. 37 | * **Save arguments to samconfig.toml**: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run `sam deploy` without parameters to deploy changes to your application. 38 | 39 | You can find your API Gateway Endpoint URL in the output values displayed after deployment. 40 | 41 | ## Use the SAM CLI to build and test locally 42 | 43 | Build your application with the `sam build` command. 44 | 45 | ```bash 46 | sam-ml-predict$ sam build 47 | ``` 48 | 49 | The SAM CLI builds a docker image from a Dockerfile and then installs dependencies defined in `hello_world/requirements.txt` inside the docker image. The processed template file is saved in the `.aws-sam/build` folder. 50 | 51 | Test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the `events` folder in this project. 52 | 53 | Run functions locally and invoke them with the `sam local invoke` command. 54 | 55 | ```bash 56 | sam-ml-predict$ sam local invoke HelloWorldMLFunction --event events/event.json 57 | ``` 58 | 59 | The SAM CLI can also emulate your application's API. Use the `sam local start-api` to run the API locally on port 3000. 60 | 61 | ```bash 62 | sam-ml-predict$ sam local start-api 63 | sam-ml-predict$ curl http://localhost:3000/ 64 | ``` 65 | 66 | The SAM CLI reads the application template to determine the API's routes and the functions that they invoke. The `Events` property on each function's definition includes the route and method for each path. 67 | 68 | ```yaml 69 | Events: 70 | HelloWorld: 71 | Type: Api 72 | Properties: 73 | Path: /hello 74 | Method: get 75 | ``` 76 | 77 | ## Add a resource to your application 78 | The application template uses AWS Serverless Application Model (AWS SAM) to define application resources. AWS SAM is an extension of AWS CloudFormation with a simpler syntax for configuring common serverless application resources such as functions, triggers, and APIs. For resources not included in [the SAM specification](https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md), you can use standard [AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) resource types. 79 | 80 | ## Fetch, tail, and filter Lambda function logs 81 | 82 | To simplify troubleshooting, SAM CLI has a command called `sam logs`. `sam logs` lets you fetch logs generated by your deployed Lambda function from the command line. In addition to printing the logs on the terminal, this command has several nifty features to help you quickly find the bug. 83 | 84 | `NOTE`: This command works for all AWS Lambda functions; not just the ones you deploy using SAM. 85 | 86 | ```bash 87 | sam-ml-predict$ sam logs -n HelloWorldFunction --stack-name sam-ml-predict --tail 88 | ``` 89 | 90 | You can find more information and examples about filtering Lambda function logs in the [SAM CLI Documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-logging.html). 91 | 92 | ## Unit tests 93 | 94 | Tests are defined in the `tests` folder in this project. Use PIP to install the [pytest](https://docs.pytest.org/en/latest/) and run unit tests from your local machine. 95 | 96 | ```bash 97 | sam-ml-predict$ pip install pytest pytest-mock --user 98 | sam-ml-predict$ python -m pytest tests/ -v 99 | ``` 100 | 101 | ## Cleanup 102 | 103 | To delete the sample application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following: 104 | 105 | ```bash 106 | aws cloudformation delete-stack --stack-name sam-ml-predict 107 | ``` 108 | 109 | ## Resources 110 | 111 | See the [AWS SAM developer guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) for an introduction to SAM specification, the SAM CLI, and serverless application concepts. 112 | 113 | Next, you can use AWS Serverless Application Repository to deploy ready to use Apps that go beyond hello world samples and learn how authors developed their applications: [AWS Serverless Application Repository main page](https://aws.amazon.com/serverless/serverlessrepo/) 114 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahgift/Python-MLOps-Cookbook/b9ed9ccd4604aa38eb91adeb59ff8bdde60b9e5a/recipes/aws-lambda-sam/sam-ml-predict/__init__.py -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/events/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "body": "{\"message\": \"hello world\"}", 3 | "resource": "/{proxy+}", 4 | "path": "/path/to/resource", 5 | "httpMethod": "POST", 6 | "isBase64Encoded": false, 7 | "queryStringParameters": { 8 | "foo": "bar" 9 | }, 10 | "pathParameters": { 11 | "proxy": "/path/to/resource" 12 | }, 13 | "stageVariables": { 14 | "baz": "qux" 15 | }, 16 | "headers": { 17 | "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", 18 | "Accept-Encoding": "gzip, deflate, sdch", 19 | "Accept-Language": "en-US,en;q=0.8", 20 | "Cache-Control": "max-age=0", 21 | "CloudFront-Forwarded-Proto": "https", 22 | "CloudFront-Is-Desktop-Viewer": "true", 23 | "CloudFront-Is-Mobile-Viewer": "false", 24 | "CloudFront-Is-SmartTV-Viewer": "false", 25 | "CloudFront-Is-Tablet-Viewer": "false", 26 | "CloudFront-Viewer-Country": "US", 27 | "Host": "1234567890.execute-api.us-east-1.amazonaws.com", 28 | "Upgrade-Insecure-Requests": "1", 29 | "User-Agent": "Custom User Agent String", 30 | "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", 31 | "X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==", 32 | "X-Forwarded-For": "127.0.0.1, 127.0.0.2", 33 | "X-Forwarded-Port": "443", 34 | "X-Forwarded-Proto": "https" 35 | }, 36 | "requestContext": { 37 | "accountId": "123456789012", 38 | "resourceId": "123456", 39 | "stage": "prod", 40 | "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", 41 | "requestTime": "09/Apr/2015:12:34:56 +0000", 42 | "requestTimeEpoch": 1428582896000, 43 | "identity": { 44 | "cognitoIdentityPoolId": null, 45 | "accountId": null, 46 | "cognitoIdentityId": null, 47 | "caller": null, 48 | "accessKey": null, 49 | "sourceIp": "127.0.0.1", 50 | "cognitoAuthenticationType": null, 51 | "cognitoAuthenticationProvider": null, 52 | "userArn": null, 53 | "userAgent": "Custom User Agent String", 54 | "user": null 55 | }, 56 | "path": "/prod/path/to/resource", 57 | "resourcePath": "/{proxy+}", 58 | "httpMethod": "POST", 59 | "apiId": "1234567890", 60 | "protocol": "HTTP/1.1" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM public.ecr.aws/lambda/python:3.8 2 | 3 | COPY model.joblib mlib.py htwtmlb.csv app.py requirements.txt ./ 4 | 5 | RUN python3.8 -m pip install -r requirements.txt -t . 6 | 7 | # Command can be overwritten by providing a different command in the template directly. 8 | CMD ["app.lambda_handler"] 9 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahgift/Python-MLOps-Cookbook/b9ed9ccd4604aa38eb91adeb59ff8bdde60b9e5a/recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/__init__.py -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/app.py: -------------------------------------------------------------------------------- 1 | import json 2 | import mlib 3 | 4 | 5 | def lambda_handler(event, context): 6 | """Sample pure Lambda function""" 7 | 8 | #Toggle Between Lambda function calls and API Gateway Requests 9 | print(f"RAW LAMBDA EVENT BODY: {event}") 10 | if 'body' in event: 11 | event = json.loads(event["body"]) 12 | print("API Gateway Request event") 13 | else: 14 | print("Function Request") 15 | 16 | #If the payload is correct predict it 17 | if event and "Weight" in event: 18 | weight = event["Weight"] 19 | prediction = mlib.predict(weight) 20 | print(f"Prediction: {prediction}") 21 | return { 22 | "statusCode": 200, 23 | "body": json.dumps(prediction), 24 | } 25 | else: 26 | payload = {"Message": "Incorrect or Empty Payload"} 27 | return { 28 | "statusCode": 200, 29 | "body": json.dumps(payload), 30 | } 31 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/htwtmlb.csv: -------------------------------------------------------------------------------- 1 | ,Name,Team,Position,Height,Weight,Age 2 | 0,Adam_Donachie,BAL,Catcher,74,180.0,22.99 3 | 1,Paul_Bako,BAL,Catcher,74,215.0,34.69 4 | 2,Ramon_Hernandez,BAL,Catcher,72,210.0,30.78 5 | 3,Kevin_Millar,BAL,First_Baseman,72,210.0,35.43 6 | 4,Chris_Gomez,BAL,First_Baseman,73,188.0,35.71 7 | 5,Brian_Roberts,BAL,Second_Baseman,69,176.0,29.39 8 | 6,Miguel_Tejada,BAL,Shortstop,69,209.0,30.77 9 | 7,Melvin_Mora,BAL,Third_Baseman,71,200.0,35.07 10 | 8,Aubrey_Huff,BAL,Third_Baseman,76,231.0,30.19 11 | 9,Adam_Stern,BAL,Outfielder,71,180.0,27.05 12 | 10,Jeff_Fiorentino,BAL,Outfielder,73,188.0,23.88 13 | 11,Freddie_Bynum,BAL,Outfielder,73,180.0,26.96 14 | 12,Nick_Markakis,BAL,Outfielder,74,185.0,23.29 15 | 13,Brandon_Fahey,BAL,Outfielder,74,160.0,26.11 16 | 14,Corey_Patterson,BAL,Outfielder,69,180.0,27.55 17 | 15,Jay_Payton,BAL,Outfielder,70,185.0,34.27 18 | 16,Jay_Gibbons,BAL,Designated_Hitter,72,197.0,30.0 19 | 17,Erik_Bedard,BAL,Starting_Pitcher,73,189.0,27.99 20 | 18,Hayden_Penn,BAL,Starting_Pitcher,75,185.0,22.38 21 | 19,Adam_Loewen,BAL,Starting_Pitcher,78,219.0,22.89 22 | 20,Daniel_Cabrera,BAL,Starting_Pitcher,79,230.0,25.76 23 | 21,Steve_Trachsel,BAL,Starting_Pitcher,76,205.0,36.33 24 | 22,Jaret_Wright,BAL,Starting_Pitcher,74,230.0,31.17 25 | 23,Kris_Benson,BAL,Starting_Pitcher,76,195.0,32.31 26 | 24,Scott_Williamson,BAL,Relief_Pitcher,72,180.0,31.03 27 | 25,John_Parrish,BAL,Relief_Pitcher,71,192.0,29.26 28 | 26,Danys_Baez,BAL,Relief_Pitcher,75,225.0,29.47 29 | 27,Chad_Bradford,BAL,Relief_Pitcher,77,203.0,32.46 30 | 28,Jamie_Walker,BAL,Relief_Pitcher,74,195.0,35.67 31 | 29,Brian_Burres,BAL,Relief_Pitcher,73,182.0,25.89 32 | 30,Kurt_Birkins,BAL,Relief_Pitcher,74,188.0,26.55 33 | 31,James_Hoey,BAL,Relief_Pitcher,78,200.0,24.17 34 | 32,Sendy_Rleal,BAL,Relief_Pitcher,73,180.0,26.69 35 | 33,Chris_Ray,BAL,Relief_Pitcher,75,200.0,25.13 36 | 34,Jeremy_Guthrie,BAL,Relief_Pitcher,73,200.0,27.9 37 | 35,A.J._Pierzynski,CWS,Catcher,75,245.0,30.17 38 | 36,Toby_Hall,CWS,Catcher,75,240.0,31.36 39 | 37,Paul_Konerko,CWS,First_Baseman,74,215.0,30.99 40 | 38,Tadahito_Iguchi,CWS,Second_Baseman,69,185.0,32.24 41 | 39,Juan_Uribe,CWS,Shortstop,71,175.0,27.61 42 | 40,Alex_Cintron,CWS,Shortstop,74,199.0,28.2 43 | 41,Joe_Crede,CWS,Third_Baseman,73,200.0,28.85 44 | 42,Josh_Fields,CWS,Third_Baseman,73,215.0,24.21 45 | 43,Ryan_Sweeney,CWS,Outfielder,76,200.0,22.02 46 | 44,Brian_N._Anderson,CWS,Outfielder,74,205.0,24.97 47 | 45,Luis_Terrero,CWS,Outfielder,74,206.0,26.78 48 | 46,Pablo_Ozuna,CWS,Outfielder,70,186.0,32.51 49 | 47,Scott_Podsednik,CWS,Outfielder,72,188.0,30.95 50 | 48,Jermaine_Dye,CWS,Outfielder,77,220.0,33.09 51 | 49,Darin_Erstad,CWS,Outfielder,74,210.0,32.74 52 | 50,Rob_Mackowiak,CWS,Outfielder,70,195.0,30.69 53 | 51,Jim_Thome,CWS,Designated_Hitter,76,244.0,36.51 54 | 52,Jerry_Owens,CWS,Designated_Hitter,75,195.0,26.03 55 | 53,Charlie_Haeger,CWS,Starting_Pitcher,73,200.0,23.45 56 | 54,Heath_Phillips,CWS,Starting_Pitcher,75,200.0,24.94 57 | 55,Gavin_Floyd,CWS,Starting_Pitcher,76,212.0,24.09 58 | 56,Jose_Contreras,CWS,Starting_Pitcher,76,224.0,35.23 59 | 57,Jon_Garland,CWS,Starting_Pitcher,78,210.0,27.43 60 | 58,Javier_Vazquez,CWS,Starting_Pitcher,74,205.0,30.6 61 | 59,Mark_Buehrle,CWS,Starting_Pitcher,74,220.0,27.94 62 | 60,Mike_MacDougal,CWS,Relief_Pitcher,76,195.0,29.99 63 | 61,David_Aardsma,CWS,Relief_Pitcher,77,200.0,25.17 64 | 62,Andrew_Sisco,CWS,Relief_Pitcher,81,260.0,24.13 65 | 63,Matt_Thornton,CWS,Relief_Pitcher,78,228.0,30.46 66 | 64,Bobby_Jenks,CWS,Relief_Pitcher,75,270.0,25.96 67 | 65,Boone_Logan,CWS,Relief_Pitcher,77,200.0,22.55 68 | 66,Sean_Tracey,CWS,Relief_Pitcher,75,210.0,26.29 69 | 67,Nick_Masset,CWS,Relief_Pitcher,76,190.0,24.79 70 | 68,Jose_Molina,ANA,Catcher,74,220.0,31.74 71 | 69,Jeff_Mathis,ANA,Catcher,72,180.0,23.92 72 | 70,Mike_Napoli,ANA,Catcher,72,205.0,25.33 73 | 71,Casey_Kotchman,ANA,First_Baseman,75,210.0,24.02 74 | 72,Kendry_Morales,ANA,First_Baseman,73,220.0,23.7 75 | 73,Shea_Hillenbrand,ANA,First_Baseman,73,211.0,31.59 76 | 74,Robb_Quinlan,ANA,First_Baseman,73,200.0,29.95 77 | 75,Howie_Kendrick,ANA,First_Baseman,70,180.0,23.64 78 | 76,Orlando_Cabrera,ANA,Shortstop,70,190.0,32.33 79 | 77,Erick_Aybar,ANA,Shortstop,70,170.0,23.13 80 | 78,Dallas_McPherson,ANA,Third_Baseman,76,230.0,26.6 81 | 79,Maicer_Izturis,ANA,Third_Baseman,68,155.0,26.46 82 | 80,Reggie_Willits,ANA,Outfielder,71,185.0,25.75 83 | 81,Tommy_Murphy,ANA,Outfielder,72,185.0,27.51 84 | 82,Terry_Evans,ANA,Outfielder,75,200.0,25.11 85 | 83,Gary_Matthews_Jr.,ANA,Outfielder,75,225.0,32.51 86 | 84,Garret_Anderson,ANA,Outfielder,75,225.0,34.67 87 | 85,Vladimir_Guerrero,ANA,Outfielder,75,220.0,31.06 88 | 86,Chone_Figgins,ANA,Outfielder,68,160.0,29.1 89 | 87,Juan_Rivera,ANA,Outfielder,74,205.0,28.66 90 | 88,John_Lackey,ANA,Starting_Pitcher,78,235.0,28.35 91 | 89,Bartolo_Colon,ANA,Starting_Pitcher,71,250.0,33.77 92 | 90,Kelvim_Escobar,ANA,Starting_Pitcher,73,210.0,30.89 93 | 91,Dustin_Moseley,ANA,Starting_Pitcher,76,190.0,37.74 94 | 92,Ervin_Santana,ANA,Starting_Pitcher,74,160.0,24.14 95 | 93,Joe_Saunders,ANA,Starting_Pitcher,74,200.0,25.71 96 | 94,Jered_Weaver,ANA,Starting_Pitcher,79,205.0,24.41 97 | 95,Chris_Resop,ANA,Relief_Pitcher,75,222.0,24.32 98 | 96,Phil_Seibel,ANA,Relief_Pitcher,73,195.0,28.09 99 | 97,Justin_Speier,ANA,Relief_Pitcher,76,205.0,33.31 100 | 98,Darren_Oliver,ANA,Relief_Pitcher,74,220.0,36.4 101 | 99,Hector_Carrasco,ANA,Relief_Pitcher,74,220.0,37.36 102 | 100,Scot_Shields,ANA,Relief_Pitcher,73,170.0,31.61 103 | 101,Francisco_Rodriguez,ANA,Relief_Pitcher,72,185.0,25.14 104 | 102,Greg_Jones,ANA,Relief_Pitcher,74,195.0,30.29 105 | 103,Doug_Mirabelli,BOS,Catcher,73,220.0,36.37 106 | 104,Jason_Varitek,BOS,Catcher,74,230.0,34.89 107 | 105,George_Kottaras,BOS,Catcher,72,180.0,23.79 108 | 106,Kevin_Youkilis,BOS,First_Baseman,73,220.0,27.96 109 | 107,Dustin_Pedroia,BOS,Second_Baseman,69,180.0,23.54 110 | 108,Alex_Cora,BOS,Shortstop,72,180.0,31.37 111 | 109,Julio_Lugo,BOS,Shortstop,73,170.0,31.29 112 | 110,Mike_Lowell,BOS,Third_Baseman,75,210.0,33.01 113 | 111,Wily_Mo_Pe?a,BOS,Outfielder,75,215.0,25.1 114 | 112,J.D._Drew,BOS,Outfielder,73,200.0,31.28 115 | 113,Manny_Ramirez,BOS,Outfielder,72,213.0,34.75 116 | 114,Brandon_Moss,BOS,Outfielder,72,180.0,23.46 117 | 115,David_Murphy,BOS,Outfielder,76,192.0,25.37 118 | 116,Eric_Hinske,BOS,Outfielder,74,235.0,29.57 119 | 117,Coco_Crisp,BOS,Outfielder,72,185.0,27.33 120 | 118,David_Ortiz,BOS,Designated_Hitter,76,230.0,31.28 121 | 119,Curt_Schilling,BOS,Starting_Pitcher,77,235.0,40.29 122 | 120,Tim_Wakefield,BOS,Starting_Pitcher,74,210.0,40.58 123 | 121,Josh_Beckett,BOS,Starting_Pitcher,77,222.0,26.79 124 | 122,Matt_Clement,BOS,Starting_Pitcher,75,210.0,32.55 125 | 123,Jonathan_Papelbon,BOS,Starting_Pitcher,76,230.0,26.27 126 | 124,Kyle_Snyder,BOS,Starting_Pitcher,80,220.0,29.47 127 | 125,Devern_Hansack,BOS,Starting_Pitcher,74,180.0,29.07 128 | 126,Jon_Lester,BOS,Starting_Pitcher,74,190.0,23.15 129 | 127,Kason_Gabbard,BOS,Starting_Pitcher,75,200.0,24.9 130 | 128,Craig_Hansen,BOS,Relief_Pitcher,78,210.0,23.29 131 | 129,Hideki_Okajima,BOS,Relief_Pitcher,73,194.0,31.18 132 | 130,Craig_Breslow,BOS,Relief_Pitcher,73,180.0,26.56 133 | 131,Manny_Delcarmen,BOS,Relief_Pitcher,74,190.0,25.03 134 | 132,Brendan_Donnelly,BOS,Relief_Pitcher,75,240.0,35.66 135 | 133,Javier_Lopez,BOS,Relief_Pitcher,76,200.0,29.64 136 | 134,J.C._Romero,BOS,Relief_Pitcher,71,198.0,30.74 137 | 135,Joel_Pineiro,BOS,Relief_Pitcher,73,200.0,28.43 138 | 136,Julian_Tavarez,BOS,Relief_Pitcher,74,195.0,33.77 139 | 137,Mike_Timlin,BOS,Relief_Pitcher,76,210.0,40.97 140 | 138,Nick_DeBarr,BOS,Relief_Pitcher,76,220.0,23.52 141 | 139,Victor_Martinez,CLE,Catcher,74,190.0,28.19 142 | 140,Kelly_Shoppach,CLE,Catcher,73,210.0,26.84 143 | 141,Ryan_Garko,CLE,First_Baseman,74,225.0,26.16 144 | 142,Joe_Inglett,CLE,Second_Baseman,70,180.0,28.67 145 | 143,Josh_Barfield,CLE,Second_Baseman,72,185.0,24.2 146 | 144,Hector_Luna,CLE,Second_Baseman,73,170.0,27.08 147 | 145,Jhonny_Peralta,CLE,Shortstop,73,185.0,24.76 148 | 146,Andy_Marte,CLE,Third_Baseman,73,185.0,23.36 149 | 147,Ben_Francisco,CLE,Outfielder,73,180.0,25.35 150 | 148,Shin-Soo_Choo,CLE,Outfielder,71,178.0,24.63 151 | 149,Franklin_Gutierrez,CLE,Outfielder,74,175.0,24.02 152 | 150,Grady_Sizemore,CLE,Outfielder,74,200.0,24.58 153 | 151,Jason_Michaels,CLE,Outfielder,72,204.0,30.82 154 | 152,Trot_Nixon,CLE,Outfielder,74,211.0,32.89 155 | 153,David_Dellucci,CLE,Outfielder,71,190.0,33.33 156 | 154,Casey_Blake,CLE,Outfielder,74,210.0,33.52 157 | 155,Travis_Hafner,CLE,Designated_Hitter,75,240.0,29.74 158 | 156,Paul_Byrd,CLE,Starting_Pitcher,73,190.0,36.24 159 | 157,Cliff_Lee,CLE,Starting_Pitcher,75,190.0,28.5 160 | 158,Jake_Westbrook,CLE,Starting_Pitcher,75,185.0,29.42 161 | 159,C.C._Sabathia,CLE,Starting_Pitcher,79,290.0,26.61 162 | 160,Jeremy_Sowers,CLE,Starting_Pitcher,73,175.0,23.79 163 | 161,Rafael_Perez,CLE,Relief_Pitcher,75,185.0,24.96 164 | 162,Brian_Slocum,CLE,Relief_Pitcher,76,200.0,25.93 165 | 163,Edward_Mujica,CLE,Relief_Pitcher,74,220.0,22.81 166 | 164,Fernando_Cabrera,CLE,Relief_Pitcher,76,170.0,25.29 167 | 165,Tom_Mastny,CLE,Relief_Pitcher,78,220.0,26.07 168 | 166,Juan_Lara,CLE,Relief_Pitcher,74,190.0,26.09 169 | 167,Fausto_Carmona,CLE,Relief_Pitcher,76,220.0,23.23 170 | 168,Aaron_Fultz,CLE,Relief_Pitcher,72,205.0,33.49 171 | 169,Rafael_Betancourt,CLE,Relief_Pitcher,74,200.0,31.84 172 | 170,Roberto_Hernandez,CLE,Relief_Pitcher,76,250.0,42.3 173 | 171,Joe_Borowski,CLE,Relief_Pitcher,74,225.0,35.82 174 | 172,Matt_Miller,CLE,Relief_Pitcher,75,215.0,35.27 175 | 173,Jason_Davis,CLE,Relief_Pitcher,78,210.0,26.81 176 | 174,Mike_Piazza,OAK,Catcher,75,215.0,38.49 177 | 175,Jason_Kendall,OAK,Catcher,72,195.0,32.68 178 | 176,Adam_Melhuse,OAK,Catcher,74,200.0,34.93 179 | 177,Nick_Swisher,OAK,First_Baseman,72,194.0,26.26 180 | 178,Dan_Johnson,OAK,First_Baseman,74,220.0,27.56 181 | 179,Donald_Murphy,OAK,Second_Baseman,70,180.0,23.98 182 | 180,Mark_Ellis,OAK,Second_Baseman,71,180.0,29.73 183 | 181,Marco_Scutaro,OAK,Shortstop,70,170.0,31.33 184 | 182,Bobby_Crosby,OAK,Shortstop,75,195.0,27.13 185 | 183,Mark_Kiger,OAK,Shortstop,71,180.0,26.75 186 | 184,Antonio_Perez,OAK,Third_Baseman,71,170.0,27.09 187 | 185,Eric_Chavez,OAK,Third_Baseman,73,206.0,29.23 188 | 186,Milton_Bradley,OAK,Outfielder,72,205.0,28.88 189 | 187,Shannon_Stewart,OAK,Outfielder,71,200.0,33.01 190 | 188,Bobby_Kielty,OAK,Outfielder,73,225.0,30.57 191 | 189,Mark_Kotsay,OAK,Outfielder,72,201.0,31.24 192 | 190,Ryan_Goleski,OAK,Outfielder,75,225.0,24.95 193 | 191,Jeremy_Brown,OAK,Designated_Hitter,70,226.0,27.35 194 | 192,Jason_Windsor,OAK,Starting_Pitcher,74,233.0,24.62 195 | 193,David_Shafer,OAK,Starting_Pitcher,74,180.0,24.98 196 | 194,Joe_Blanton,OAK,Starting_Pitcher,75,225.0,26.22 197 | 195,Brad_Halsey,OAK,Starting_Pitcher,73,180.0,26.04 198 | 196,Dan_Haren,OAK,Starting_Pitcher,77,220.0,26.45 199 | 197,Rich_Harden,OAK,Starting_Pitcher,73,180.0,25.25 200 | 198,Joe_Kennedy,OAK,Starting_Pitcher,76,237.0,27.77 201 | 199,Esteban_Loaiza,OAK,Starting_Pitcher,75,215.0,35.16 202 | 200,Alan_Embree,OAK,Relief_Pitcher,74,190.0,37.1 203 | 201,Jay_Witasick,OAK,Relief_Pitcher,76,235.0,34.51 204 | 202,Justin_Duchscherer,OAK,Relief_Pitcher,75,190.0,29.28 205 | 203,Kiko_Calero,OAK,Relief_Pitcher,73,180.0,32.14 206 | 204,Chad_Gaudin,OAK,Relief_Pitcher,71,165.0,23.94 207 | 205,Lenny_DiNardo,OAK,Relief_Pitcher,76,195.0,27.45 208 | 206,Scott_Dunn,OAK,Relief_Pitcher,75,200.0,28.77 209 | 207,Huston_Street,OAK,Relief_Pitcher,72,190.0,23.58 210 | 208,Ron_Flores,OAK,Relief_Pitcher,71,190.0,27.56 211 | 209,Jay_Marshall,OAK,Relief_Pitcher,77,185.0,24.01 212 | 210,Marcus_McBeth,OAK,Relief_Pitcher,73,185.0,26.52 213 | 211,Jorge_Posada,NYY,Catcher,74,205.0,35.54 214 | 212,Wil_Nieves,NYY,Catcher,71,190.0,29.43 215 | 213,Andy_Phillips,NYY,First_Baseman,72,205.0,29.9 216 | 214,Doug_Mientkiewicz,NYY,First_Baseman,74,206.0,32.7 217 | 215,Josh_Phelps,NYY,First_Baseman,75,220.0,28.8 218 | 216,Miguel_Cairo,NYY,Second_Baseman,73,208.0,32.82 219 | 217,Robinson_Cano,NYY,Second_Baseman,72,170.0,24.36 220 | 218,Derek_Jeter,NYY,Shortstop,75,195.0,32.68 221 | 219,Alex_Rodriguez,NYY,Third_Baseman,75,210.0,31.59 222 | 220,Johnny_Damon,NYY,Outfielder,74,190.0,33.32 223 | 221,Bobby_Abreu,NYY,Outfielder,72,211.0,32.97 224 | 222,Hideki_Matsui,NYY,Outfielder,74,230.0,32.72 225 | 223,Melky_Cabrera,NYY,Outfielder,71,170.0,22.55 226 | 224,Kevin_Thompson,NYY,Outfielder,70,185.0,27.45 227 | 225,Jason_Giambi,NYY,Designated_Hitter,75,230.0,36.14 228 | 226,Mike_Mussina,NYY,Starting_Pitcher,74,185.0,38.23 229 | 227,Carl_Pavano,NYY,Starting_Pitcher,77,241.0,31.14 230 | 228,Andy_Pettitte,NYY,Starting_Pitcher,77,225.0,34.71 231 | 229,Darrell_Rasner,NYY,Starting_Pitcher,75,210.0,26.13 232 | 230,Jeff_Karstens,NYY,Starting_Pitcher,75,175.0,24.43 233 | 231,Humberto_Sanchez,NYY,Starting_Pitcher,78,230.0,23.76 234 | 232,Chien-Ming_Wang,NYY,Starting_Pitcher,75,200.0,26.92 235 | 233,Sean_Henn,NYY,Relief_Pitcher,76,215.0,25.85 236 | 234,Scott_Proctor,NYY,Relief_Pitcher,73,198.0,30.16 237 | 235,Brian_Bruney,NYY,Relief_Pitcher,75,226.0,25.03 238 | 236,Chris_Britton,NYY,Relief_Pitcher,75,278.0,24.21 239 | 237,T.J._Beam,NYY,Relief_Pitcher,79,215.0,26.51 240 | 238,Jose_Veras,NYY,Relief_Pitcher,77,230.0,26.36 241 | 239,Kyle_Farnsworth,NYY,Relief_Pitcher,76,240.0,30.88 242 | 240,Luis_Vizcaino,NYY,Relief_Pitcher,71,184.0,32.57 243 | 241,Mike_Myers,NYY,Relief_Pitcher,75,219.0,37.68 244 | 242,Mariano_Rivera,NYY,Relief_Pitcher,74,170.0,37.25 245 | 243,Ivan_Rodriguez,DET,Catcher,69,218.0,35.25 246 | 244,Vance_Wilson,DET,Catcher,71,190.0,33.95 247 | 245,Sean_Casey,DET,First_Baseman,76,225.0,32.66 248 | 246,Chris_Shelton,DET,First_Baseman,72,220.0,26.68 249 | 247,Omar_Infante,DET,Second_Baseman,72,176.0,25.18 250 | 248,Placido_Polanco,DET,Second_Baseman,70,190.0,31.39 251 | 249,Neifi_Perez,DET,Second_Baseman,72,197.0,33.74 252 | 250,Carlos_Guillen,DET,Shortstop,73,204.0,31.42 253 | 251,Ramon_Santiago,DET,Shortstop,71,167.0,27.5 254 | 252,Tony_Giarratano,DET,Shortstop,72,180.0,24.25 255 | 253,Brandon_Inge,DET,Third_Baseman,71,195.0,29.78 256 | 254,Craig_Monroe,DET,Outfielder,73,220.0,30.0 257 | 255,Magglio_Ordo?ez,DET,Outfielder,72,215.0,33.09 258 | 256,Curtis_Granderson,DET,Outfielder,73,185.0,25.96 259 | 257,Brent_Clevlen,DET,Outfielder,74,190.0,23.34 260 | 258,Marcus_Thames,DET,Outfielder,74,205.0,29.98 261 | 259,Gary_Sheffield,DET,Outfielder,72,205.0,38.28 262 | 260,Mike_Rabelo,DET,Designated_Hitter,73,200.0,27.12 263 | 261,Zach_Miner,DET,Starting_Pitcher,75,200.0,24.97 264 | 262,Jeremy_Bonderman,DET,Starting_Pitcher,74,210.0,24.34 265 | 263,Nate_Robertson,DET,Starting_Pitcher,74,215.0,29.49 266 | 264,Justin_Verlander,DET,Starting_Pitcher,77,200.0,24.02 267 | 265,Virgil_Vasquez,DET,Starting_Pitcher,75,205.0,24.73 268 | 266,Kenny_Rogers,DET,Starting_Pitcher,73,211.0,42.3 269 | 267,Mike_Maroth,DET,Starting_Pitcher,72,190.0,29.54 270 | 268,Fernando_Rodney,DET,Relief_Pitcher,71,208.0,29.95 271 | 269,Chad_Durbin,DET,Relief_Pitcher,74,200.0,29.24 272 | 270,Jason_Grilli,DET,Relief_Pitcher,77,210.0,30.3 273 | 271,Jose_Mesa,DET,Relief_Pitcher,75,232.0,40.77 274 | 272,Todd_Jones,DET,Relief_Pitcher,75,230.0,38.85 275 | 273,Joel_Zumaya,DET,Relief_Pitcher,75,210.0,22.31 276 | 274,Jordan_Tata,DET,Relief_Pitcher,78,220.0,25.44 277 | 275,Andrew_Miller,DET,Relief_Pitcher,78,210.0,21.78 278 | 276,Yorman_Bazardo,DET,Relief_Pitcher,74,202.0,22.64 279 | 277,Wilfredo_Ledezma,DET,Relief_Pitcher,76,212.0,26.11 280 | 278,Roman_Colon,DET,Relief_Pitcher,78,225.0,27.55 281 | 279,Edward_Campusano,DET,Relief_Pitcher,76,170.0,24.63 282 | 280,Rene_Rivera,SEA,Catcher,70,190.0,23.58 283 | 281,Kenji_Johjima,SEA,Catcher,72,200.0,30.73 284 | 282,Richie_Sexson,SEA,First_Baseman,80,237.0,32.17 285 | 283,Ben_Broussard,SEA,First_Baseman,74,220.0,30.43 286 | 284,Jose_Lopez,SEA,Second_Baseman,74,170.0,23.27 287 | 285,Jose_Vidro,SEA,Second_Baseman,71,193.0,32.51 288 | 286,Yuniesky_Betancourt,SEA,Shortstop,70,190.0,25.08 289 | 287,Oswaldo_Navarro,SEA,Shortstop,72,150.0,22.41 290 | 288,Adrian_Beltre,SEA,Third_Baseman,71,220.0,27.9 291 | 289,Raul_Ibanez,SEA,Outfielder,74,200.0,34.74 292 | 290,Jose_Guillen,SEA,Outfielder,71,190.0,30.79 293 | 291,Jeremy_Reed,SEA,Outfielder,72,185.0,25.71 294 | 292,Willie_Bloomquist,SEA,Outfielder,71,185.0,29.26 295 | 293,Adam_Jones,SEA,Outfielder,74,200.0,21.58 296 | 294,Ichiro_Suzuki,SEA,Outfielder,69,172.0,33.36 297 | 295,Mike_Morse,SEA,Outfielder,76,220.0,24.94 298 | 296,Felix_Hernandez,SEA,Starting_Pitcher,75,225.0,20.9 299 | 297,Ryan_Feierabend,SEA,Starting_Pitcher,75,190.0,21.52 300 | 298,Sean_White,SEA,Starting_Pitcher,76,195.0,25.85 301 | 299,Horacio_Ramirez,SEA,Starting_Pitcher,73,219.0,27.27 302 | 300,Cha_Baek,SEA,Starting_Pitcher,76,190.0,26.75 303 | 301,Miguel_Batista,SEA,Starting_Pitcher,73,197.0,36.03 304 | 302,Jeff_Weaver,SEA,Starting_Pitcher,77,200.0,30.52 305 | 303,Jarrod_Washburn,SEA,Starting_Pitcher,73,195.0,32.55 306 | 304,George_Sherrill,SEA,Relief_Pitcher,72,210.0,29.86 307 | 305,Julio_Mateo,SEA,Relief_Pitcher,72,177.0,29.58 308 | 306,J.J._Putz,SEA,Relief_Pitcher,77,220.0,30.02 309 | 307,Chris_Reitsma,SEA,Relief_Pitcher,77,235.0,29.16 310 | 308,Cesar_Jimenez,SEA,Relief_Pitcher,71,180.0,22.3 311 | 309,Eric_O'Flaherty,SEA,Relief_Pitcher,74,195.0,22.06 312 | 310,Jon_Huber,SEA,Relief_Pitcher,74,195.0,25.65 313 | 311,Jake_Woods,SEA,Relief_Pitcher,73,190.0,25.49 314 | 312,Sean_Green,SEA,Relief_Pitcher,78,230.0,27.86 315 | 313,Mark_Lowe,SEA,Relief_Pitcher,75,190.0,23.73 316 | 314,Josh_Paul,TB,Catcher,73,200.0,31.78 317 | 315,Dioner_Navarro,TB,Catcher,70,190.0,23.06 318 | 316,Shawn_Riggans,TB,Catcher,74,190.0,26.6 319 | 317,Ty_Wigginton,TB,First_Baseman,72,200.0,29.39 320 | 318,Brendan_Harris,TB,Second_Baseman,73,200.0,26.51 321 | 319,Jorge_Cantu,TB,Second_Baseman,73,184.0,25.08 322 | 320,Ben_Zobrist,TB,Shortstop,75,200.0,25.76 323 | 321,B.J._Upton,TB,Third_Baseman,75,180.0,22.52 324 | 322,Carl_Crawford,TB,Outfielder,74,219.0,25.57 325 | 323,Rocco_Baldelli,TB,Outfielder,76,187.0,25.43 326 | 324,Greg_Norton,TB,Outfielder,73,200.0,34.65 327 | 325,Elijah_Dukes,TB,Outfielder,74,220.0,22.68 328 | 326,Delmon_Young,TB,Outfielder,75,205.0,21.46 329 | 327,Jonny_Gomes,TB,Designated_Hitter,73,205.0,26.27 330 | 328,Edwin_Jackson,TB,Starting_Pitcher,75,190.0,23.47 331 | 329,Scott_Kazmir,TB,Starting_Pitcher,72,170.0,23.1 332 | 330,Casey_Fossum,TB,Starting_Pitcher,73,160.0,29.14 333 | 331,Jae_Seo,TB,Starting_Pitcher,73,215.0,29.77 334 | 332,J.P._Howell,TB,Starting_Pitcher,72,175.0,23.85 335 | 333,Tim_Corcoran,TB,Starting_Pitcher,74,205.0,28.88 336 | 334,Jason_Hammel,TB,Starting_Pitcher,78,200.0,24.49 337 | 335,James_Shields,TB,Starting_Pitcher,76,214.0,25.19 338 | 336,Brian_Stokes,TB,Starting_Pitcher,73,200.0,27.48 339 | 337,Juan_Salas,TB,Relief_Pitcher,74,190.0,28.31 340 | 338,Jeff_Ridgway,TB,Relief_Pitcher,75,180.0,26.54 341 | 339,Ruddy_Lugo,TB,Relief_Pitcher,70,205.0,26.77 342 | 340,Jae-Kuk_Ryu,TB,Relief_Pitcher,75,220.0,23.75 343 | 341,Chad_Orvella,TB,Relief_Pitcher,71,190.0,26.41 344 | 342,Dan_Miceli,TB,Relief_Pitcher,72,215.0,36.47 345 | 343,Seth_McClung,TB,Relief_Pitcher,78,235.0,26.06 346 | 344,Jon_Switzer,TB,Relief_Pitcher,75,191.0,27.55 347 | 345,Shawn_Camp,TB,Relief_Pitcher,73,200.0,31.28 348 | 346,Scott_Dohmann,TB,Relief_Pitcher,73,181.0,29.04 349 | 347,Jason_LaRue,KC,Catcher,71,200.0,32.95 350 | 348,John_Buck,KC,Catcher,75,210.0,26.65 351 | 349,Ryan_Shealy,KC,First_Baseman,77,240.0,27.5 352 | 350,Ross_Gload,KC,First_Baseman,72,185.0,30.9 353 | 351,Esteban_German,KC,Second_Baseman,69,165.0,29.09 354 | 352,Mark_Grudzielanek,KC,Second_Baseman,73,190.0,36.67 355 | 353,Angel_Sanchez,KC,Second_Baseman,74,185.0,23.44 356 | 354,Angel_Berroa,KC,Shortstop,72,175.0,29.09 357 | 355,Andres_Blanco,KC,Shortstop,70,155.0,22.89 358 | 356,Mark_Teahen,KC,Third_Baseman,75,210.0,25.48 359 | 357,Joey_Gathright,KC,Outfielder,70,170.0,25.84 360 | 358,David_DeJesus,KC,Outfielder,72,175.0,27.2 361 | 359,Shane_Costa,KC,Outfielder,72,220.0,25.22 362 | 360,Mitch_Maier,KC,Outfielder,74,210.0,24.67 363 | 361,Reggie_Sanders,KC,Outfielder,73,205.0,39.25 364 | 362,Emil_Brown,KC,Outfielder,74,200.0,32.17 365 | 363,Mike_Sweeney,KC,Designated_Hitter,75,225.0,33.61 366 | 364,John_Bale,KC,Starting_Pitcher,76,205.0,32.77 367 | 365,Luke_Hudson,KC,Starting_Pitcher,75,195.0,29.83 368 | 366,Scott_Elarton,KC,Starting_Pitcher,80,240.0,31.02 369 | 367,Odalis_Perez,KC,Starting_Pitcher,72,150.0,29.73 370 | 368,Gil_Meche,KC,Starting_Pitcher,75,200.0,28.48 371 | 369,Neal_Musser,KC,Starting_Pitcher,73,215.0,26.51 372 | 370,Brian_Bannister,KC,Starting_Pitcher,74,202.0,26.0 373 | 371,Zack_Greinke,KC,Starting_Pitcher,74,200.0,23.36 374 | 372,Jorge_De_La_Rosa,KC,Starting_Pitcher,73,190.0,25.9 375 | 373,Todd_Wellemeyer,KC,Relief_Pitcher,75,205.0,28.5 376 | 374,Jimmy_Gobble,KC,Relief_Pitcher,75,190.0,25.62 377 | 375,Joel_Peralta,KC,Relief_Pitcher,71,160.0,30.94 378 | 376,Ryan_Braun,KC,Relief_Pitcher,73,215.0,26.59 379 | 377,Joakim_Soria,KC,Relief_Pitcher,75,185.0,22.78 380 | 378,Ken_Ray,KC,Relief_Pitcher,74,200.0,32.26 381 | 379,David_Riske,KC,Relief_Pitcher,74,190.0,30.35 382 | 380,Octavio_Dotel,KC,Relief_Pitcher,72,210.0,33.26 383 | 381,Joe_Nelson,KC,Relief_Pitcher,74,185.0,32.35 384 | 382,Gerald_Laird,TEX,Catcher,74,220.0,27.3 385 | 383,Miguel_Ojeda,TEX,Catcher,74,190.0,32.08 386 | 384,Guillermo_Quiroz,TEX,Catcher,73,202.0,25.25 387 | 385,Chris_Stewart,TEX,Catcher,76,205.0,25.03 388 | 386,Mark_Teixeira,TEX,First_Baseman,75,220.0,26.89 389 | 387,Ian_Kinsler,TEX,Second_Baseman,72,175.0,24.69 390 | 388,Joaquin_Arias,TEX,Shortstop,73,160.0,22.44 391 | 389,Michael_Young,TEX,Shortstop,73,190.0,30.36 392 | 390,Hank_Blalock,TEX,Third_Baseman,73,200.0,26.27 393 | 391,Marlon_Byrd,TEX,Outfielder,72,229.0,29.5 394 | 392,Brad_Wilkerson,TEX,Outfielder,72,206.0,29.75 395 | 393,Sammy_Sosa,TEX,Outfielder,72,220.0,38.3 396 | 394,Kenny_Lofton,TEX,Outfielder,72,180.0,39.75 397 | 395,Frank_Catalanotto,TEX,Outfielder,71,195.0,32.84 398 | 396,Nelson_Cruz,TEX,Outfielder,75,175.0,26.66 399 | 397,Jason_Botts,TEX,Designated_Hitter,77,250.0,26.6 400 | 398,Robinson_Tejeda,TEX,Starting_Pitcher,75,188.0,24.94 401 | 399,John_Rheinecker,TEX,Starting_Pitcher,74,230.0,27.76 402 | 400,Edinson_Volquez,TEX,Starting_Pitcher,73,190.0,23.66 403 | 401,A.J._Murray,TEX,Starting_Pitcher,75,200.0,24.96 404 | 402,Brandon_McCarthy,TEX,Starting_Pitcher,79,190.0,23.65 405 | 403,Vicente_Padilla,TEX,Starting_Pitcher,74,219.0,29.42 406 | 404,Kevin_Millwood,TEX,Starting_Pitcher,76,235.0,32.18 407 | 405,John_Koronka,TEX,Starting_Pitcher,73,180.0,26.66 408 | 406,Frank_Francisco,TEX,Relief_Pitcher,74,180.0,27.47 409 | 407,Francisco_Cruceta,TEX,Relief_Pitcher,74,180.0,25.66 410 | 408,Akinori_Otsuka,TEX,Relief_Pitcher,72,200.0,35.13 411 | 409,Eric_Gagne,TEX,Relief_Pitcher,74,234.0,31.15 412 | 410,Ron_Mahay,TEX,Relief_Pitcher,74,185.0,35.67 413 | 411,Joaquin_Benoit,TEX,Relief_Pitcher,75,220.0,29.6 414 | 412,Rick_Bauer,TEX,Relief_Pitcher,78,223.0,30.14 415 | 413,Josh_Rupe,TEX,Relief_Pitcher,74,200.0,24.53 416 | 414,Wes_Littleton,TEX,Relief_Pitcher,74,210.0,24.49 417 | 415,C.J._Wilson,TEX,Relief_Pitcher,74,200.0,26.28 418 | 416,Scott_Feldman,TEX,Relief_Pitcher,77,210.0,24.06 419 | 417,Gregg_Zaun,TOR,Catcher,70,190.0,35.88 420 | 418,Jason_Phillips,TOR,Catcher,73,177.0,30.42 421 | 419,Lyle_Overbay,TOR,First_Baseman,74,227.0,30.09 422 | 420,Russ_Adams,TOR,Second_Baseman,73,180.0,26.5 423 | 421,Aaron_Hill,TOR,Second_Baseman,71,195.0,24.94 424 | 422,Jason_Smith,TOR,Second_Baseman,75,199.0,29.6 425 | 423,John_McDonald,TOR,Shortstop,71,175.0,32.43 426 | 424,Royce_Clayton,TOR,Shortstop,72,185.0,37.16 427 | 425,Troy_Glaus,TOR,Third_Baseman,77,240.0,30.57 428 | 426,John_Hattig,TOR,Third_Baseman,74,210.0,27.01 429 | 427,Reed_Johnson,TOR,Outfielder,70,180.0,30.23 430 | 428,Alex_Rios,TOR,Outfielder,77,194.0,26.03 431 | 429,Vernon_Wells,TOR,Outfielder,73,225.0,28.23 432 | 430,Frank_Thomas,TOR,Designated_Hitter,77,275.0,38.76 433 | 431,Adam_Lind,TOR,Designated_Hitter,74,195.0,23.62 434 | 432,Shaun_Marcum,TOR,Starting_Pitcher,72,180.0,25.21 435 | 433,Casey_Janssen,TOR,Starting_Pitcher,76,205.0,25.45 436 | 434,Gustavo_Chacin,TOR,Starting_Pitcher,71,193.0,26.24 437 | 435,A.J._Burnett,TOR,Starting_Pitcher,76,230.0,30.15 438 | 436,Roy_Halladay,TOR,Starting_Pitcher,78,230.0,29.8 439 | 437,John_Thomson,TOR,Starting_Pitcher,75,220.0,33.41 440 | 438,Tomo_Ohka,TOR,Starting_Pitcher,73,200.0,30.95 441 | 439,B.J._Ryan,TOR,Relief_Pitcher,78,249.0,31.17 442 | 440,Scott_Downs,TOR,Relief_Pitcher,74,190.0,30.95 443 | 441,Brian_Tallet,TOR,Relief_Pitcher,79,208.0,29.44 444 | 442,Matt_Roney,TOR,Relief_Pitcher,75,245.0,27.14 445 | 443,Tracy_Thorpe,TOR,Relief_Pitcher,76,250.0,26.21 446 | 444,Jean_Machi,TOR,Relief_Pitcher,72,160.0,24.08 447 | 445,Brandon_League,TOR,Relief_Pitcher,75,192.0,23.96 448 | 446,Dustin_McGowan,TOR,Relief_Pitcher,75,220.0,24.94 449 | 447,Jason_Frasor,TOR,Relief_Pitcher,70,170.0,29.56 450 | 448,Francisco_Rosario,TOR,Relief_Pitcher,72,197.0,26.42 451 | 449,Davis_Romero,TOR,Relief_Pitcher,70,155.0,23.92 452 | 450,Jeremy_Accardo,TOR,Relief_Pitcher,74,190.0,25.23 453 | 451,Mike_Redmond,MIN,Catcher,71,200.0,35.82 454 | 452,Joe_Mauer,MIN,Catcher,76,220.0,23.87 455 | 453,Chris_Heintz,MIN,Catcher,73,210.0,32.57 456 | 454,Justin_Morneau,MIN,First_Baseman,76,228.0,25.79 457 | 455,Luis_Castillo,MIN,Second_Baseman,71,190.0,31.47 458 | 456,Alexi_Casilla,MIN,Second_Baseman,69,160.0,22.61 459 | 457,Alejandro_Machado,MIN,Second_Baseman,72,184.0,24.85 460 | 458,Jason_Bartlett,MIN,Shortstop,72,180.0,27.33 461 | 459,Luis_Rodriguez,MIN,Third_Baseman,69,180.0,26.67 462 | 460,Jeff_Cirillo,MIN,Third_Baseman,73,200.0,37.43 463 | 461,Nick_Punto,MIN,Third_Baseman,69,176.0,29.31 464 | 462,Jason_Tyner,MIN,Outfielder,73,160.0,29.85 465 | 463,Michael_Cuddyer,MIN,Outfielder,74,222.0,27.93 466 | 464,Torii_Hunter,MIN,Outfielder,74,211.0,31.62 467 | 465,Lew_Ford,MIN,Outfielder,72,195.0,30.55 468 | 466,Jason_Kubel,MIN,Outfielder,71,200.0,24.77 469 | 467,Josh_Rabe,MIN,Designated_Hitter,74,210.0,28.38 470 | 468,Rondell_White,MIN,Designated_Hitter,73,225.0,35.02 471 | 469,Ramon_Ortiz,MIN,Starting_Pitcher,72,175.0,33.77 472 | 470,Johan_Santana,MIN,Starting_Pitcher,72,206.0,27.97 473 | 471,Carlos_Silva,MIN,Starting_Pitcher,76,240.0,27.85 474 | 472,Matt_Garza,MIN,Starting_Pitcher,76,185.0,23.26 475 | 473,Boof_Bonser,MIN,Starting_Pitcher,76,260.0,25.38 476 | 474,Francisco_Liriano,MIN,Starting_Pitcher,74,185.0,23.35 477 | 475,Scott_Baker,MIN,Starting_Pitcher,76,221.0,25.45 478 | 476,Pat_Neshek,MIN,Relief_Pitcher,75,205.0,26.49 479 | 477,Glen_Perkins,MIN,Relief_Pitcher,71,200.0,24.0 480 | 478,Julio_DePaula,MIN,Relief_Pitcher,72,170.0,24.16 481 | 479,Juan_Rincon,MIN,Relief_Pitcher,71,201.0,28.1 482 | 480,Jesse_Crain,MIN,Relief_Pitcher,73,205.0,25.65 483 | 481,Matt_Guerrier,MIN,Relief_Pitcher,75,185.0,28.58 484 | 482,Joe_Nathan,MIN,Relief_Pitcher,76,205.0,32.27 485 | 483,Dennys_Reyes,MIN,Relief_Pitcher,75,245.0,29.86 486 | 484,Brayan_Pe?a,ATL,Catcher,71,220.0,25.14 487 | 485,Brian_McCann,ATL,Catcher,75,210.0,23.03 488 | 486,Craig_Wilson,ATL,First_Baseman,74,220.0,30.25 489 | 487,Chris_Woodward,ATL,Second_Baseman,72,185.0,30.67 490 | 488,Pete_Orr,ATL,Second_Baseman,73,175.0,27.73 491 | 489,Martin_Prado,ATL,Second_Baseman,73,170.0,23.34 492 | 490,Tony_Pe?a,ATL,Shortstop,73,180.0,25.94 493 | 491,Edgar_Renteria,ATL,Shortstop,73,200.0,31.56 494 | 492,Chipper_Jones,ATL,Third_Baseman,76,210.0,34.85 495 | 493,Willy_Aybar,ATL,Third_Baseman,72,175.0,23.98 496 | 494,Jeff_Francoeur,ATL,Outfielder,76,220.0,23.14 497 | 495,Matt_Diaz,ATL,Outfielder,73,206.0,28.99 498 | 496,Kelly_Johnson,ATL,Outfielder,73,180.0,25.02 499 | 497,Andruw_Jones,ATL,Outfielder,73,210.0,29.85 500 | 498,Ryan_Langerhans,ATL,Outfielder,75,195.0,27.03 501 | 499,Scott_Thorman,ATL,Outfielder,75,200.0,25.15 502 | 500,T.J._Bohn,ATL,Outfielder,77,200.0,27.12 503 | 501,Tim_Hudson,ATL,Starting_Pitcher,73,164.0,31.63 504 | 502,Jonathan_Johnson,ATL,Starting_Pitcher,72,180.0,32.62 505 | 503,John_Smoltz,ATL,Starting_Pitcher,75,220.0,39.79 506 | 504,Mike_Hampton,ATL,Starting_Pitcher,70,195.0,34.47 507 | 505,Kyle_Davies,ATL,Starting_Pitcher,74,205.0,23.47 508 | 506,Chuck_James,ATL,Starting_Pitcher,72,170.0,25.31 509 | 507,Phil_Stockman,ATL,Relief_Pitcher,80,240.0,27.1 510 | 508,Macay_McBride,ATL,Relief_Pitcher,71,210.0,24.35 511 | 509,Joey_Devine,ATL,Relief_Pitcher,71,195.0,23.45 512 | 510,Peter_Moylan,ATL,Relief_Pitcher,74,200.0,28.24 513 | 511,Mike_Gonzalez,ATL,Relief_Pitcher,74,205.0,28.77 514 | 512,Lance_Cormier,ATL,Relief_Pitcher,73,192.0,26.53 515 | 513,Blaine_Boyer,ATL,Relief_Pitcher,75,190.0,25.64 516 | 514,Manny_Acosta,ATL,Relief_Pitcher,76,170.0,25.83 517 | 515,Bob_Wickman,ATL,Relief_Pitcher,73,240.0,38.06 518 | 516,Tanyon_Sturtze,ATL,Relief_Pitcher,77,200.0,36.38 519 | 517,Oscar_Villarreal,ATL,Relief_Pitcher,72,205.0,25.27 520 | 518,Rafael_Soriano,ATL,Relief_Pitcher,73,175.0,27.2 521 | 519,Chad_Paronto,ATL,Relief_Pitcher,77,250.0,31.59 522 | 520,Tyler_Yates,ATL,Relief_Pitcher,76,220.0,29.56 523 | 521,Henry_Blanco,CHC,Catcher,71,224.0,35.5 524 | 522,Michael_Barrett,CHC,Catcher,75,210.0,30.35 525 | 523,Geovany_Soto,CHC,Catcher,73,195.0,24.11 526 | 524,Scott_Moore,CHC,First_Baseman,74,180.0,23.29 527 | 525,Derrek_Lee,CHC,First_Baseman,77,245.0,31.48 528 | 526,Ryan_Theriot,CHC,Second_Baseman,71,175.0,27.23 529 | 527,Ronny_Cedeno,CHC,Shortstop,72,180.0,24.07 530 | 528,Aramis_Ramirez,CHC,Third_Baseman,73,215.0,28.68 531 | 529,Cesar_Izturis,CHC,Third_Baseman,69,175.0,27.05 532 | 530,Alfonso_Soriano,CHC,Outfielder,73,180.0,31.15 533 | 531,Jacque_Jones,CHC,Outfielder,70,195.0,31.85 534 | 532,Daryle_Ward,CHC,Outfielder,74,230.0,31.68 535 | 533,Cliff_Floyd,CHC,Outfielder,76,230.0,34.23 536 | 534,Mark_DeRosa,CHC,Outfielder,73,205.0,32.01 537 | 535,Matt_Murton,CHC,Outfielder,73,215.0,25.41 538 | 536,Buck_Coats,CHC,Outfielder,75,195.0,24.73 539 | 537,Angel_Pagan,CHC,Outfielder,73,180.0,25.66 540 | 538,Sean_Marshall,CHC,Starting_Pitcher,79,205.0,24.5 541 | 539,Carlos_Marmol,CHC,Starting_Pitcher,74,180.0,24.38 542 | 540,Ryan_O'Malley,CHC,Starting_Pitcher,73,190.0,26.89 543 | 541,Juan_Mateo,CHC,Starting_Pitcher,74,180.0,24.2 544 | 542,Rich_Hill,CHC,Starting_Pitcher,77,190.0,26.97 545 | 543,Angel_Guzman,CHC,Starting_Pitcher,75,190.0,25.21 546 | 544,Wade_Miller,CHC,Starting_Pitcher,74,220.0,30.46 547 | 545,Jason_Marquis,CHC,Starting_Pitcher,73,210.0,28.53 548 | 546,Carlos_Zambrano,CHC,Starting_Pitcher,77,255.0,25.75 549 | 547,Ted_Lilly,CHC,Starting_Pitcher,73,190.0,31.15 550 | 548,Mark_Prior,CHC,Starting_Pitcher,77,230.0,26.48 551 | 549,Neal_Cotts,CHC,Relief_Pitcher,74,200.0,26.93 552 | 550,Will_Ohman,CHC,Relief_Pitcher,74,205.0,29.55 553 | 551,Scott_Eyre,CHC,Relief_Pitcher,73,210.0,34.75 554 | 552,Kerry_Wood,CHC,Relief_Pitcher,77,225.0,29.71 555 | 553,Ryan_Dempster,CHC,Relief_Pitcher,74,215.0,29.83 556 | 554,Bob_Howry,CHC,Relief_Pitcher,77,220.0,33.57 557 | 555,Mike_Wuertz,CHC,Relief_Pitcher,75,205.0,28.21 558 | 556,Roberto_Novoa,CHC,Relief_Pitcher,77,200.0,27.54 559 | 557,Chris_Snyder,ARZ,Catcher,75,220.0,26.05 560 | 558,Miguel_Montero,ARZ,Catcher,71,197.0,23.64 561 | 559,Conor_Jackson,ARZ,First_Baseman,74,225.0,24.82 562 | 560,Robby_Hammock,ARZ,First_Baseman,70,187.0,29.8 563 | 561,Tony_Clark,ARZ,First_Baseman,79,245.0,34.71 564 | 562,Orlando_Hudson,ARZ,Second_Baseman,72,185.0,29.22 565 | 563,Stephen_Drew,ARZ,Shortstop,72,185.0,23.96 566 | 564,Alberto_Callaspo,ARZ,Shortstop,70,175.0,23.87 567 | 565,Chad_Tracy,ARZ,Third_Baseman,74,200.0,26.77 568 | 566,Chris_Young,ARZ,Outfielder,74,180.0,23.49 569 | 567,Scott_Hairston,ARZ,Outfielder,72,188.0,26.77 570 | 568,Carlos_Quentin,ARZ,Outfielder,73,225.0,24.51 571 | 569,Jeff_DaVanon,ARZ,Outfielder,72,200.0,33.23 572 | 570,Eric_Byrnes,ARZ,Outfielder,74,210.0,31.04 573 | 571,Livan_Hernandez,ARZ,Starting_Pitcher,74,245.0,32.02 574 | 572,Doug_Davis,ARZ,Starting_Pitcher,76,213.0,31.44 575 | 573,Randy_Johnson,ARZ,Starting_Pitcher,82,231.0,43.47 576 | 574,Juan_Cruz,ARZ,Starting_Pitcher,74,165.0,28.38 577 | 575,Brandon_Webb,ARZ,Starting_Pitcher,74,228.0,27.81 578 | 576,Enrique_Gonzalez,ARZ,Starting_Pitcher,70,210.0,24.57 579 | 577,Dana_Eveland,ARZ,Starting_Pitcher,73,250.0,23.34 580 | 578,Brandon_Medders,ARZ,Relief_Pitcher,73,191.0,27.09 581 | 579,Tony_Pe?a,ARZ,Relief_Pitcher,74,190.0,25.14 582 | 580,Doug_Slaten,ARZ,Relief_Pitcher,77,200.0,27.07 583 | 581,Edgar_Gonzalez,ARZ,Relief_Pitcher,72,215.0,24.02 584 | 582,Jose_Valverde,ARZ,Relief_Pitcher,76,254.0,27.6 585 | 583,Jorge_Julio,ARZ,Relief_Pitcher,73,232.0,27.99 586 | 584,Brandon_Lyon,ARZ,Relief_Pitcher,73,180.0,27.56 587 | 585,Miguel_Olivo,FLA,Catcher,72,215.0,28.63 588 | 586,Matt_Treanor,FLA,Catcher,74,220.0,30.99 589 | 587,Mike_Jacobs,FLA,First_Baseman,74,180.0,26.33 590 | 588,Dan_Uggla,FLA,Second_Baseman,71,200.0,26.97 591 | 589,Robert_Andino,FLA,Shortstop,72,170.0,22.85 592 | 590,Hanley_Ramirez,FLA,Shortstop,75,195.0,23.19 593 | 591,Miguel_Cabrera,FLA,Third_Baseman,74,210.0,23.87 594 | 592,Aaron_Boone,FLA,Third_Baseman,74,200.0,33.98 595 | 593,Joe_Borchard,FLA,Outfielder,77,220.0,28.26 596 | 594,Alfredo_Amezaga,FLA,Outfielder,70,165.0,29.12 597 | 595,Cody_Ross,FLA,Outfielder,71,180.0,26.18 598 | 596,Josh_Willingham,FLA,Outfielder,73,200.0,28.03 599 | 597,Jeremy_Hermida,FLA,Outfielder,76,200.0,23.08 600 | 598,Eric_Reed,FLA,Outfielder,71,170.0,26.24 601 | 599,Reggi_Abercrombie,FLA,Outfielder,75,224.0,26.63 602 | 600,Ricky_Nolasco,FLA,Starting_Pitcher,74,220.0,24.21 603 | 601,Anibal_Sanchez,FLA,Starting_Pitcher,72,180.0,23.01 604 | 602,Scott_Olsen,FLA,Starting_Pitcher,76,198.0,23.13 605 | 603,Josh_Johnson,FLA,Starting_Pitcher,79,240.0,23.08 606 | 604,Dontrelle_Willis,FLA,Starting_Pitcher,76,239.0,25.13 607 | 605,Logan_Kensing,FLA,Relief_Pitcher,73,185.0,24.66 608 | 606,Sergio_Mitre,FLA,Relief_Pitcher,76,210.0,26.03 609 | 607,Kevin_Gregg,FLA,Relief_Pitcher,78,220.0,28.7 610 | 608,Travis_Bowyer,FLA,Relief_Pitcher,75,200.0,25.57 611 | 609,Renyel_Pinto,FLA,Relief_Pitcher,76,195.0,24.65 612 | 610,Randy_Messenger,FLA,Relief_Pitcher,72,220.0,25.55 613 | 611,Yusmeiro_Petit,FLA,Relief_Pitcher,72,230.0,22.27 614 | 612,Carlos_Martinez,FLA,Relief_Pitcher,73,170.0,24.76 615 | 613,Taylor_Tankersley,FLA,Relief_Pitcher,73,220.0,23.98 616 | 614,Henry_Owens,FLA,Relief_Pitcher,75,230.0,27.85 617 | 615,Jose_Garcia,FLA,Relief_Pitcher,71,165.0,22.14 618 | 616,Matt_Lindstrom,FLA,Relief_Pitcher,76,205.0,27.05 619 | 617,Javier_Valentin,CIN,Catcher,70,192.0,31.45 620 | 618,Chad_Moeller,CIN,Catcher,75,210.0,32.03 621 | 619,David_Ross,CIN,Catcher,74,205.0,29.95 622 | 620,Joey_Votto,CIN,First_Baseman,75,200.0,23.47 623 | 621,Scott_Hatteberg,CIN,First_Baseman,73,210.0,37.21 624 | 622,Brandon_Phillips,CIN,Second_Baseman,71,185.0,25.67 625 | 623,Juan_Castro,CIN,Shortstop,71,195.0,34.69 626 | 624,Alex_Gonzalez,CIN,Shortstop,72,202.0,30.04 627 | 625,Mark_Bellhorn,CIN,Third_Baseman,73,205.0,32.52 628 | 626,Edwin_Encarnacion,CIN,Third_Baseman,73,195.0,24.15 629 | 627,Jeff_Keppinger,CIN,Third_Baseman,72,180.0,26.86 630 | 628,Norris_Hopper,CIN,Outfielder,69,200.0,27.94 631 | 629,Chris_Denorfia,CIN,Outfielder,73,185.0,26.63 632 | 630,Adam_Dunn,CIN,Outfielder,78,240.0,27.31 633 | 631,Bubba_Crosby,CIN,Outfielder,71,185.0,30.55 634 | 632,Jeff_Conine,CIN,Outfielder,73,220.0,40.68 635 | 633,Ken_Griffey_Jr.,CIN,Outfielder,75,205.0,37.27 636 | 634,Josh_Hamilton,CIN,Outfielder,76,205.0,25.78 637 | 635,Ryan_Freel,CIN,Outfielder,70,180.0,30.98 638 | 636,Kyle_Lohse,CIN,Starting_Pitcher,74,201.0,28.41 639 | 637,Bronson_Arroyo,CIN,Starting_Pitcher,77,190.0,30.01 640 | 638,Eric_Milton,CIN,Starting_Pitcher,75,208.0,31.57 641 | 639,Aaron_Harang,CIN,Starting_Pitcher,79,240.0,28.81 642 | 641,Elizardo_Ramirez,CIN,Starting_Pitcher,72,180.0,24.09 643 | 642,Todd_Coffey,CIN,Relief_Pitcher,77,230.0,26.47 644 | 643,Brian_Shackelford,CIN,Relief_Pitcher,73,195.0,30.5 645 | 644,Bill_Bray,CIN,Relief_Pitcher,75,215.0,23.74 646 | 645,Bobby_Livingston,CIN,Relief_Pitcher,75,190.0,24.49 647 | 646,Matt_Belisle,CIN,Relief_Pitcher,75,195.0,26.73 648 | 647,Gary_Majewski,CIN,Relief_Pitcher,73,215.0,27.01 649 | 648,Mike_Stanton,CIN,Relief_Pitcher,73,215.0,39.75 650 | 649,Brad_Salmon,CIN,Relief_Pitcher,76,220.0,27.16 651 | 650,Jared_Burton,CIN,Relief_Pitcher,77,220.0,25.74 652 | 651,David_Weathers,CIN,Relief_Pitcher,75,230.0,37.43 653 | 652,Rheal_Cormier,CIN,Relief_Pitcher,70,195.0,39.85 654 | 653,Yorvit_Torrealba,COL,Catcher,71,190.0,28.62 655 | 654,Chris_Iannetta,COL,Catcher,71,195.0,23.9 656 | 655,Alvin_Colina,COL,Catcher,75,209.0,25.18 657 | 656,Todd_Helton,COL,First_Baseman,74,204.0,33.53 658 | 657,Jamey_Carroll,COL,Second_Baseman,69,170.0,33.03 659 | 658,Kaz_Matsui,COL,Second_Baseman,70,185.0,31.35 660 | 659,Troy_Tulowitzki,COL,Shortstop,75,205.0,22.39 661 | 660,Clint_Barmes,COL,Shortstop,72,175.0,27.99 662 | 661,Garrett_Atkins,COL,Third_Baseman,75,210.0,27.22 663 | 662,Ryan_Spilborghs,COL,Outfielder,73,190.0,27.49 664 | 663,Cory_Sullivan,COL,Outfielder,72,180.0,27.53 665 | 664,Jeff_Salazar,COL,Outfielder,72,180.0,26.26 666 | 665,Willy_Taveras,COL,Outfielder,72,160.0,25.18 667 | 666,Matt_Holliday,COL,Outfielder,76,235.0,27.12 668 | 667,Brad_Hawpe,COL,Outfielder,75,200.0,27.69 669 | 668,Jeff_Baker,COL,Outfielder,74,210.0,25.69 670 | 669,Javy_Lopez,COL,Designated_Hitter,75,224.0,36.32 671 | 670,Byung-Hyun_Kim,COL,Starting_Pitcher,69,180.0,28.11 672 | 671,Rodrigo_Lopez,COL,Starting_Pitcher,73,190.0,31.21 673 | 672,Brian_Lawrence,COL,Starting_Pitcher,72,197.0,30.8 674 | 673,Josh_Fogg,COL,Starting_Pitcher,72,203.0,30.21 675 | 674,Aaron_Cook,COL,Starting_Pitcher,75,205.0,28.06 676 | 675,Denny_Bautista,COL,Starting_Pitcher,77,170.0,26.52 677 | 676,Ubaldo_Jimenez,COL,Starting_Pitcher,76,200.0,23.1 678 | 677,Jason_Hirsh,COL,Starting_Pitcher,80,250.0,25.02 679 | 678,Jeff_Francis,COL,Starting_Pitcher,77,200.0,26.14 680 | 679,Taylor_Buchholz,COL,Starting_Pitcher,76,220.0,25.38 681 | 680,Ryan_Speier,COL,Relief_Pitcher,79,200.0,27.6 682 | 681,Ramon_Ramirez,COL,Relief_Pitcher,71,190.0,25.5 683 | 682,Manny_Corpas,COL,Relief_Pitcher,75,170.0,24.24 684 | 683,Juan_Morillo,COL,Relief_Pitcher,73,190.0,23.32 685 | 684,Brian_Fuentes,COL,Relief_Pitcher,76,220.0,31.56 686 | 685,LaTroy_Hawkins,COL,Relief_Pitcher,77,215.0,34.19 687 | 686,Tom_Martin,COL,Relief_Pitcher,73,206.0,36.78 688 | 687,Jeremy_Affeldt,COL,Relief_Pitcher,76,215.0,27.73 689 | 688,Paul_Lo_Duca,NYM,Catcher,70,185.0,34.88 690 | 689,Ramon_Castro,NYM,Catcher,75,235.0,31.0 691 | 690,Julio_Franco,NYM,First_Baseman,73,188.0,48.52 692 | 691,Carlos_Delgado,NYM,First_Baseman,75,230.0,34.68 693 | 692,Jose_Valentin,NYM,Second_Baseman,70,195.0,37.38 694 | 693,Anderson_Hernandez,NYM,Second_Baseman,69,168.0,24.33 695 | 694,Damion_Easley,NYM,Shortstop,71,190.0,37.3 696 | 695,Jose_Reyes,NYM,Shortstop,72,160.0,23.72 697 | 696,David_Wright,NYM,Third_Baseman,72,200.0,24.19 698 | 697,Ben_Johnson,NYM,Outfielder,73,200.0,25.7 699 | 698,Endy_Chavez,NYM,Outfielder,70,189.0,29.06 700 | 699,David_Newhan,NYM,Outfielder,70,180.0,33.48 701 | 700,Carlos_Beltran,NYM,Outfielder,73,190.0,29.85 702 | 701,Shawn_Green,NYM,Outfielder,76,200.0,34.3 703 | 702,Moises_Alou,NYM,Outfielder,75,220.0,40.66 704 | 703,Lastings_Milledge,NYM,Outfielder,72,187.0,21.9 705 | 704,Alay_Soler,NYM,Starting_Pitcher,73,240.0,27.39 706 | 705,Mike_Pelfrey,NYM,Starting_Pitcher,79,190.0,23.13 707 | 706,Pedro_Martinez,NYM,Starting_Pitcher,71,180.0,35.35 708 | 707,Tom_Glavine,NYM,Starting_Pitcher,72,185.0,40.93 709 | 708,Chan_Ho_Park,NYM,Starting_Pitcher,74,210.0,33.67 710 | 709,Orlando_Hernandez,NYM,Starting_Pitcher,74,220.0,37.39 711 | 710,Dave_Williams,NYM,Starting_Pitcher,74,219.0,27.97 712 | 711,Oliver_Perez,NYM,Starting_Pitcher,72,190.0,25.54 713 | 712,John_Maine,NYM,Starting_Pitcher,76,193.0,25.81 714 | 713,Marcos_Carvajal,NYM,Relief_Pitcher,76,175.0,22.53 715 | 714,Ambiorix_Burgos,NYM,Relief_Pitcher,72,180.0,22.86 716 | 715,Jason_Vargas,NYM,Relief_Pitcher,72,215.0,24.07 717 | 716,Jon_Adkins,NYM,Relief_Pitcher,71,210.0,29.5 718 | 717,Juan_Padilla,NYM,Relief_Pitcher,72,200.0,30.03 719 | 718,Duaner_Sanchez,NYM,Relief_Pitcher,72,190.0,27.38 720 | 719,Pedro_Feliciano,NYM,Relief_Pitcher,70,185.0,30.51 721 | 720,Aaron_Heilman,NYM,Relief_Pitcher,77,220.0,28.3 722 | 721,Jorge_Sosa,NYM,Relief_Pitcher,74,170.0,29.84 723 | 722,Scott_Schoeneweis,NYM,Relief_Pitcher,72,195.0,33.41 724 | 723,Guillermo_Mota,NYM,Relief_Pitcher,76,205.0,33.6 725 | 724,Billy_Wagner,NYM,Relief_Pitcher,71,195.0,35.6 726 | 725,Philip_Humber,NYM,Relief_Pitcher,76,210.0,24.19 727 | 726,Brad_Ausmus,HOU,Catcher,71,190.0,37.88 728 | 727,Humberto_Quintero,HOU,Catcher,73,190.0,27.56 729 | 728,Hector_Gimenez,HOU,Catcher,70,180.0,24.42 730 | 729,Lance_Berkman,HOU,First_Baseman,73,220.0,31.05 731 | 730,Mike_Lamb,HOU,First_Baseman,73,190.0,31.56 732 | 731,Mark_Loretta,HOU,Second_Baseman,72,186.0,35.55 733 | 732,Craig_Biggio,HOU,Second_Baseman,71,185.0,41.21 734 | 733,Brooks_Conrad,HOU,Second_Baseman,71,190.0,27.12 735 | 734,Chris_Burke,HOU,Second_Baseman,71,180.0,26.97 736 | 735,Eric_Bruntlett,HOU,Second_Baseman,72,190.0,28.92 737 | 736,Adam_Everett,HOU,Shortstop,72,170.0,30.06 738 | 737,Morgan_Ensberg,HOU,Third_Baseman,74,210.0,31.51 739 | 738,Carlos_Lee,HOU,Outfielder,74,240.0,30.69 740 | 739,Jason_Lane,HOU,Outfielder,74,220.0,30.19 741 | 740,Orlando_Palmeiro,HOU,Outfielder,71,180.0,38.11 742 | 741,Luke_Scott,HOU,Outfielder,72,210.0,28.68 743 | 742,Charlton_Jimerson,HOU,Outfielder,75,210.0,27.44 744 | 743,Fernando_Nieve,HOU,Starting_Pitcher,72,195.0,24.63 745 | 744,Wandy_Rodriguez,HOU,Starting_Pitcher,71,160.0,28.11 746 | 745,Brandon_Backe,HOU,Starting_Pitcher,72,180.0,28.9 747 | 746,Matt_Albers,HOU,Starting_Pitcher,72,205.0,24.11 748 | 747,Woody_Williams,HOU,Starting_Pitcher,72,200.0,40.53 749 | 748,Roy_Oswalt,HOU,Starting_Pitcher,72,185.0,29.5 750 | 749,Jason_Jennings,HOU,Starting_Pitcher,74,245.0,28.62 751 | 750,Miguel_Asencio,HOU,Relief_Pitcher,74,190.0,26.42 752 | 751,Brad_Lidge,HOU,Relief_Pitcher,77,210.0,30.18 753 | 752,Trever_Miller,HOU,Relief_Pitcher,75,200.0,33.75 754 | 753,David_Borkowski,HOU,Relief_Pitcher,73,200.0,30.06 755 | 754,Dan_Wheeler,HOU,Relief_Pitcher,75,222.0,29.22 756 | 755,Paul_Estrada,HOU,Relief_Pitcher,73,215.0,24.47 757 | 756,Lincoln_Holdzkom,HOU,Relief_Pitcher,76,240.0,24.94 758 | 757,Chris_Sampson,HOU,Relief_Pitcher,72,170.0,28.77 759 | 758,Chad_Qualls,HOU,Relief_Pitcher,77,220.0,28.54 760 | 759,Ezequiel_Astacio,HOU,Relief_Pitcher,75,156.0,27.32 761 | 760,Mike_Lieberthal,LA,Catcher,72,190.0,35.12 762 | 761,Russell_Martin,LA,Catcher,71,202.0,24.04 763 | 762,Olmedo_Saenz,LA,First_Baseman,71,221.0,36.39 764 | 763,James_Loney,LA,First_Baseman,75,200.0,22.81 765 | 764,Nomar_Garciaparra,LA,First_Baseman,72,190.0,33.6 766 | 765,Jeff_Kent,LA,Second_Baseman,73,210.0,38.98 767 | 766,Ramon_Martinez,LA,Second_Baseman,73,190.0,34.39 768 | 767,Marlon_Anderson,LA,Second_Baseman,71,200.0,33.15 769 | 768,Rafael_Furcal,LA,Shortstop,70,165.0,29.35 770 | 769,Wilson_Betemit,LA,Third_Baseman,75,190.0,26.59 771 | 770,Andy_LaRoche,LA,Third_Baseman,71,185.0,23.46 772 | 771,Matt_Kemp,LA,Outfielder,76,230.0,22.43 773 | 772,Andre_Ethier,LA,Outfielder,73,208.0,24.89 774 | 773,Delwyn_Young,LA,Outfielder,68,209.0,24.67 775 | 774,Jason_Repko,LA,Outfielder,71,175.0,26.17 776 | 775,Juan_Pierre,LA,Outfielder,72,180.0,29.54 777 | 776,Luis_Gonzalez,LA,Outfielder,74,200.0,39.49 778 | 777,Jason_Schmidt,LA,Starting_Pitcher,77,205.0,34.08 779 | 778,Randy_Wolf,LA,Starting_Pitcher,72,200.0,30.52 780 | 779,Brad_Penny,LA,Starting_Pitcher,76,250.0,28.77 781 | 780,Derek_Lowe,LA,Starting_Pitcher,78,210.0,33.75 782 | 781,Mark_Hendrickson,LA,Starting_Pitcher,81,230.0,32.69 783 | 782,Chad_Billingsley,LA,Starting_Pitcher,72,244.0,22.59 784 | 783,Takashi_Saito,LA,Relief_Pitcher,73,202.0,37.04 785 | 784,Jonathan_Broxton,LA,Relief_Pitcher,76,240.0,22.7 786 | 785,Hong-Chih_Kuo,LA,Relief_Pitcher,72,200.0,25.6 787 | 786,Eric_Stults,LA,Relief_Pitcher,72,215.0,27.23 788 | 787,Chin-Hui_Tsao,LA,Relief_Pitcher,74,177.0,25.74 789 | 788,Tim_Hamulack,LA,Relief_Pitcher,76,210.0,30.29 790 | 789,Yhency_Brazoban,LA,Relief_Pitcher,73,170.0,26.72 791 | 790,Brett_Tomko,LA,Relief_Pitcher,76,215.0,33.9 792 | 791,Joe_Beimel,LA,Relief_Pitcher,75,217.0,29.86 793 | 792,Elmer_Dessens,LA,Relief_Pitcher,70,198.0,36.13 794 | 793,Ryan_Budde,PHI,Catcher,71,200.0,27.54 795 | 794,Rod_Barajas,PHI,Catcher,74,220.0,31.49 796 | 795,Carlos_Ruiz,PHI,Catcher,72,170.0,28.1 797 | 796,Chris_Coste,PHI,Catcher,73,200.0,34.07 798 | 797,Ryan_Howard,PHI,First_Baseman,76,230.0,27.28 799 | 798,Wes_Helms,PHI,First_Baseman,76,231.0,30.8 800 | 799,Chase_Utley,PHI,Second_Baseman,73,183.0,28.2 801 | 800,Danny_Sandoval,PHI,Second_Baseman,71,192.0,27.9 802 | 801,Jimmy_Rollins,PHI,Shortstop,68,167.0,28.26 803 | 802,Abraham_Nu?ez,PHI,Third_Baseman,71,190.0,30.96 804 | 803,Michael_Bourn,PHI,Outfielder,71,180.0,24.18 805 | 804,Chris_Roberson,PHI,Outfielder,74,180.0,27.52 806 | 805,Jayson_Werth,PHI,Outfielder,77,215.0,27.78 807 | 806,Shane_Victorino,PHI,Outfielder,69,160.0,26.25 808 | 807,Aaron_Rowand,PHI,Outfielder,72,205.0,29.5 809 | 808,Pat_Burrell,PHI,Outfielder,76,223.0,30.39 810 | 809,Greg_Dobbs,PHI,Designated_Hitter,73,205.0,28.66 811 | 810,Cole_Hamels,PHI,Starting_Pitcher,75,175.0,23.18 812 | 811,Alfredo_Simon,PHI,Starting_Pitcher,76,170.0,25.81 813 | 812,Scott_Mathieson,PHI,Starting_Pitcher,75,190.0,23.01 814 | 813,Freddy_Garcia,PHI,Starting_Pitcher,76,240.0,31.72 815 | 814,Jamie_Moyer,PHI,Starting_Pitcher,72,175.0,44.28 816 | 815,Jon_Lieber,PHI,Starting_Pitcher,74,230.0,36.91 817 | 816,Brett_Myers,PHI,Starting_Pitcher,76,223.0,26.54 818 | 817,Adam_Eaton,PHI,Starting_Pitcher,74,196.0,29.27 819 | 818,Geoff_Geary,PHI,Relief_Pitcher,72,167.0,30.51 820 | 819,Clay_Condrey,PHI,Relief_Pitcher,75,195.0,31.28 821 | 820,Ryan_Madson,PHI,Relief_Pitcher,78,190.0,26.51 822 | 821,Antonio_Alfonseca,PHI,Relief_Pitcher,77,250.0,34.87 823 | 822,Tom_Gordon,PHI,Relief_Pitcher,70,190.0,39.28 824 | 823,Brian_Sanches,PHI,Relief_Pitcher,72,190.0,28.56 825 | 824,Jim_Ed_Warden,PHI,Relief_Pitcher,79,190.0,27.82 826 | 825,Anderson_Garcia,PHI,Relief_Pitcher,74,170.0,25.94 827 | 826,Eude_Brito,PHI,Relief_Pitcher,71,160.0,28.53 828 | 827,Fabio_Castro,PHI,Relief_Pitcher,68,150.0,22.11 829 | 828,Matt_Smith,PHI,Relief_Pitcher,77,225.0,27.71 830 | 829,Damian_Miller,MLW,Catcher,75,220.0,37.38 831 | 830,Johnny_Estrada,MLW,Catcher,71,209.0,30.67 832 | 831,Mike_Rivera,MLW,Catcher,72,210.0,30.48 833 | 832,J.D._Closser,MLW,Catcher,70,176.0,27.12 834 | 833,Prince_Fielder,MLW,First_Baseman,72,260.0,22.81 835 | 834,Rickie_Weeks,MLW,Second_Baseman,72,195.0,24.46 836 | 835,Tony_Graffanino,MLW,Second_Baseman,73,190.0,34.73 837 | 836,Craig_Counsell,MLW,Shortstop,72,184.0,36.53 838 | 837,J.J._Hardy,MLW,Shortstop,74,180.0,24.53 839 | 838,Bill_Hall,MLW,Shortstop,72,195.0,27.17 840 | 839,Vinny_Rottino,MLW,Third_Baseman,72,195.0,26.9 841 | 840,Corey_Koskie,MLW,Third_Baseman,75,219.0,33.67 842 | 841,Kevin_Mench,MLW,Outfielder,72,225.0,29.14 843 | 842,Geoff_Jenkins,MLW,Outfielder,73,212.0,32.61 844 | 843,Brady_Clark,MLW,Outfielder,74,202.0,33.87 845 | 844,Tony_Gwynn_Jr.,MLW,Outfielder,72,185.0,24.41 846 | 845,Corey_Hart,MLW,Outfielder,78,200.0,24.94 847 | 846,Gabe_Gross,MLW,Outfielder,75,209.0,27.36 848 | 847,Laynce_Nix,MLW,Outfielder,72,200.0,26.33 849 | 848,Drew_Anderson,MLW,Outfielder,74,195.0,25.72 850 | 849,Claudio_Vargas,MLW,Starting_Pitcher,75,228.0,28.7 851 | 850,Chris_Capuano,MLW,Starting_Pitcher,75,210.0,28.53 852 | 851,Ben_Hendrickson,MLW,Starting_Pitcher,76,190.0,26.07 853 | 852,Dave_Bush,MLW,Starting_Pitcher,74,212.0,27.31 854 | 853,Carlos_Villanueva,MLW,Starting_Pitcher,74,190.0,23.26 855 | 854,Ben_Sheets,MLW,Starting_Pitcher,73,218.0,28.62 856 | 855,Jeff_Suppan,MLW,Starting_Pitcher,74,220.0,32.16 857 | 856,Brian_Shouse,MLW,Relief_Pitcher,71,190.0,38.43 858 | 857,Francisco_Cordero,MLW,Relief_Pitcher,74,235.0,31.81 859 | 858,Derrick_Turnbow,MLW,Relief_Pitcher,75,210.0,29.1 860 | 859,Matt_Wise,MLW,Relief_Pitcher,76,200.0,31.28 861 | 860,Grant_Balfour,MLW,Relief_Pitcher,74,188.0,29.17 862 | 861,Dennis_Sarfate,MLW,Relief_Pitcher,76,210.0,25.89 863 | 862,Jose_Capellan,MLW,Relief_Pitcher,76,235.0,26.13 864 | 863,Greg_Aquino,MLW,Relief_Pitcher,73,188.0,29.13 865 | 864,Josh_Bard,SD,Catcher,75,215.0,28.92 866 | 865,Rob_Bowen,SD,Catcher,75,216.0,26.01 867 | 866,Adrian_Gonzalez,SD,First_Baseman,74,220.0,24.81 868 | 867,Marcus_Giles,SD,Second_Baseman,68,180.0,28.79 869 | 868,Todd_Walker,SD,Second_Baseman,72,185.0,33.77 870 | 869,Geoff_Blum,SD,Shortstop,75,200.0,33.85 871 | 870,Khalil_Greene,SD,Shortstop,71,210.0,27.36 872 | 871,Paul_McAnulty,SD,Outfielder,70,220.0,26.01 873 | 872,Terrmel_Sledge,SD,Outfielder,72,185.0,29.95 874 | 873,Jack_Cust,SD,Outfielder,73,231.0,28.12 875 | 874,Jose_Cruz_Jr.,SD,Outfielder,72,210.0,32.87 876 | 875,Russell_Branyan,SD,Outfielder,75,195.0,31.2 877 | 876,Mike_Cameron,SD,Outfielder,74,200.0,34.14 878 | 877,Brian_Giles,SD,Outfielder,70,205.0,36.11 879 | 878,Kevin_Kouzmanoff,SD,Designated_Hitter,73,200.0,25.6 880 | 879,Mike_Thompson,SD,Starting_Pitcher,76,200.0,26.31 881 | 880,Clay_Hensley,SD,Starting_Pitcher,71,190.0,27.5 882 | 881,Chris_Young,SD,Starting_Pitcher,82,250.0,27.77 883 | 882,Greg_Maddux,SD,Starting_Pitcher,72,185.0,40.88 884 | 883,Jake_Peavy,SD,Starting_Pitcher,73,180.0,25.75 885 | 884,Scott_Cassidy,SD,Relief_Pitcher,74,170.0,31.41 886 | 885,Scott_Strickland,SD,Relief_Pitcher,71,180.0,30.84 887 | 886,Scott_Linebrink,SD,Relief_Pitcher,75,208.0,30.57 888 | 887,Doug_Brocail,SD,Relief_Pitcher,77,235.0,39.79 889 | 888,Trevor_Hoffman,SD,Relief_Pitcher,72,215.0,39.38 890 | 889,Heath_Bell,SD,Relief_Pitcher,74,244.0,29.42 891 | 890,Royce_Ring,SD,Relief_Pitcher,72,220.0,26.19 892 | 891,Cla_Meredith,SD,Relief_Pitcher,73,185.0,23.74 893 | 892,Andrew_Brown,SD,Relief_Pitcher,78,230.0,26.03 894 | 893,Mike_Adams,SD,Relief_Pitcher,77,190.0,28.59 895 | 894,Justin_Hampson,SD,Relief_Pitcher,73,200.0,26.77 896 | 895,Kevin_Cameron,SD,Relief_Pitcher,73,180.0,27.21 897 | 896,Ryan_Ketchner,SD,Relief_Pitcher,73,190.0,24.87 898 | 897,Brian_Schneider,WAS,Catcher,73,196.0,30.26 899 | 898,Jesus_Flores,WAS,Catcher,73,180.0,22.34 900 | 899,Larry_Broadway,WAS,First_Baseman,76,230.0,26.2 901 | 900,Nick_Johnson,WAS,First_Baseman,75,224.0,28.45 902 | 901,Bernie_Castro,WAS,Second_Baseman,70,160.0,27.63 903 | 902,Josh_Wilson,WAS,Shortstop,73,178.0,25.93 904 | 903,Cristian_Guzman,WAS,Shortstop,72,205.0,28.94 905 | 904,Felipe_Lopez,WAS,Shortstop,73,185.0,26.8 906 | 905,Ryan_Zimmerman,WAS,Third_Baseman,75,210.0,22.42 907 | 906,Nook_Logan,WAS,Outfielder,74,180.0,27.26 908 | 907,Ryan_Church,WAS,Outfielder,73,190.0,28.38 909 | 908,Kory_Casto,WAS,Outfielder,73,200.0,25.23 910 | 909,Mike_Restovich,WAS,Outfielder,76,257.0,28.16 911 | 910,Alex_Escobar,WAS,Outfielder,73,190.0,28.48 912 | 911,Austin_Kearns,WAS,Outfielder,75,220.0,26.78 913 | 912,Chris_Snelling,WAS,Outfielder,70,165.0,25.24 914 | 913,Billy_Traber,WAS,Starting_Pitcher,77,205.0,27.45 915 | 914,Tim_Redding,WAS,Starting_Pitcher,72,200.0,29.05 916 | 915,John_Patterson,WAS,Starting_Pitcher,77,208.0,29.08 917 | 916,Shawn_Hill,WAS,Starting_Pitcher,74,185.0,25.84 918 | 917,Joel_Hanrahan,WAS,Starting_Pitcher,75,215.0,25.4 919 | 918,Mike_O'Connor,WAS,Starting_Pitcher,75,170.0,26.54 920 | 919,Emiliano_Fruto,WAS,Relief_Pitcher,75,235.0,22.73 921 | 920,Chris_Schroder,WAS,Relief_Pitcher,75,210.0,28.53 922 | 921,Brett_Campbell,WAS,Relief_Pitcher,72,170.0,25.37 923 | 922,Beltran_Perez,WAS,Relief_Pitcher,74,180.0,25.35 924 | 923,Levale_Speigner,WAS,Relief_Pitcher,71,170.0,26.43 925 | 924,Jason_Bergmann,WAS,Relief_Pitcher,76,190.0,25.43 926 | 925,Saul_Rivera,WAS,Relief_Pitcher,71,150.0,29.23 927 | 926,Chris_Booker,WAS,Relief_Pitcher,75,230.0,30.22 928 | 927,Micah_Bowie,WAS,Relief_Pitcher,76,203.0,32.3 929 | 928,Jon_Rauch,WAS,Relief_Pitcher,83,260.0,28.42 930 | 929,Jerome_Williams,WAS,Relief_Pitcher,75,246.0,25.24 931 | 930,Luis_Ayala,WAS,Relief_Pitcher,74,186.0,29.13 932 | 931,Ryan_Wagner,WAS,Relief_Pitcher,76,210.0,24.63 933 | 932,Chad_Cordero,WAS,Relief_Pitcher,72,198.0,24.95 934 | 933,Humberto_Cota,PIT,Catcher,72,210.0,28.06 935 | 934,Ronny_Paulino,PIT,Catcher,75,215.0,25.86 936 | 935,Adam_LaRoche,PIT,First_Baseman,75,180.0,27.32 937 | 936,Ryan_Doumit,PIT,First_Baseman,72,200.0,25.91 938 | 937,Brad_Eldred,PIT,First_Baseman,77,245.0,26.63 939 | 938,Jose_Castillo,PIT,Second_Baseman,73,200.0,25.95 940 | 939,Jack_Wilson,PIT,Shortstop,72,192.0,29.17 941 | 940,Freddy_Sanchez,PIT,Third_Baseman,70,192.0,29.19 942 | 941,Jason_Bay,PIT,Outfielder,74,200.0,28.44 943 | 942,Jose_Bautista,PIT,Outfielder,72,192.0,26.36 944 | 943,Xavier_Nady,PIT,Outfielder,74,205.0,28.29 945 | 944,Jody_Gerut,PIT,Outfielder,72,190.0,29.45 946 | 945,Nate_McLouth,PIT,Outfielder,71,186.0,25.34 947 | 946,Chris_Duffy,PIT,Outfielder,70,170.0,26.86 948 | 947,Rajai_Davis,PIT,Outfielder,71,197.0,26.36 949 | 948,Shane_Youman,PIT,Starting_Pitcher,76,219.0,27.39 950 | 949,Yoslan_Herrera,PIT,Starting_Pitcher,74,200.0,25.84 951 | 950,Josh_Shortslef,PIT,Starting_Pitcher,76,220.0,25.08 952 | 951,Zach_Duke,PIT,Starting_Pitcher,74,207.0,23.87 953 | 952,Paul_Maholm,PIT,Starting_Pitcher,74,225.0,24.68 954 | 953,Tom_Gorzelanny,PIT,Starting_Pitcher,74,207.0,24.64 955 | 954,Shawn_Chacon,PIT,Starting_Pitcher,75,212.0,29.19 956 | 955,Tony_Armas_Jr.,PIT,Starting_Pitcher,75,225.0,28.84 957 | 956,Ian_Snell,PIT,Starting_Pitcher,71,170.0,25.33 958 | 957,Sean_Burnett,PIT,Starting_Pitcher,71,190.0,24.45 959 | 958,John_Grabow,PIT,Relief_Pitcher,74,210.0,28.32 960 | 959,Marty_McLeary,PIT,Relief_Pitcher,77,230.0,32.34 961 | 960,Salomon_Torres,PIT,Relief_Pitcher,71,210.0,34.97 962 | 961,Damaso_Marte,PIT,Relief_Pitcher,74,200.0,32.04 963 | 962,Matt_Capps,PIT,Relief_Pitcher,75,238.0,23.49 964 | 963,Josh_Sharpless,PIT,Relief_Pitcher,77,234.0,26.09 965 | 964,Bryan_Bullington,PIT,Relief_Pitcher,76,222.0,26.41 966 | 965,Jonah_Bayliss,PIT,Relief_Pitcher,74,200.0,26.55 967 | 966,Brian_Rogers,PIT,Relief_Pitcher,76,190.0,24.62 968 | 967,Juan_Perez,PIT,Relief_Pitcher,72,170.0,28.49 969 | 968,Bengie_Molina,SF,Catcher,71,220.0,32.61 970 | 969,Eliezer_Alfonzo,SF,Catcher,72,223.0,28.06 971 | 970,Lance_Niekro,SF,First_Baseman,75,210.0,28.08 972 | 971,Mark_Sweeney,SF,First_Baseman,73,215.0,37.34 973 | 972,Ray_Durham,SF,Second_Baseman,68,196.0,35.25 974 | 973,Kevin_Frandsen,SF,Second_Baseman,72,175.0,24.77 975 | 974,Omar_Vizquel,SF,Shortstop,69,175.0,39.85 976 | 975,Rich_Aurilia,SF,Third_Baseman,73,189.0,35.49 977 | 976,Pedro_Feliz,SF,Third_Baseman,73,205.0,31.84 978 | 977,Todd_Linden,SF,Outfielder,75,210.0,26.67 979 | 978,Dave_Roberts,SF,Outfielder,70,180.0,34.75 980 | 979,Jason_Ellison,SF,Outfielder,70,180.0,28.91 981 | 980,Randy_Winn,SF,Outfielder,74,197.0,32.73 982 | 981,Ryan_Klesko,SF,Outfielder,75,220.0,35.72 983 | 982,Barry_Bonds,SF,Outfielder,74,228.0,42.6 984 | 983,Fred_Lewis,SF,Outfielder,74,190.0,26.22 985 | 984,Kelyn_Acosta,SF,Starting_Pitcher,73,204.0,21.85 986 | 985,Jonathan_Sanchez,SF,Starting_Pitcher,74,165.0,24.28 987 | 986,Matt_Cain,SF,Starting_Pitcher,75,216.0,22.41 988 | 987,Matt_Morris,SF,Starting_Pitcher,77,220.0,32.56 989 | 988,Russ_Ortiz,SF,Starting_Pitcher,73,208.0,32.74 990 | 989,Noah_Lowry,SF,Starting_Pitcher,74,210.0,26.39 991 | 990,Barry_Zito,SF,Starting_Pitcher,76,215.0,28.8 992 | 991,Vinnie_Chulk,SF,Relief_Pitcher,74,195.0,28.2 993 | 992,Kevin_Correia,SF,Relief_Pitcher,75,200.0,26.52 994 | 993,Steve_Kline,SF,Relief_Pitcher,73,215.0,34.52 995 | 994,Armando_Benitez,SF,Relief_Pitcher,76,229.0,34.32 996 | 995,Scott_Munter,SF,Relief_Pitcher,78,240.0,26.98 997 | 996,Jack_Taschner,SF,Relief_Pitcher,75,207.0,28.86 998 | 997,Brian_Wilson,SF,Relief_Pitcher,73,205.0,24.96 999 | 998,Merkin_Valdez,SF,Relief_Pitcher,77,208.0,25.3 1000 | 999,Brad_Hennessey,SF,Relief_Pitcher,74,185.0,27.06 1001 | 1000,Billy_Sadler,SF,Relief_Pitcher,72,190.0,25.44 1002 | 1001,Pat_Misch,SF,Relief_Pitcher,74,170.0,25.53 1003 | 1002,Gary_Bennett,STL,Catcher,72,208.0,34.87 1004 | 1003,Yadier_Molina,STL,Catcher,71,225.0,24.63 1005 | 1004,John_Nelson,STL,First_Baseman,73,190.0,27.99 1006 | 1005,Albert_Pujols,STL,First_Baseman,75,225.0,27.12 1007 | 1006,Adam_Kennedy,STL,Second_Baseman,73,185.0,31.14 1008 | 1007,Aaron_Miles,STL,Second_Baseman,67,180.0,30.21 1009 | 1008,David_Eckstein,STL,Shortstop,67,165.0,32.11 1010 | 1009,Scott_Rolen,STL,Third_Baseman,76,240.0,31.91 1011 | 1010,Scott_Spiezio,STL,Third_Baseman,74,220.0,34.44 1012 | 1011,Jim_Edmonds,STL,Outfielder,73,212.0,36.68 1013 | 1012,So_Taguchi,STL,Outfielder,70,163.0,37.66 1014 | 1013,Juan_Encarnacion,STL,Outfielder,75,215.0,30.98 1015 | 1014,Skip_Schumaker,STL,Outfielder,70,175.0,27.07 1016 | 1015,John_Rodriguez,STL,Outfielder,72,205.0,29.11 1017 | 1016,Chris_Duncan,STL,Outfielder,77,210.0,25.82 1018 | 1017,Adam_Wainwright,STL,Starting_Pitcher,79,205.0,25.5 1019 | 1018,Mark_Mulder,STL,Starting_Pitcher,78,208.0,29.57 1020 | 1019,Anthony_Reyes,STL,Starting_Pitcher,74,215.0,25.37 1021 | 1020,Ryan_Franklin,STL,Starting_Pitcher,75,180.0,33.99 1022 | 1021,Kip_Wells,STL,Starting_Pitcher,75,200.0,29.86 1023 | 1022,Chris_Carpenter,STL,Starting_Pitcher,78,230.0,31.84 1024 | 1023,Russ_Springer,STL,Relief_Pitcher,76,211.0,38.31 1025 | 1024,Jason_Isringhausen,STL,Relief_Pitcher,75,230.0,34.48 1026 | 1025,Ricardo_Rincon,STL,Relief_Pitcher,69,190.0,36.88 1027 | 1026,Braden_Looper,STL,Relief_Pitcher,75,220.0,32.34 1028 | 1027,Randy_Flores,STL,Relief_Pitcher,72,180.0,31.58 1029 | 1028,Josh_Hancock,STL,Relief_Pitcher,75,205.0,28.89 1030 | 1029,Brad_Thompson,STL,Relief_Pitcher,73,190.0,25.08 1031 | 1030,Tyler_Johnson,STL,Relief_Pitcher,74,180.0,25.73 1032 | 1031,Chris_Narveson,STL,Relief_Pitcher,75,205.0,25.19 1033 | 1032,Randy_Keisler,STL,Relief_Pitcher,75,190.0,31.01 1034 | 1033,Josh_Kinney,STL,Relief_Pitcher,73,195.0,27.92 1035 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/mlib.py: -------------------------------------------------------------------------------- 1 | """MLOps Library""" 2 | 3 | import numpy as np 4 | import pandas as pd 5 | from sklearn.linear_model import Ridge 6 | import joblib 7 | from sklearn.preprocessing import StandardScaler 8 | from sklearn.model_selection import train_test_split 9 | import logging 10 | 11 | logging.basicConfig(level=logging.INFO) 12 | 13 | import warnings 14 | 15 | warnings.filterwarnings("ignore", category=UserWarning) 16 | 17 | 18 | def load_model(model="model.joblib"): 19 | """Grabs model from disk""" 20 | 21 | clf = joblib.load(model) 22 | return clf 23 | 24 | 25 | def data(): 26 | df = pd.read_csv("htwtmlb.csv") 27 | return df 28 | 29 | 30 | def retrain(tsize=0.1, model_name="model.joblib"): 31 | """Retrains the model 32 | 33 | See this notebook: Baseball_Predictions_Export_Model.ipynb 34 | """ 35 | df = data() 36 | y = df["Height"].values # Target 37 | y = y.reshape(-1, 1) 38 | X = df["Weight"].values # Feature(s) 39 | X = X.reshape(-1, 1) 40 | scaler = StandardScaler() 41 | X_scaler = scaler.fit(X) 42 | X = X_scaler.transform(X) 43 | y_scaler = scaler.fit(y) 44 | y = y_scaler.transform(y) 45 | X_train, X_test, y_train, y_test = train_test_split( 46 | X, y, test_size=tsize, random_state=3 47 | ) 48 | clf = Ridge() 49 | model = clf.fit(X_train, y_train) 50 | accuracy = model.score(X_test, y_test) 51 | logging.debug(f"Model Accuracy: {accuracy}") 52 | joblib.dump(model, model_name) 53 | return accuracy, model_name 54 | 55 | 56 | def format_input(x): 57 | """Takes int and converts to numpy array""" 58 | 59 | val = np.array(x) 60 | feature = val.reshape(-1, 1) 61 | return feature 62 | 63 | 64 | def scale_input(val): 65 | """Scales input to training feature values""" 66 | 67 | df = data() 68 | features = df["Weight"].values 69 | features = features.reshape(-1, 1) 70 | input_scaler = StandardScaler().fit(features) 71 | scaled_input = input_scaler.transform(val) 72 | return scaled_input 73 | 74 | 75 | def scale_target(target): 76 | """Scales Target 'y' Value""" 77 | 78 | df = data() 79 | y = df["Height"].values # Target 80 | y = y.reshape(-1, 1) # Reshape 81 | scaler = StandardScaler() 82 | y_scaler = scaler.fit(y) 83 | scaled_target = y_scaler.inverse_transform(target) 84 | return scaled_target 85 | 86 | 87 | def height_human(float_inches): 88 | """Takes float inches and converts to human height in ft/inches""" 89 | 90 | feet = int(round(float_inches / 12, 2)) # round down 91 | inches_left = round(float_inches - feet * 12) 92 | result = f"{feet} foot, {inches_left} inches" 93 | return result 94 | 95 | 96 | def human_readable_payload(predict_value): 97 | """Takes numpy array and returns back human readable dictionary""" 98 | 99 | height_inches = float(np.round(predict_value, 2)) 100 | result = { 101 | "height_inches": height_inches, 102 | "height_human_readable": height_human(height_inches), 103 | } 104 | return result 105 | 106 | 107 | def predict(weight): 108 | """Takes weight and predicts height""" 109 | 110 | clf = load_model() # loadmodel 111 | np_array_weight = format_input(weight) 112 | scaled_input_result = scale_input(np_array_weight) # scale feature input 113 | scaled_height_prediction = clf.predict(scaled_input_result) # scaled prediction 114 | height_predict = scale_target(scaled_height_prediction) 115 | payload = human_readable_payload(height_predict) 116 | predict_log_data = { 117 | "weight": weight, 118 | "scaled_input_result": scaled_input_result, 119 | "scaled_height_prediction": scaled_height_prediction, 120 | "height_predict": height_predict, 121 | "human_readable_payload": payload, 122 | } 123 | logging.debug(f"Prediction: {predict_log_data}") 124 | return payload 125 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/model.joblib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahgift/Python-MLOps-Cookbook/b9ed9ccd4604aa38eb91adeb59ff8bdde60b9e5a/recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/model.joblib -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/ml_hello_world/requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | scikit-learn==0.24.0 3 | pandas==1.2.3 4 | joblib==1.0.1 -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "Weight": 200 3 | } -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/predict-lambda.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # POST method predict. Put your lambda function here 4 | curl -d '{ 5 | "Weight":200 6 | }'\ 7 | -H "Content-Type: application/json" \ 8 | -X POST https://agdarbaa12.execute-api.us-east-1.amazonaws.com/Prod/predict -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/samconfig.toml: -------------------------------------------------------------------------------- 1 | version = 0.1 2 | [default] 3 | [default.deploy] 4 | [default.deploy.parameters] 5 | stack_name = "sam-ml-hello" 6 | s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-1odwjh0m3msn1" 7 | s3_prefix = "sam-ml-hello" 8 | region = "us-east-1" 9 | confirm_changeset = true 10 | capabilities = "CAPABILITY_IAM" 11 | image_repositories = ["HelloWorldMLFunction=561744971673.dkr.ecr.us-east-1.amazonaws.com/sam-ml-hello"] 12 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/template.yaml: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion: '2010-09-09' 2 | Transform: AWS::Serverless-2016-10-31 3 | Description: > 4 | python3.8 5 | 6 | Sample SAM Template for sam-ml-predict 7 | 8 | Globals: 9 | Function: 10 | Timeout: 3 11 | 12 | Resources: 13 | HelloWorldMLFunction: 14 | Type: AWS::Serverless::Function 15 | Properties: 16 | PackageType: Image 17 | Events: 18 | HelloWorld: 19 | Type: Api 20 | Properties: 21 | Path: /predict 22 | Method: post 23 | Metadata: 24 | Dockerfile: Dockerfile 25 | DockerContext: ./ml_hello_world 26 | DockerTag: python3.8-v1 27 | 28 | Outputs: 29 | HelloWorldMLApi: 30 | Description: "API Gateway endpoint URL for Prod stage for Hello World ML function" 31 | Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/predict/" 32 | HelloWorldMLFunction: 33 | Description: "Hello World ML Predict Lambda Function ARN" 34 | Value: !GetAtt HelloWorldMLFunction.Arn 35 | HelloWorldMLFunctionIamRole: 36 | Description: "Implicit IAM Role created for Hello World ML function" 37 | Value: !GetAtt HelloWorldMLFunctionRole.Arn 38 | -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahgift/Python-MLOps-Cookbook/b9ed9ccd4604aa38eb91adeb59ff8bdde60b9e5a/recipes/aws-lambda-sam/sam-ml-predict/tests/__init__.py -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/tests/unit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahgift/Python-MLOps-Cookbook/b9ed9ccd4604aa38eb91adeb59ff8bdde60b9e5a/recipes/aws-lambda-sam/sam-ml-predict/tests/unit/__init__.py -------------------------------------------------------------------------------- /recipes/aws-lambda-sam/sam-ml-predict/tests/unit/test_handler.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | import pytest 4 | 5 | from hello_world import app 6 | 7 | 8 | @pytest.fixture() 9 | def apigw_event(): 10 | """ Generates API GW Event""" 11 | 12 | return { 13 | "body": '{ "test": "body"}', 14 | "resource": "/{proxy+}", 15 | "requestContext": { 16 | "resourceId": "123456", 17 | "apiId": "1234567890", 18 | "resourcePath": "/{proxy+}", 19 | "httpMethod": "POST", 20 | "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", 21 | "accountId": "123456789012", 22 | "identity": { 23 | "apiKey": "", 24 | "userArn": "", 25 | "cognitoAuthenticationType": "", 26 | "caller": "", 27 | "userAgent": "Custom User Agent String", 28 | "user": "", 29 | "cognitoIdentityPoolId": "", 30 | "cognitoIdentityId": "", 31 | "cognitoAuthenticationProvider": "", 32 | "sourceIp": "127.0.0.1", 33 | "accountId": "", 34 | }, 35 | "stage": "prod", 36 | }, 37 | "queryStringParameters": {"foo": "bar"}, 38 | "headers": { 39 | "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", 40 | "Accept-Language": "en-US,en;q=0.8", 41 | "CloudFront-Is-Desktop-Viewer": "true", 42 | "CloudFront-Is-SmartTV-Viewer": "false", 43 | "CloudFront-Is-Mobile-Viewer": "false", 44 | "X-Forwarded-For": "127.0.0.1, 127.0.0.2", 45 | "CloudFront-Viewer-Country": "US", 46 | "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", 47 | "Upgrade-Insecure-Requests": "1", 48 | "X-Forwarded-Port": "443", 49 | "Host": "1234567890.execute-api.us-east-1.amazonaws.com", 50 | "X-Forwarded-Proto": "https", 51 | "X-Amz-Cf-Id": "aaaaaaaaaae3VYQb9jd-nvCd-de396Uhbp027Y2JvkCPNLmGJHqlaA==", 52 | "CloudFront-Is-Tablet-Viewer": "false", 53 | "Cache-Control": "max-age=0", 54 | "User-Agent": "Custom User Agent String", 55 | "CloudFront-Forwarded-Proto": "https", 56 | "Accept-Encoding": "gzip, deflate, sdch", 57 | }, 58 | "pathParameters": {"proxy": "/examplepath"}, 59 | "httpMethod": "POST", 60 | "stageVariables": {"baz": "qux"}, 61 | "path": "/examplepath", 62 | } 63 | 64 | 65 | def test_lambda_handler(apigw_event, mocker): 66 | 67 | ret = app.lambda_handler(apigw_event, "") 68 | data = json.loads(ret["body"]) 69 | 70 | assert ret["statusCode"] == 200 71 | assert "message" in ret["body"] 72 | assert data["message"] == "hello world" 73 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | scikit-learn==0.24.0 2 | pandas==1.2.3 3 | pylint==2.7.2 4 | pytest==6.2.2 5 | black==20.8b1 6 | click==7.1.2 7 | Flask==1.1.4 8 | markupsafe==2.0.1 9 | joblib==1.0.1 10 | pytest-cov==2.11.1 11 | requests==2.25.1 -------------------------------------------------------------------------------- /resize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB. 4 | SIZE=${1:-20} 5 | 6 | # Get the ID of the environment host Amazon EC2 instance. 7 | INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id) 8 | REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(.*\)[a-z]/\1/') 9 | 10 | # Get the ID of the Amazon EBS volume associated with the instance. 11 | VOLUMEID=$(aws ec2 describe-instances \ 12 | --instance-id $INSTANCEID \ 13 | --query "Reservations[0].Instances[0].BlockDeviceMappings[0].Ebs.VolumeId" \ 14 | --output text \ 15 | --region $REGION) 16 | 17 | # Resize the EBS volume. 18 | aws ec2 modify-volume --volume-id $VOLUMEID --size $SIZE 19 | 20 | # Wait for the resize to finish. 21 | while [ \ 22 | "$(aws ec2 describe-volumes-modifications \ 23 | --volume-id $VOLUMEID \ 24 | --filters Name=modification-state,Values="optimizing","completed" \ 25 | --query "length(VolumesModifications)"\ 26 | --output text)" != "1" ]; do 27 | sleep 1 28 | done 29 | 30 | #Check if we're on an NVMe filesystem 31 | if [[ -e "/dev/xvda" && $(readlink -f /dev/xvda) = "/dev/xvda" ]] 32 | then 33 | # Rewrite the partition table so that the partition takes up all the space that it can. 34 | sudo growpart /dev/xvda 1 35 | 36 | # Expand the size of the file system. 37 | # Check if we're on AL2 38 | STR=$(cat /etc/os-release) 39 | SUB="VERSION_ID=\"2\"" 40 | if [[ "$STR" == *"$SUB"* ]] 41 | then 42 | sudo xfs_growfs -d / 43 | else 44 | sudo resize2fs /dev/xvda1 45 | fi 46 | 47 | else 48 | # Rewrite the partition table so that the partition takes up all the space that it can. 49 | sudo growpart /dev/nvme0n1 1 50 | 51 | # Expand the size of the file system. 52 | # Check if we're on AL2 53 | STR=$(cat /etc/os-release) 54 | SUB="VERSION_ID=\"2\"" 55 | if [[ "$STR" == *"$SUB"* ]] 56 | then 57 | sudo xfs_growfs -d / 58 | else 59 | sudo resize2fs /dev/nvme0n1p1 60 | fi 61 | fi -------------------------------------------------------------------------------- /run_docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Build image 4 | #change tag for new container registery, gcr.io/bob 5 | docker build --tag=noahgift/mlops-cookbook . 6 | 7 | # List docker images 8 | docker image ls 9 | 10 | # Run flask app 11 | docker run -p 127.0.0.1:8080:8080 noahgift/mlops-cookbook -------------------------------------------------------------------------------- /test_mlib.py: -------------------------------------------------------------------------------- 1 | from mlib import format_input, scale_input, height_human 2 | import numpy as np 3 | import pytest 4 | from click.testing import CliRunner 5 | from cli import predictcli 6 | import utilscli 7 | from app import app as flask_app 8 | 9 | 10 | @pytest.fixture 11 | def test_array(): 12 | val = np.array(1) 13 | feature = val.reshape(-1, 1) 14 | return feature 15 | 16 | @pytest.fixture 17 | def app(): 18 | yield flask_app 19 | 20 | 21 | @pytest.fixture 22 | def client(app): 23 | return app.test_client() 24 | 25 | 26 | def test_format_input(test_array): 27 | assert test_array.shape == format_input(2).shape 28 | 29 | 30 | def test_scale_input(test_array): 31 | assert int(scale_input(test_array)) == int(np.array([[-9.56513601]])) 32 | 33 | 34 | def test_height_human(): 35 | assert "6 foot, 1 inches" == height_human(73.4) 36 | assert "5 foot, 11 inches" == height_human(71.1) 37 | 38 | 39 | def test_clisearch(): 40 | runner = CliRunner() 41 | result = runner.invoke(predictcli, ["--weight", "180"]) 42 | assert result.exit_code == 0 43 | assert "6 foot, 0 inches" in result.output 44 | 45 | 46 | def test_retrain(): 47 | runner = CliRunner() 48 | result = runner.invoke(utilscli.cli, ["--version"]) 49 | assert result.exit_code == 0 50 | 51 | 52 | # Smoke test Flask 53 | def test_index(app, client): 54 | res = client.get('/') 55 | assert res.status_code == 200 56 | expected = "Predict the Height From Weight of MLB Players" 57 | assert expected in res.get_data(as_text=True) -------------------------------------------------------------------------------- /utils/resize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB. 4 | SIZE=${1:-20} 5 | 6 | # Get the ID of the environment host Amazon EC2 instance. 7 | INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id) 8 | 9 | # Get the ID of the Amazon EBS volume associated with the instance. 10 | VOLUMEID=$(aws ec2 describe-instances \ 11 | --instance-id $INSTANCEID \ 12 | --query "Reservations[0].Instances[0].BlockDeviceMappings[0].Ebs.VolumeId" \ 13 | --output text) 14 | 15 | # Resize the EBS volume. 16 | aws ec2 modify-volume --volume-id $VOLUMEID --size $SIZE 17 | 18 | # Wait for the resize to finish. 19 | while [ \ 20 | "$(aws ec2 describe-volumes-modifications \ 21 | --volume-id $VOLUMEID \ 22 | --filters Name=modification-state,Values="optimizing","completed" \ 23 | --query "length(VolumesModifications)"\ 24 | --output text)" != "1" ]; do 25 | sleep 1 26 | done 27 | 28 | #Check if we're on an NVMe filesystem 29 | if [ $(readlink -f /dev/xvda) = "/dev/xvda" ] 30 | then 31 | # Rewrite the partition table so that the partition takes up all the space that it can. 32 | sudo growpart /dev/xvda 1 33 | 34 | # Expand the size of the file system. 35 | # Check if we are on AL2 36 | STR=$(cat /etc/os-release) 37 | SUB="VERSION_ID=\"2\"" 38 | if [[ "$STR" == *"$SUB"* ]] 39 | then 40 | sudo xfs_growfs -d / 41 | else 42 | sudo resize2fs /dev/xvda1 43 | fi 44 | 45 | else 46 | # Rewrite the partition table so that the partition takes up all the space that it can. 47 | sudo growpart /dev/nvme0n1 1 48 | 49 | # Expand the size of the file system. 50 | # Check if we're on AL2 51 | STR=$(cat /etc/os-release) 52 | SUB="VERSION_ID=\"2\"" 53 | if [[ "$STR" == *"$SUB"* ]] 54 | then 55 | sudo xfs_growfs -d / 56 | else 57 | sudo resize2fs /dev/nvme0n1p1 58 | fi 59 | fi -------------------------------------------------------------------------------- /utilscli.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import click 3 | import mlib 4 | import requests 5 | 6 | 7 | @click.group() 8 | @click.version_option("1.0") 9 | def cli(): 10 | """Machine Learning Utility Belt""" 11 | 12 | 13 | @cli.command("retrain") 14 | @click.option("--tsize", default=0.1, help="Test Size") 15 | def retrain(tsize): 16 | """Retrain Model 17 | 18 | You may want to extend this with more options, such as setting model_name 19 | """ 20 | 21 | click.echo(click.style("Retraining Model", bg="green", fg="white")) 22 | accuracy, model_name = mlib.retrain(tsize=tsize) 23 | click.echo( 24 | click.style(f"Retrained Model Accuracy: {accuracy}", bg="blue", fg="white") 25 | ) 26 | click.echo(click.style(f"Retrained Model Name: {model_name}", bg="red", fg="white")) 27 | 28 | 29 | @cli.command("predict") 30 | @click.option("--weight", default=225, help="Weight to Pass In") 31 | @click.option("--host", default="http://localhost:8080/predict", help="Host to query") 32 | def mkrequest(weight, host): 33 | """Sends prediction to ML Endpoint""" 34 | 35 | click.echo( 36 | click.style( 37 | f"Querying host {host} with weight: {weight}", bg="green", fg="white" 38 | ) 39 | ) 40 | payload = {"Weight": weight} 41 | result = requests.post(url=host, json=payload) 42 | click.echo(click.style(f"result: {result.text}", bg="red", fg="white")) 43 | 44 | 45 | if __name__ == "__main__": 46 | cli() 47 | --------------------------------------------------------------------------------