Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.10 for SageMaker Studio #104

Merged
merged 7 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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