This document describes the process of releasing a new version of the MoE-Infinity-Rel package.
The release mechanism is fully automated through a GitHub Actions workflow, which is defined in the .github/workflows/publish.yml
file. This workflow triggers upon the creation and publication of a new version tag formatted as v*
within the repository.
To release a new version, such as version 1.0.0, please adhere to the following procedure:
- Update Version: Modify the version number in the setup.py file to reflect the new release version.
- Commit Changes: Commit these changes with an appropriate commit message that summarizes the update, such as "Update version for 1.0.0 release".
- Create and Push Tag: Tag the latest commit with the new version number and push the tag to the repository. Use the following commands to accomplish this:
git tag v1.0.0 git push origin v1.0.0
Upon the successful push of the tag, the workflow will creata a new release draft, build the package and publish it to the GitHub Package Registry and PyPI repositories.
For developers who prefer to manually build and publish their package to PyPI, the following steps provide a detailed guide to execute this process effectively.
- Start by cloning the repository and navigating to the root directory of the package:
git clone https://github.com/TorchMoE/MoE-Infinity.git cd MoE-Infinity
- Install the required dependencies to build the package:
pip install -r requirements.txt pip install build
- Build the source distribution and wheel for the package using:
This command generates the package files in the
BUILD_OPS=1 python -m build
dist/
directory. - Upload the built package to the PyPI repository using
twine
:Ensure that you have the necessary credentials configured fortwine upload dist/*
twine
to authenticate to PyPI.
To build the package wheel for multiple Python versions, you should execute the build process individually for each version by specifying the corresponding Python interpreter.