doubleblindsubmission/Monet
0
1# Copyright 2024 Bytedance Ltd. and/or its affiliates2#3# Licensed under the Apache License, Version 2.0 (the "License");4# you may not use this file except in compliance with the License.5# You may obtain a copy of the License at6#7# http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# distributed under the License is distributed on an "AS IS" BASIS,11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12# See the License for the specific language governing permissions and13# limitations under the License.14 15import os16import re17 18from setuptools import find_packages, setup19 20 21def get_version() -> str:22 with open(os.path.join("verl", "__init__.py"), encoding="utf-8") as f:23 file_content = f.read()24 pattern = r"__version__\W*=\W*\"([^\"]+)\""25 (version,) = re.findall(pattern, file_content)26 return version27 28 29def get_requires() -> list[str]:30 with open("requirements.txt", encoding="utf-8") as f:31 file_content = f.read()32 lines = [line.strip() for line in file_content.strip().split("\n") if not line.startswith("#")]33 return lines34 35 36extra_require = {37 "dev": ["pre-commit", "ruff"],38}39 40 41def main():42 setup(43 name="verl",44 version=get_version(),45 description="An Efficient, Scalable, Multi-Modality RL Training Framework based on veRL",46 long_description=open("README.md", encoding="utf-8").read(),47 long_description_content_type="text/markdown",48 author="verl",49 author_email="zhangchi.usc1992@bytedance.com, gmsheng@connect.hku.hk, hiyouga@buaa.edu.cn",50 license="Apache 2.0 License",51 url="https://github.com/volcengine/verl",52 package_dir={"": "."},53 packages=find_packages(where="."),54 python_requires=">=3.9.0",55 install_requires=get_requires(),56 extras_require=extra_require,57 )58 59 60if __name__ == "__main__":61 main()62 