Skip to content

🕺 Migrate setup configuration from setup.py to setup.cfg and make rich an optional dep #3403

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

Merged
merged 13 commits into from
May 2, 2025

Conversation

qgallouedec
Copy link
Member

@qgallouedec qgallouedec commented May 2, 2025

  1. This PR moves all packaging configuration from setup.py to setup.cfg to adopt a declarative, standardized, and more maintainable setup format. This aligns with modern Python packaging practices recommended by PyPA and improves readability, tool compatibility, and static analysis support. setup.py is now minimal.
python -m build

gives

* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools >= 40.8.0
* Getting build dependencies for sdist...
running egg_info
writing trl.egg-info/PKG-INFO
writing dependency_links to trl.egg-info/dependency_links.txt
writing entry points to trl.egg-info/entry_points.txt
writing requirements to trl.egg-info/requires.txt
writing top-level names to trl.egg-info/top_level.txt
reading manifest file 'trl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'trl.egg-info/SOURCES.txt'
* Building sdist...
running sdist
running egg_info
writing trl.egg-info/PKG-INFO
writing dependency_links to trl.egg-info/dependency_links.txt
writing entry points to trl.egg-info/entry_points.txt
writing requirements to trl.egg-info/requires.txt
writing top-level names to trl.egg-info/top_level.txt
reading manifest file 'trl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'trl.egg-info/SOURCES.txt'
running check
creating trl-0.18.0.dev0
creating trl-0.18.0.dev0/tests
creating trl-0.18.0.dev0/tests/slow
creating trl-0.18.0.dev0/trl
creating trl-0.18.0.dev0/trl.egg-info
creating trl-0.18.0.dev0/trl/environment
creating trl-0.18.0.dev0/trl/extras
creating trl-0.18.0.dev0/trl/models
creating trl-0.18.0.dev0/trl/scripts
creating trl-0.18.0.dev0/trl/templates
creating trl-0.18.0.dev0/trl/trainer
copying files to trl-0.18.0.dev0...
copying CONTRIBUTING.md -> trl-0.18.0.dev0
copying LICENSE -> trl-0.18.0.dev0
copying MANIFEST.in -> trl-0.18.0.dev0
copying README.md -> trl-0.18.0.dev0
copying pyproject.toml -> trl-0.18.0.dev0
copying setup.cfg -> trl-0.18.0.dev0
copying setup.py -> trl-0.18.0.dev0
copying tests/__init__.py -> trl-0.18.0.dev0/tests
copying tests/test_alignprop_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_bco_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_best_of_n_sampler.py -> trl-0.18.0.dev0/tests
copying tests/test_callbacks.py -> trl-0.18.0.dev0/tests
copying tests/test_cli.py -> trl-0.18.0.dev0/tests
copying tests/test_cli_utils.py -> trl-0.18.0.dev0/tests
copying tests/test_collators.py -> trl-0.18.0.dev0/tests
copying tests/test_core.py -> trl-0.18.0.dev0/tests
copying tests/test_cpo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_data_collator_completion_only.py -> trl-0.18.0.dev0/tests
copying tests/test_data_utils.py -> trl-0.18.0.dev0/tests
copying tests/test_dataset_formatting.py -> trl-0.18.0.dev0/tests
copying tests/test_ddpo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_dpo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_environments.py -> trl-0.18.0.dev0/tests
copying tests/test_gkd_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_grpo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_iterative_sft_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_judges.py -> trl-0.18.0.dev0/tests
copying tests/test_kto_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_modeling_geometric_mixture_wrapper.py -> trl-0.18.0.dev0/tests
copying tests/test_modeling_value_head.py -> trl-0.18.0.dev0/tests
copying tests/test_nash_md_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_online_dpo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_orpo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_peft_models.py -> trl-0.18.0.dev0/tests
copying tests/test_ppo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_prm_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_reward_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_rich_progress_callback.py -> trl-0.18.0.dev0/tests
copying tests/test_rloo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_sft_trainer.py -> trl-0.18.0.dev0/tests
copying tests/test_trainers_args.py -> trl-0.18.0.dev0/tests
copying tests/test_utils.py -> trl-0.18.0.dev0/tests
copying tests/test_vllm_client_server.py -> trl-0.18.0.dev0/tests
copying tests/test_xpo_trainer.py -> trl-0.18.0.dev0/tests
copying tests/testing_constants.py -> trl-0.18.0.dev0/tests
copying tests/testing_utils.py -> trl-0.18.0.dev0/tests
copying tests/slow/__init__.py -> trl-0.18.0.dev0/tests/slow
copying tests/slow/test_dpo_slow.py -> trl-0.18.0.dev0/tests/slow
copying tests/slow/test_grpo_slow.py -> trl-0.18.0.dev0/tests/slow
copying tests/slow/test_sft_slow.py -> trl-0.18.0.dev0/tests/slow
copying tests/slow/testing_constants.py -> trl-0.18.0.dev0/tests/slow
copying trl/__init__.py -> trl-0.18.0.dev0/trl
copying trl/cli.py -> trl-0.18.0.dev0/trl
copying trl/core.py -> trl-0.18.0.dev0/trl
copying trl/data_utils.py -> trl-0.18.0.dev0/trl
copying trl/import_utils.py -> trl-0.18.0.dev0/trl
copying trl/mergekit_utils.py -> trl-0.18.0.dev0/trl
copying trl.egg-info/PKG-INFO -> trl-0.18.0.dev0/trl.egg-info
copying trl.egg-info/SOURCES.txt -> trl-0.18.0.dev0/trl.egg-info
copying trl.egg-info/dependency_links.txt -> trl-0.18.0.dev0/trl.egg-info
copying trl.egg-info/entry_points.txt -> trl-0.18.0.dev0/trl.egg-info
copying trl.egg-info/requires.txt -> trl-0.18.0.dev0/trl.egg-info
copying trl.egg-info/top_level.txt -> trl-0.18.0.dev0/trl.egg-info
copying trl/environment/__init__.py -> trl-0.18.0.dev0/trl/environment
copying trl/environment/base_environment.py -> trl-0.18.0.dev0/trl/environment
copying trl/extras/__init__.py -> trl-0.18.0.dev0/trl/extras
copying trl/extras/best_of_n_sampler.py -> trl-0.18.0.dev0/trl/extras
copying trl/extras/dataset_formatting.py -> trl-0.18.0.dev0/trl/extras
copying trl/extras/profiling.py -> trl-0.18.0.dev0/trl/extras
copying trl/extras/vllm_client.py -> trl-0.18.0.dev0/trl/extras
copying trl/models/__init__.py -> trl-0.18.0.dev0/trl/models
copying trl/models/auxiliary_modules.py -> trl-0.18.0.dev0/trl/models
copying trl/models/modeling_base.py -> trl-0.18.0.dev0/trl/models
copying trl/models/modeling_sd_base.py -> trl-0.18.0.dev0/trl/models
copying trl/models/modeling_value_head.py -> trl-0.18.0.dev0/trl/models
copying trl/models/sd_utils.py -> trl-0.18.0.dev0/trl/models
copying trl/models/utils.py -> trl-0.18.0.dev0/trl/models
copying trl/scripts/__init__.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/chat.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/dpo.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/env.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/grpo.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/kto.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/sft.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/utils.py -> trl-0.18.0.dev0/trl/scripts
copying trl/scripts/vllm_serve.py -> trl-0.18.0.dev0/trl/scripts
copying trl/templates/lm_model_card.md -> trl-0.18.0.dev0/trl/templates
copying trl/trainer/__init__.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/alignprop_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/alignprop_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/bco_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/bco_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/callbacks.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/cpo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/cpo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/ddpo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/ddpo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/dpo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/dpo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/gkd_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/gkd_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/grpo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/grpo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/iterative_sft_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/iterative_sft_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/judges.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/kto_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/kto_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/model_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/nash_md_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/nash_md_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/online_dpo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/online_dpo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/orpo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/orpo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/ppo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/ppo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/prm_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/prm_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/reward_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/reward_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/rloo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/rloo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/sft_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/sft_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/utils.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/xpo_config.py -> trl-0.18.0.dev0/trl/trainer
copying trl/trainer/xpo_trainer.py -> trl-0.18.0.dev0/trl/trainer
copying trl.egg-info/SOURCES.txt -> trl-0.18.0.dev0/trl.egg-info
Writing trl-0.18.0.dev0/setup.cfg
Creating tar archive
removing 'trl-0.18.0.dev0' (and everything under it)
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools >= 40.8.0
* Getting build dependencies for wheel...
running egg_info
writing trl.egg-info/PKG-INFO
writing dependency_links to trl.egg-info/dependency_links.txt
writing entry points to trl.egg-info/entry_points.txt
writing requirements to trl.egg-info/requires.txt
writing top-level names to trl.egg-info/top_level.txt
reading manifest file 'trl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'trl.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build/lib/trl
copying trl/data_utils.py -> build/lib/trl
copying trl/import_utils.py -> build/lib/trl
copying trl/core.py -> build/lib/trl
copying trl/mergekit_utils.py -> build/lib/trl
copying trl/__init__.py -> build/lib/trl
copying trl/cli.py -> build/lib/trl
creating build/lib/trl/trainer
copying trl/trainer/ppo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/grpo_config.py -> build/lib/trl/trainer
copying trl/trainer/ddpo_config.py -> build/lib/trl/trainer
copying trl/trainer/alignprop_trainer.py -> build/lib/trl/trainer
copying trl/trainer/online_dpo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/reward_trainer.py -> build/lib/trl/trainer
copying trl/trainer/iterative_sft_trainer.py -> build/lib/trl/trainer
copying trl/trainer/xpo_config.py -> build/lib/trl/trainer
copying trl/trainer/nash_md_config.py -> build/lib/trl/trainer
copying trl/trainer/alignprop_config.py -> build/lib/trl/trainer
copying trl/trainer/sft_config.py -> build/lib/trl/trainer
copying trl/trainer/callbacks.py -> build/lib/trl/trainer
copying trl/trainer/xpo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/online_dpo_config.py -> build/lib/trl/trainer
copying trl/trainer/grpo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/rloo_config.py -> build/lib/trl/trainer
copying trl/trainer/__init__.py -> build/lib/trl/trainer
copying trl/trainer/gkd_trainer.py -> build/lib/trl/trainer
copying trl/trainer/utils.py -> build/lib/trl/trainer
copying trl/trainer/reward_config.py -> build/lib/trl/trainer
copying trl/trainer/ppo_config.py -> build/lib/trl/trainer
copying trl/trainer/rloo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/judges.py -> build/lib/trl/trainer
copying trl/trainer/bco_trainer.py -> build/lib/trl/trainer
copying trl/trainer/sft_trainer.py -> build/lib/trl/trainer
copying trl/trainer/dpo_config.py -> build/lib/trl/trainer
copying trl/trainer/ddpo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/dpo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/cpo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/model_config.py -> build/lib/trl/trainer
copying trl/trainer/prm_config.py -> build/lib/trl/trainer
copying trl/trainer/gkd_config.py -> build/lib/trl/trainer
copying trl/trainer/bco_config.py -> build/lib/trl/trainer
copying trl/trainer/iterative_sft_config.py -> build/lib/trl/trainer
copying trl/trainer/orpo_trainer.py -> build/lib/trl/trainer
copying trl/trainer/orpo_config.py -> build/lib/trl/trainer
copying trl/trainer/prm_trainer.py -> build/lib/trl/trainer
copying trl/trainer/cpo_config.py -> build/lib/trl/trainer
copying trl/trainer/kto_config.py -> build/lib/trl/trainer
copying trl/trainer/nash_md_trainer.py -> build/lib/trl/trainer
copying trl/trainer/kto_trainer.py -> build/lib/trl/trainer
creating build/lib/trl/extras
copying trl/extras/profiling.py -> build/lib/trl/extras
copying trl/extras/__init__.py -> build/lib/trl/extras
copying trl/extras/vllm_client.py -> build/lib/trl/extras
copying trl/extras/dataset_formatting.py -> build/lib/trl/extras
copying trl/extras/best_of_n_sampler.py -> build/lib/trl/extras
creating build/lib/trl/scripts
copying trl/scripts/kto.py -> build/lib/trl/scripts
copying trl/scripts/env.py -> build/lib/trl/scripts
copying trl/scripts/chat.py -> build/lib/trl/scripts
copying trl/scripts/__init__.py -> build/lib/trl/scripts
copying trl/scripts/vllm_serve.py -> build/lib/trl/scripts
copying trl/scripts/utils.py -> build/lib/trl/scripts
copying trl/scripts/sft.py -> build/lib/trl/scripts
copying trl/scripts/dpo.py -> build/lib/trl/scripts
copying trl/scripts/grpo.py -> build/lib/trl/scripts
creating build/lib/trl/models
copying trl/models/modeling_value_head.py -> build/lib/trl/models
copying trl/models/modeling_sd_base.py -> build/lib/trl/models
copying trl/models/__init__.py -> build/lib/trl/models
copying trl/models/utils.py -> build/lib/trl/models
copying trl/models/modeling_base.py -> build/lib/trl/models
copying trl/models/auxiliary_modules.py -> build/lib/trl/models
copying trl/models/sd_utils.py -> build/lib/trl/models
creating build/lib/trl/environment
copying trl/environment/__init__.py -> build/lib/trl/environment
copying trl/environment/base_environment.py -> build/lib/trl/environment
creating build/lib/trl/templates
copying trl/templates/lm_model_card.md -> build/lib/trl/templates
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/trl
creating build/bdist.linux-x86_64/wheel/trl/trainer
copying build/lib/trl/trainer/ppo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/grpo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/ddpo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/alignprop_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/online_dpo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/reward_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/iterative_sft_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/xpo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/nash_md_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/alignprop_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/sft_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/callbacks.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/xpo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/online_dpo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/grpo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/rloo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/__init__.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/gkd_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/utils.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/reward_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/ppo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/rloo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/judges.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/bco_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/sft_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/dpo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/ddpo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/dpo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/cpo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/model_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/prm_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/gkd_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/bco_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/iterative_sft_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/orpo_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/orpo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/prm_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/cpo_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/kto_config.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/nash_md_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/trainer/kto_trainer.py -> build/bdist.linux-x86_64/wheel/./trl/trainer
copying build/lib/trl/data_utils.py -> build/bdist.linux-x86_64/wheel/./trl
copying build/lib/trl/import_utils.py -> build/bdist.linux-x86_64/wheel/./trl
copying build/lib/trl/core.py -> build/bdist.linux-x86_64/wheel/./trl
creating build/bdist.linux-x86_64/wheel/trl/extras
copying build/lib/trl/extras/profiling.py -> build/bdist.linux-x86_64/wheel/./trl/extras
copying build/lib/trl/extras/__init__.py -> build/bdist.linux-x86_64/wheel/./trl/extras
copying build/lib/trl/extras/vllm_client.py -> build/bdist.linux-x86_64/wheel/./trl/extras
copying build/lib/trl/extras/dataset_formatting.py -> build/bdist.linux-x86_64/wheel/./trl/extras
copying build/lib/trl/extras/best_of_n_sampler.py -> build/bdist.linux-x86_64/wheel/./trl/extras
copying build/lib/trl/mergekit_utils.py -> build/bdist.linux-x86_64/wheel/./trl
creating build/bdist.linux-x86_64/wheel/trl/scripts
copying build/lib/trl/scripts/kto.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/env.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/chat.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/__init__.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/vllm_serve.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/utils.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/sft.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/dpo.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/scripts/grpo.py -> build/bdist.linux-x86_64/wheel/./trl/scripts
copying build/lib/trl/__init__.py -> build/bdist.linux-x86_64/wheel/./trl
copying build/lib/trl/cli.py -> build/bdist.linux-x86_64/wheel/./trl
creating build/bdist.linux-x86_64/wheel/trl/templates
copying build/lib/trl/templates/lm_model_card.md -> build/bdist.linux-x86_64/wheel/./trl/templates
creating build/bdist.linux-x86_64/wheel/trl/models
copying build/lib/trl/models/modeling_value_head.py -> build/bdist.linux-x86_64/wheel/./trl/models
copying build/lib/trl/models/modeling_sd_base.py -> build/bdist.linux-x86_64/wheel/./trl/models
copying build/lib/trl/models/__init__.py -> build/bdist.linux-x86_64/wheel/./trl/models
copying build/lib/trl/models/utils.py -> build/bdist.linux-x86_64/wheel/./trl/models
copying build/lib/trl/models/modeling_base.py -> build/bdist.linux-x86_64/wheel/./trl/models
copying build/lib/trl/models/auxiliary_modules.py -> build/bdist.linux-x86_64/wheel/./trl/models
copying build/lib/trl/models/sd_utils.py -> build/bdist.linux-x86_64/wheel/./trl/models
creating build/bdist.linux-x86_64/wheel/trl/environment
copying build/lib/trl/environment/__init__.py -> build/bdist.linux-x86_64/wheel/./trl/environment
copying build/lib/trl/environment/base_environment.py -> build/bdist.linux-x86_64/wheel/./trl/environment
running install_egg_info
running egg_info
writing trl.egg-info/PKG-INFO
writing dependency_links to trl.egg-info/dependency_links.txt
writing entry points to trl.egg-info/entry_points.txt
writing requirements to trl.egg-info/requires.txt
writing top-level names to trl.egg-info/top_level.txt
reading manifest file 'trl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'trl.egg-info/SOURCES.txt'
Copying trl.egg-info to build/bdist.linux-x86_64/wheel/./trl-0.18.0.dev0-py3.12.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/trl-0.18.0.dev0.dist-info/WHEEL
creating '/fsx/qgallouedec/trl/dist/.tmp-hjg4629k/trl-0.18.0.dev0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'trl/__init__.py'
adding 'trl/cli.py'
adding 'trl/core.py'
adding 'trl/data_utils.py'
adding 'trl/import_utils.py'
adding 'trl/mergekit_utils.py'
adding 'trl/environment/__init__.py'
adding 'trl/environment/base_environment.py'
adding 'trl/extras/__init__.py'
adding 'trl/extras/best_of_n_sampler.py'
adding 'trl/extras/dataset_formatting.py'
adding 'trl/extras/profiling.py'
adding 'trl/extras/vllm_client.py'
adding 'trl/models/__init__.py'
adding 'trl/models/auxiliary_modules.py'
adding 'trl/models/modeling_base.py'
adding 'trl/models/modeling_sd_base.py'
adding 'trl/models/modeling_value_head.py'
adding 'trl/models/sd_utils.py'
adding 'trl/models/utils.py'
adding 'trl/scripts/__init__.py'
adding 'trl/scripts/chat.py'
adding 'trl/scripts/dpo.py'
adding 'trl/scripts/env.py'
adding 'trl/scripts/grpo.py'
adding 'trl/scripts/kto.py'
adding 'trl/scripts/sft.py'
adding 'trl/scripts/utils.py'
adding 'trl/scripts/vllm_serve.py'
adding 'trl/templates/lm_model_card.md'
adding 'trl/trainer/__init__.py'
adding 'trl/trainer/alignprop_config.py'
adding 'trl/trainer/alignprop_trainer.py'
adding 'trl/trainer/bco_config.py'
adding 'trl/trainer/bco_trainer.py'
adding 'trl/trainer/callbacks.py'
adding 'trl/trainer/cpo_config.py'
adding 'trl/trainer/cpo_trainer.py'
adding 'trl/trainer/ddpo_config.py'
adding 'trl/trainer/ddpo_trainer.py'
adding 'trl/trainer/dpo_config.py'
adding 'trl/trainer/dpo_trainer.py'
adding 'trl/trainer/gkd_config.py'
adding 'trl/trainer/gkd_trainer.py'
adding 'trl/trainer/grpo_config.py'
adding 'trl/trainer/grpo_trainer.py'
adding 'trl/trainer/iterative_sft_config.py'
adding 'trl/trainer/iterative_sft_trainer.py'
adding 'trl/trainer/judges.py'
adding 'trl/trainer/kto_config.py'
adding 'trl/trainer/kto_trainer.py'
adding 'trl/trainer/model_config.py'
adding 'trl/trainer/nash_md_config.py'
adding 'trl/trainer/nash_md_trainer.py'
adding 'trl/trainer/online_dpo_config.py'
adding 'trl/trainer/online_dpo_trainer.py'
adding 'trl/trainer/orpo_config.py'
adding 'trl/trainer/orpo_trainer.py'
adding 'trl/trainer/ppo_config.py'
adding 'trl/trainer/ppo_trainer.py'
adding 'trl/trainer/prm_config.py'
adding 'trl/trainer/prm_trainer.py'
adding 'trl/trainer/reward_config.py'
adding 'trl/trainer/reward_trainer.py'
adding 'trl/trainer/rloo_config.py'
adding 'trl/trainer/rloo_trainer.py'
adding 'trl/trainer/sft_config.py'
adding 'trl/trainer/sft_trainer.py'
adding 'trl/trainer/utils.py'
adding 'trl/trainer/xpo_config.py'
adding 'trl/trainer/xpo_trainer.py'
adding 'trl-0.18.0.dev0.dist-info/licenses/LICENSE'
adding 'trl-0.18.0.dev0.dist-info/METADATA'
adding 'trl-0.18.0.dev0.dist-info/WHEEL'
adding 'trl-0.18.0.dev0.dist-info/entry_points.txt'
adding 'trl-0.18.0.dev0.dist-info/top_level.txt'
adding 'trl-0.18.0.dev0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built trl-0.18.0.dev0.tar.gz and trl-0.18.0.dev0-py3-none-any.whl
  1. I've also rewritten a complete guide to making a TRL-specific release.
  2. Makes rich truly optional

