foundation-model-stack / fms-acceleration

🚀 Collection of libraries used with fms-hf-tuning to accelerate fine-tuning and training of large models.
Apache License 2.0
0 stars 4 forks source link

Improvements to Benchmark Scripts and Config Generation Workflow #13

Closed fabianlim closed 1 month ago

fabianlim commented 1 month ago

Improvements to benchmarks

From now on, all benchmarks need to run in tox environment for package version hygiene.

tox -e run_benches

In addition

Script for Producing CSV report

After running a few benchmarks, we can gather all the results into a single CSV report.

# do the following in the repo directory
# activate the tox environment
source .tox/run-benches/bin/activate

# run the display-bench-results.py on a directory with benchmark results 
# - say "benchmark_outputs"
PYTHONPATH= python scripts/benchmarks/display-bench-results.py benchmark_outputs

This will produce an output like this, and then the .csv report can be read by pandas.read_csv

***************** Report Created ******************
Total lines: '48'
Number columns included: '20'
Number columns excluded: '20'
Excluding number of exceptions caught: '0'
Written report to 'results.csv'

Improvements to Generate Configs

We added a new tox -e verify-configs to ensure that the configs are correctly generated.