Skip to content

Commit

Permalink
Merge pull request #104 from athewsey/feat/py310
Browse files Browse the repository at this point in the history
Support Python 3.10 for SageMaker Studio
  • Loading branch information
antara678 authored Jun 11, 2024
2 parents 38cc2d9 + dfaf619 commit 74cd06e
Show file tree
Hide file tree
Showing 6 changed files with 1,762 additions and 1,158 deletions.
24 changes: 15 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
# Results and artifacts:
fmbench.log
executed_notebooks/
src/fmbench/results/
analytics/results/
results/
results-*/

# Python:
__pycache__/
.venv
dist/*

# Operating Systems:
.DS_Store

*.zip
*.zip
e.json
.DS_Store
.locks/*
./scripts/model.tar.gz
/data/models/*/endpoints.json
Expand All @@ -18,22 +32,14 @@ llama2_tokenizer/*
**/endpoint_path.txt
**/results_path.txt
metadata/*
**/DS_Store
.DS_Store
.fmbt/*
dist/*
tokenizer/*
src/fmbench/results/
src/fmbench/metadata/
src/fmbench/distilbert-base-uncased-v1-SageMaker/
distilbert-base-uncased-v1-SageMaker/
results/
llama2-7b-v1-SageMaker/
fmbench.log
llama2-13b-inf2-g5-p4d-v1-SageMaker/
llama2-70b-g5-p4d-trt-v1-SageMaker/
Llama2-7b-g4dn-SageMaker/
Llama2-7b-g4dn-g5-SageMaker/
llama2-70b-g5-inf2-tgi-v1-SageMaker/
results-*/
analytics/results/
11 changes: 6 additions & 5 deletions copy_s3_content.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
#!/bin/bash
set -e

# this scripts creates a local directory for running FMBench
# without any s3 dependency and copies all relevant files
# for public FMBench content
FMBENCH_READ_DIR=/tmp/fmbench-read
FMBENCH_WRITE_DIR=/tmp/fmbench-write
BUCKET=aws-blogs-artifacts-public

mkdir $FMBENCH_READ_DIR
mkdir -p $FMBENCH_WRITE_DIR
mkdir -p $FMBENCH_READ_DIR/tokenizer
mkdir -p $FMBENCH_READ_DIR/llama2_tokenizer
mkdir -p $FMBENCH_READ_DIR/llama3_tokenizer
mkdir -p $FMBENCH_READ_DIR/mistral_tokenizer
wget https://${BUCKET}.s3.amazonaws.com/artifacts/ML-FMBT/manifest.txt -P ${FMBENCH_READ_DIR}/
curl --output-dir ${FMBENCH_READ_DIR}/ -O https://${BUCKET}.s3.amazonaws.com/artifacts/ML-FMBT/manifest.txt

# copy each file of the public content for FMBench
for i in `cat ${FMBENCH_READ_DIR}/manifest.txt`
do
dir_path=`dirname $i`
mkdir -p ${FMBENCH_READ_DIR}/$dir_path
wget https://${BUCKET}.s3.amazonaws.com/artifacts/ML-FMBT/$i -P ${FMBENCH_READ_DIR}/$dir_path
curl --output-dir ${FMBENCH_READ_DIR}/$dir_path -O https://${BUCKET}.s3.amazonaws.com/artifacts/ML-FMBT/$i
done


10 changes: 7 additions & 3 deletions debug.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/bash
# script for a debug/developer workflow
# 1. Deletes the existing pfmbench package from the conda env
# 2. Builds and installs a new one
# 3. Runs fmbench as usual

set -e

CONDA_ENV_PATH=~/anaconda3/envs/fmbench_python311/lib/python3.11/site-packages
CONFIG_FILE_PATH=src/fmbench/configs/llama2/7b/config-llama2-7b-g5-quick.yml
CONFIG_FILE_PATH=src/fmbench/configs/llama2/7b/config-llama2-7b-g5-no-s3-quick.yml
LOGFILE=fmbench.log

# delete existing install
# delete existing install and built artifacts
rm -rf $CONDA_ENV_PATH/fmbench*
rm -rf dist

# build a new version
poetry build
pip install -U dist/*.whl
pip install -U --force-reinstall dist/*.whl

# run the newly installed version
echo "going to run fmbench now"
Expand Down
Loading

0 comments on commit 74cd06e

Please sign in to comment.