Building the FMBench Python package¶
If you would like to build a dev version of FMBench for your own development and testing purposes, the following steps describe how to do that.
-
Clone the
FMBenchrepo from GitHub, change directory tofoundation-model-benchmarking-tool. -
Install
uvand create a virtual environment with all the dependencies thatFMBenchneeds.curl -LsSf https://astral.sh/uv/install.sh | sh uv venv .fmbench_python312 && source .fmbench_python312/bin/activate && uv pip install --requirement pyproject.toml export UV_PROJECT_ENVIRONMENT=.fmbench_python312 uv add zmq python -m ipykernel install --user --name=.venv --display-name="Python (uv fmbench env)" sudo apt-get install tree -
Make any code changes as needed. If you want edit any notebooks in the
FMBenchthen selectPython (uv fmbench env)conda kernel for your notebook. -
Build the
FMBenchPython package. -
The
.whlfile is generated in thedistfolder. Install the.whlin your current Python environment. -
Run
FMBenchas usual through theFMBenchCLI command. -
You may have added new config files as part of your work, to make sure these files are called out in the
manifest.txtrun the following command. This command will overwrite the existingmanifest.txtandmanifest.mdfiles. Both these files need to be committed to the repo. Reach out to the maintainers of this repo so that they can add new or modified config files to the blogs bucket (the CloudFormation stack would fail if a new file is added to the manifest but is not available for download through the S3 bucket). -
To create updated documentation run the following command. You need to be added as a contributor to the
FMBenchrepo to be able to publish to the website, so this command would not work for you if you are not added as a contributor to the repo.