@@ -1,4 +1,3 @@
include settings.ini
Copy link
Member Author

@qgallouedec qgallouedec May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no settings.ini in the package

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@qgallouedec qgallouedec changed the title Migrate setup configuration from setup.py to setup.cfg 🕺 Migrate setup configuration from setup.py to setup.cfg May 2, 2025
@qgallouedec qgallouedec changed the title 🕺 Migrate setup configuration from setup.py to setup.cfg 🕺 Migrate setup configuration from setup.py to setup.cfg and make rich an optional dep May 2, 2025
Copy link
Member

@lewtun lewtun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean up! LGTM with some nits.


This ensures that future patch releases (`v{major}.{minor}.1`, `v{major}.{minor}.2`, etc.) can be made separately from `main`.

#### 9. Create the wheels for your release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I automate some of these steps with make here: https://github.com/huggingface/alignment-handbook/blob/main/Makefile#L18

Might be handy if you're sick of manually writing all the commands out

git checkout -b release-v{major}.{minor}
```

#### 3. Change the version in the following files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could automate some of these steps with a script like this: https://github.com/huggingface/alignment-handbook/blob/main/src/alignment/release.py

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pointer! It might be a good idea to copy this into scripts, I'll do it in a future PR.

[options]
packages = find:
python_requires = >=3.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is set for EOL in October

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: python 3.13 should be soon supported: #2593

@qgallouedec qgallouedec merged commit 999acd5 into main May 2, 2025
10 checks passed
@qgallouedec qgallouedec deleted the setup-cfg branch May 2, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants