agilerl 2.7.0.dev1__tar.gz → 2.7.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/workflows/linux-tests.yml +14 -16
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/workflows/macos-tests.yml +0 -1
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.gitignore +4 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.pre-commit-config.yaml +5 -2
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/PKG-INFO +1 -1
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/core/base.py +8 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/rollouts/on_policy.py +10 -5
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/algo_utils.py +27 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/torch_utils.py +1 -1
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/utils.py +3 -5
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/pyproject.toml +5 -4
- agilerl-2.7.0.dev2/tests/__init__.py +5 -0
- agilerl-2.7.0.dev2/tests/assets/build_minari_fixture.py +67 -0
- agilerl-2.7.0.dev2/tests/assets/build_tiny_llm_fixture.py +129 -0
- agilerl-2.7.0.dev2/tests/assets/minari_cache/D4RL/door/human-v2/data/main_data.hdf5 +0 -0
- agilerl-2.7.0.dev2/tests/assets/minari_cache/D4RL/door/human-v2/data/metadata.json +1 -0
- agilerl-2.7.0.dev2/tests/assets/minari_cache/D4RL/door/namespace_metadata.json +1 -0
- agilerl-2.7.0.dev2/tests/assets/minari_cache/D4RL/namespace_metadata.json +1 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/added_tokens.json +24 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/chat_template.jinja +54 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/config.json +32 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/generation_config.json +6 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/model.safetensors +0 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/special_tokens_map.json +31 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/tokenizer.json +757444 -0
- agilerl-2.7.0.dev2/tests/assets/tiny_llm/tokenizer_config.json +207 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/conftest.py +143 -14
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/helper_functions.py +7 -0
- agilerl-2.7.0.dev2/tests/pz_vector_test_utils.py +482 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/subprocess_runner.py +17 -5
- agilerl-2.7.0.dev2/tests/test_algorithms/test_bandits/test_neural_ts.py +500 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_bandits/test_neural_ucb.py +517 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_base.py +1679 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/test_bc_lm.py +380 -371
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/test_core_base.py +306 -14
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/test_llms/conftest.py +4 -3
- agilerl-2.7.0.dev2/tests/test_algorithms/test_llms/test_dpo.py +907 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_llms/test_fused_lora.py +125 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_llms/test_grpo.py +4859 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_llms/test_ppo_llm.py +1094 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_llms/test_reinforce_llm.py +962 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_llms/test_sft.py +917 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_llms/test_vllm.py +143 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_multi_agent/test_ippo.py +2199 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_multi_agent/test_maddpg.py +1813 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_multi_agent/test_matd3.py +1972 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent/test_cqn.py +573 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent/test_ddpg.py +834 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent/test_dqn.py +598 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent/test_dqn_rainbow.py +799 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent/test_ilql.py +1147 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent/test_ppo.py +2073 -0
- agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent/test_td3.py +1070 -0
- agilerl-2.7.0.dev2/tests/test_components/test_multi_agent_replay_buffer.py +638 -0
- agilerl-2.7.0.dev2/tests/test_components/test_replay_buffer.py +1056 -0
- agilerl-2.7.0.dev2/tests/test_components/test_replay_data.py +170 -0
- agilerl-2.7.0.dev2/tests/test_components/test_sampler.py +487 -0
- agilerl-2.7.0.dev2/tests/test_components/test_segment_tree.py +129 -0
- agilerl-2.7.0.dev2/tests/test_data.py +456 -0
- agilerl-2.7.0.dev2/tests/test_hpo/test_mutation.py +2191 -0
- agilerl-2.7.0.dev2/tests/test_hpo/test_tournament.py +523 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_init.py +8 -6
- agilerl-2.7.0.dev2/tests/test_modules/test_base.py +957 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_bert.py +380 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_cnn.py +990 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_configs.py +85 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_custom_activation.py +26 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_dummy.py +77 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_gpt.py +416 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_lstm.py +494 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_mlp.py +291 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_multi_input.py +1103 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_resnet.py +386 -0
- agilerl-2.7.0.dev2/tests/test_modules/test_simba.py +357 -0
- agilerl-2.7.0.dev2/tests/test_networks/test_actors.py +854 -0
- agilerl-2.7.0.dev2/tests/test_networks/test_base.py +550 -0
- agilerl-2.7.0.dev2/tests/test_networks/test_distributions.py +279 -0
- agilerl-2.7.0.dev2/tests/test_networks/test_q_networks.py +638 -0
- agilerl-2.7.0.dev2/tests/test_networks/test_value_functions.py +190 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_protocols.py +214 -185
- agilerl-2.7.0.dev2/tests/test_rollouts/test_on_policy.py +393 -0
- agilerl-2.7.0.dev2/tests/test_train/test_train.py +5482 -0
- agilerl-2.7.0.dev2/tests/test_train/test_train_llm.py +2771 -0
- agilerl-2.7.0.dev2/tests/test_utils/test_algo_utils.py +1951 -0
- agilerl-2.7.0.dev2/tests/test_utils/test_cache.py +62 -0
- agilerl-2.7.0.dev2/tests/test_utils/test_ilql_utils.py +82 -0
- agilerl-2.7.0.dev2/tests/test_utils/test_llm_utils.py +1284 -0
- agilerl-2.7.0.dev2/tests/test_utils/test_log_utils.py +213 -0
- agilerl-2.7.0.dev2/tests/test_utils/test_minari_utils.py +307 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_utils/test_ppo_value_head.py +0 -2
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_utils/test_probe_envs.py +275 -265
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_utils/test_probe_envs_ma.py +182 -172
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_utils/test_sampling_utils.py +1 -1
- agilerl-2.7.0.dev2/tests/test_utils/test_torch_utils.py +317 -0
- agilerl-2.7.0.dev2/tests/test_utils/test_utils.py +1204 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_utils/test_utils_evolvable.py +123 -118
- agilerl-2.7.0.dev2/tests/test_vector/test_vector.py +1758 -0
- agilerl-2.7.0.dev2/tests/test_wrappers/test_agent.py +1549 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_wrappers/test_autoreset.py +126 -116
- agilerl-2.7.0.dev2/tests/test_wrappers/test_bandit_env.py +50 -0
- agilerl-2.7.0.dev2/tests/test_wrappers/test_llm_envs.py +1186 -0
- agilerl-2.7.0.dev2/tests/test_wrappers/test_make_evolvable.py +1309 -0
- agilerl-2.7.0.dev2/tests/test_wrappers/test_multiturn_wrappers.py +872 -0
- agilerl-2.7.0.dev2/tests/test_wrappers/test_skills.py +62 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/utils.py +6 -1
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/uv.lock +244 -248
- agilerl-2.7.0.dev1/CLAUDE.md +0 -139
- agilerl-2.7.0.dev1/DQN_LEARNING_ALGORITHM_ANALYSIS.md +0 -309
- agilerl-2.7.0.dev1/DQN_LEARNING_ANALYSIS.md +0 -168
- agilerl-2.7.0.dev1/GPU_CLEANUP_ANALYSIS.md +0 -541
- agilerl-2.7.0.dev1/find_dqn_commit.sh +0 -82
- agilerl-2.7.0.dev1/saved_checkpoints/debug_matrix/multiturn:GRPO:pop1:no_tournament/attributes.pt +0 -0
- agilerl-2.7.0.dev1/saved_checkpoints/debug_matrix/multiturn:LLMPPO:pop1:no_tournament/attributes.pt +0 -0
- agilerl-2.7.0.dev1/saved_checkpoints/debug_matrix/multiturn:LLMReinforce:pop1:no_tournament/attributes.pt +0 -0
- agilerl-2.7.0.dev1/saved_checkpoints/debug_matrix/preference:DPO:pop1:no_tournament/attributes.pt +0 -0
- agilerl-2.7.0.dev1/saved_checkpoints/debug_matrix/reasoning:GRPO:pop1:no_tournament/attributes.pt +0 -0
- agilerl-2.7.0.dev1/saved_checkpoints/debug_matrix/reasoning:LLMPPO:pop1:no_tournament/attributes.pt +0 -0
- agilerl-2.7.0.dev1/saved_checkpoints/debug_matrix/reasoning:LLMReinforce:pop1:no_tournament/attributes.pt +0 -0
- agilerl-2.7.0.dev1/tests/pz_vector_test_utils.py +0 -245
- agilerl-2.7.0.dev1/tests/test_algorithms/test_bandits/test_neural_ts.py +0 -478
- agilerl-2.7.0.dev1/tests/test_algorithms/test_bandits/test_neural_ucb.py +0 -490
- agilerl-2.7.0.dev1/tests/test_algorithms/test_base.py +0 -1630
- agilerl-2.7.0.dev1/tests/test_algorithms/test_llms/test_dpo.py +0 -989
- agilerl-2.7.0.dev1/tests/test_algorithms/test_llms/test_fused_lora.py +0 -126
- agilerl-2.7.0.dev1/tests/test_algorithms/test_llms/test_grpo.py +0 -4218
- agilerl-2.7.0.dev1/tests/test_algorithms/test_llms/test_ppo_llm.py +0 -1094
- agilerl-2.7.0.dev1/tests/test_algorithms/test_llms/test_reinforce_llm.py +0 -944
- agilerl-2.7.0.dev1/tests/test_algorithms/test_llms/test_sft.py +0 -919
- agilerl-2.7.0.dev1/tests/test_algorithms/test_llms/test_vllm.py +0 -135
- agilerl-2.7.0.dev1/tests/test_algorithms/test_multi_agent/test_ippo.py +0 -2066
- agilerl-2.7.0.dev1/tests/test_algorithms/test_multi_agent/test_maddpg.py +0 -1649
- agilerl-2.7.0.dev1/tests/test_algorithms/test_multi_agent/test_matd3.py +0 -1789
- agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent/test_cqn.py +0 -567
- agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent/test_ddpg.py +0 -775
- agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent/test_dqn.py +0 -607
- agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent/test_dqn_rainbow.py +0 -782
- agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent/test_ilql.py +0 -1157
- agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent/test_ppo.py +0 -2027
- agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent/test_td3.py +0 -1027
- agilerl-2.7.0.dev1/tests/test_components/test_multi_agent_replay_buffer.py +0 -629
- agilerl-2.7.0.dev1/tests/test_components/test_replay_buffer.py +0 -1051
- agilerl-2.7.0.dev1/tests/test_components/test_replay_data.py +0 -174
- agilerl-2.7.0.dev1/tests/test_components/test_sampler.py +0 -479
- agilerl-2.7.0.dev1/tests/test_components/test_segment_tree.py +0 -126
- agilerl-2.7.0.dev1/tests/test_data.py +0 -452
- agilerl-2.7.0.dev1/tests/test_hpo/test_mutation.py +0 -2119
- agilerl-2.7.0.dev1/tests/test_hpo/test_tournament.py +0 -521
- agilerl-2.7.0.dev1/tests/test_modules/test_base.py +0 -934
- agilerl-2.7.0.dev1/tests/test_modules/test_bert.py +0 -361
- agilerl-2.7.0.dev1/tests/test_modules/test_cnn.py +0 -972
- agilerl-2.7.0.dev1/tests/test_modules/test_configs.py +0 -79
- agilerl-2.7.0.dev1/tests/test_modules/test_custom_activation.py +0 -23
- agilerl-2.7.0.dev1/tests/test_modules/test_dummy.py +0 -79
- agilerl-2.7.0.dev1/tests/test_modules/test_gpt.py +0 -343
- agilerl-2.7.0.dev1/tests/test_modules/test_lstm.py +0 -488
- agilerl-2.7.0.dev1/tests/test_modules/test_mlp.py +0 -270
- agilerl-2.7.0.dev1/tests/test_modules/test_multi_input.py +0 -1055
- agilerl-2.7.0.dev1/tests/test_modules/test_resnet.py +0 -374
- agilerl-2.7.0.dev1/tests/test_modules/test_simba.py +0 -345
- agilerl-2.7.0.dev1/tests/test_networks/test_actors.py +0 -834
- agilerl-2.7.0.dev1/tests/test_networks/test_base.py +0 -534
- agilerl-2.7.0.dev1/tests/test_networks/test_distributions.py +0 -281
- agilerl-2.7.0.dev1/tests/test_networks/test_q_networks.py +0 -597
- agilerl-2.7.0.dev1/tests/test_networks/test_value_functions.py +0 -181
- agilerl-2.7.0.dev1/tests/test_rollouts/test_on_policy.py +0 -383
- agilerl-2.7.0.dev1/tests/test_train/test_train.py +0 -5428
- agilerl-2.7.0.dev1/tests/test_train/test_train_llm.py +0 -2736
- agilerl-2.7.0.dev1/tests/test_utils/__init__.py +0 -0
- agilerl-2.7.0.dev1/tests/test_utils/test_algo_utils.py +0 -1963
- agilerl-2.7.0.dev1/tests/test_utils/test_cache.py +0 -55
- agilerl-2.7.0.dev1/tests/test_utils/test_ilql_utils.py +0 -82
- agilerl-2.7.0.dev1/tests/test_utils/test_llm_utils.py +0 -1257
- agilerl-2.7.0.dev1/tests/test_utils/test_log_utils.py +0 -211
- agilerl-2.7.0.dev1/tests/test_utils/test_minari_utils.py +0 -280
- agilerl-2.7.0.dev1/tests/test_utils/test_torch_utils.py +0 -329
- agilerl-2.7.0.dev1/tests/test_utils/test_utils.py +0 -1214
- agilerl-2.7.0.dev1/tests/test_vector/test_vector.py +0 -1702
- agilerl-2.7.0.dev1/tests/test_wrappers/__init__.py +0 -0
- agilerl-2.7.0.dev1/tests/test_wrappers/test_agent.py +0 -1485
- agilerl-2.7.0.dev1/tests/test_wrappers/test_bandit_env.py +0 -40
- agilerl-2.7.0.dev1/tests/test_wrappers/test_llm_envs.py +0 -1163
- agilerl-2.7.0.dev1/tests/test_wrappers/test_make_evolvable.py +0 -1262
- agilerl-2.7.0.dev1/tests/test_wrappers/test_multiturn_wrappers.py +0 -859
- agilerl-2.7.0.dev1/tests/test_wrappers/test_skills.py +0 -61
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/badges/arena-github-badge.svg +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/codeql/install_codeql.sh +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/codeql/run_codeql.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/dependabot.yml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/workflows/codeql.yml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.github/workflows/windows-tests.yml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/.readthedocs.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/CITATION.cff +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/CODE_OF_CONDUCT.md +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/CONTRIBUTING.md +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/LICENSE +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/README.md +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/bc_lm.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/cispo.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/core/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/core/fused_lora.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/core/optimizer_wrapper.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/core/registry.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/cqn.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/ddpg.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/dpo.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/dqn.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/dqn_rainbow.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/grpo.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/gspo.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/ilql.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/ippo.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/maddpg.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/matd3.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/neural_ts_bandit.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/neural_ucb_bandit.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/ppo.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/ppo_llm.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/reinforce_llm.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/sft.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/algorithms/td3.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/components/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/components/data.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/components/multi_agent_replay_buffer.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/components/replay_buffer.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/components/rollout_buffer.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/components/sampler.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/components/segment_tree.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/data/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/data/language_environment.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/data/rl_data.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/data/tokenizer.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/data/torch_datasets.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/hpo/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/hpo/mutation.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/hpo/tournament.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/base.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/preference.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/reasoning.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/search.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/sft.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/sync_vec_env.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/llm_envs/token_observation.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/base.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/bert.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/cnn.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/configs.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/custom_components.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/dummy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/gpt.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/lstm.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/mlp.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/multi_input.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/resnet.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/modules/simba.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/networks/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/networks/actors.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/networks/base.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/networks/custom_modules.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/networks/distributions.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/networks/q_networks.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/networks/value_networks.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/protocols.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/rollouts/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/train_bandits.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/train_llm.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/train_multi_agent_off_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/train_multi_agent_on_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/train_off_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/train_offline.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/training/train_on_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/typing.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/cache.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/evolvable_networks.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/ilql_utils.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/llm_utils.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/log_utils.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/minari_utils.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/ppo_value_head.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/probe_envs.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/probe_envs_llm.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/probe_envs_ma.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/utils/sampling_utils.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/vector/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/vector/pz_async_vec_env.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/vector/pz_vec_env.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/wrappers/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/wrappers/agent.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/wrappers/learning.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/wrappers/llm_envs.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/wrappers/make_evolvable.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/wrappers/pettingzoo_wrappers.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/agilerl/wrappers/utils.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_bandits.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_llm_multiturn.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_llm_preference.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_llm_reasoning.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_multi_agent_off_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_multi_agent_on_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_off_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_off_policy_distributed.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_offline.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_offline_distributed.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_on_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_rainbow.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_recurrent.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_resnet.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_sft.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/benchmarking_simba.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/configs/ds_config.json +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/make_evolvable_benchmarking.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/benchmarking/networks.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/accelerate/accelerate.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/accelerate/grpo_accelerate_config.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/bandit/neural_ts.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/bandit/neural_ucb.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/cqn.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/ddpg/ddpg.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/ddpg/ddpg_lstm.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/ddpg/ddpg_simba.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/dqn/dqn.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/dqn/dqn_lstm.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/dqn/dqn_rainbow.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/llm_finetuning/cispo.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/llm_finetuning/dpo.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/llm_finetuning/grpo.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/llm_finetuning/grpo_multiturn.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/llm_finetuning/gspo.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/llm_finetuning/ppo_llm.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/llm_finetuning/reinforce_llm.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/multi_agent/ippo.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/multi_agent/ippo_pong.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/multi_agent/maddpg.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/multi_agent/matd3.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/multi_input.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/ppo/ppo.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/ppo/ppo_image.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/ppo/ppo_recurrent.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/sft.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/configs/training/td3.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/data/cartpole/cartpole_random_v1.1.0.h5 +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/data/cartpole/cartpole_v1.1.0.h5 +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/data/pendulum/pendulum_random_v1.1.0.h5 +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/data/pendulum/pendulum_v1.1.0.h5 +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/bandits/demo_bandit.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/config_load.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/configs/grpo_constant_target.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/configs/grpo_grid_navigation.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/configs/ppo_conditional_target.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/configs/ppo_constant_target.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/configs/ppo_grid_navigation.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/configs/ppo_multi_input.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/configs/ppo_value_head.yaml +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/debugging_llm.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/debugging_llm_stage_1.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/debugging_llm_stage_2.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/debugging_llm_stage_3.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/debugging_llm_training_matrix.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/debugging_value.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/llm_debug_utils.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/debugging/tiny_model.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/llm/demo_llm_finetuning.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/multi_agent/demo_multi_agent.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_custom_network.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_off_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_off_policy_distributed.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_offline.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_offline_distributed.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_on_policy.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_on_policy_rnn_cartpole.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_on_policy_rnn_memory.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/demo_on_policy_rnn_minigrid.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/performance_flamegraph_cartpole.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/performance_flamegraph_lunar_lander.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/performance_flamegraph_lunar_lander_rnn.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/demos/single_agent/performance_flamegraph_rnn_memory.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/Makefile +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/arena-github-badge.svg +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/css/custom.css +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/favicon.ico +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/js/expand_sidebar.js +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/logo_teal.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/logo_white.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/module.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/network.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/thumbnails/iris-thumbnail.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/thumbnails/pendigits-thumbnail.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/thumbnails/rainbow_performance.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/_static/thumbnails/simba_thumbnail.png +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/base.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/cispo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/cql.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/ddpg.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/dpo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/dqn.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/dqn_rainbow.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/grpo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/gspo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/ilql.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/ippo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/llmppo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/llmreinforce.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/maddpg.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/matd3.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/neural_ts.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/neural_ucb.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/ppo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/registry.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/sft.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/td3.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/algorithms/wrappers.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/components/data.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/components/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/components/multi_agent_replay_buffer.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/components/replay_buffer.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/components/rollout_buffer.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/components/sampler.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/components/segment_tree.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/hpo/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/hpo/mutation.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/hpo/tournament.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/base.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/bert.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/cnn.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/custom_activation.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/dummy.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/gpt.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/lstm.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/mlp.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/multi_input.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/resnet.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/modules/simba.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/networks/actors.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/networks/base.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/networks/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/networks/q_networks.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/networks/value_networks.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/rollouts/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/rollouts/on_policy.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/train.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/algo_utils.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/cache.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/evolvable_networks.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/ilql_utils.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/llm_utils.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/log_utils.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/minari_utils.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/probe_envs.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/torch_utils.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/utils/utils.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/vector/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/vector/petting_zoo_async_vector_env.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/vector/petting_zoo_vector_env.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/wrappers/agent.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/wrappers/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/wrappers/learning.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/wrappers/llm_envs.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/wrappers/make_evolvable.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/api/wrappers/pettingzoo.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/bandits/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/conf.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/custom_algorithms/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/debugging_rl/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/distributed_training/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/evo_hyperparam_opt/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/evolvable_networks/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/get_started/agilerl2changes.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/get_started/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/llm_finetuning/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/llm_finetuning/llm_checkpoints.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/make.bat +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/multi_agent_training/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/off_policy/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/offline_training/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/on_policy/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/pomdp/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/releases/index.rst +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/docs/requirements.txt +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/sitecustomize.py +0 -0
- {agilerl-2.7.0.dev1/debugging → agilerl-2.7.0.dev2/tests/test_algorithms}/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/conftest.py +0 -0
- {agilerl-2.7.0.dev1/tests → agilerl-2.7.0.dev2/tests/test_algorithms/test_bandits}/__init__.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_algorithms → agilerl-2.7.0.dev2/tests/test_algorithms/test_llms}/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/test_llms/test_llm_checkpoint.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_algorithms/test_bandits → agilerl-2.7.0.dev2/tests/test_algorithms/test_multi_agent}/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/test_multi_agent/conftest.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/test_optimizer_wrapper.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_algorithms/test_registry.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_algorithms/test_llms → agilerl-2.7.0.dev2/tests/test_algorithms/test_single_agent}/__init__.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_algorithms/test_multi_agent → agilerl-2.7.0.dev2/tests/test_components}/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_components/test_rollout_buffer.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_algorithms/test_single_agent → agilerl-2.7.0.dev2/tests/test_hpo}/__init__.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_components → agilerl-2.7.0.dev2/tests/test_modules}/__init__.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_hpo → agilerl-2.7.0.dev2/tests/test_networks}/__init__.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_modules → agilerl-2.7.0.dev2/tests/test_utils}/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_utils/test_probe_envs_llm.py +0 -0
- {agilerl-2.7.0.dev1/tests/test_networks → agilerl-2.7.0.dev2/tests/test_wrappers}/__init__.py +0 -0
- {agilerl-2.7.0.dev1 → agilerl-2.7.0.dev2}/tests/test_wrappers/test_ppo_test_method.py +0 -0
|
@@ -73,22 +73,20 @@ jobs:
|
|
|
73
73
|
- name: Reset coverage data
|
|
74
74
|
run: rm -f .coverage .coverage.*
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- name: Generate coverage report
|
|
91
|
-
run: uv run coverage xml -o coverage.xml
|
|
76
|
+
# Single phase: `-n auto --dist loadgroup` from pyproject gives 8
|
|
77
|
+
# workers on the gha-runner-scale-set node. `vllm`- and `gpu`-marked
|
|
78
|
+
# tests share the 4 `gputest0..gputest3` xdist groups defined in
|
|
79
|
+
# `tests/conftest.py`, which caps GPU-touching concurrency at 4
|
|
80
|
+
# workers regardless of -n; the remaining ~4 workers fan out across
|
|
81
|
+
# CPU-only tests. See the `pytest_collection_modifyitems` docstring
|
|
82
|
+
# for the GPU-memory and port-race rationale behind the 4-group cap.
|
|
83
|
+
#
|
|
84
|
+
# Single invocation = single coverage run; pytest-cov auto-combines
|
|
85
|
+
# the per-worker `.coverage.*` shards before writing `coverage.xml`,
|
|
86
|
+
# so we don't need a manual `coverage combine` step (which was
|
|
87
|
+
# tripping over corrupted shards under the old two-phase setup).
|
|
88
|
+
- name: Run tests
|
|
89
|
+
run: uv run pytest --exitfirst --cov=agilerl --cov-report=xml --durations=0 --durations-min=1.0
|
|
92
90
|
|
|
93
91
|
- name: Upload coverage reports to Codecov
|
|
94
92
|
uses: codecov/codecov-action@v3
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
# See https://pre-commit.com for more information
|
|
3
3
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
4
|
+
|
|
5
|
+
# Vendored binary test fixtures; opaque to every hook here.
|
|
6
|
+
exclude: ^tests/assets/tiny_llm/
|
|
4
7
|
ci:
|
|
5
8
|
autoupdate_branch: nightly
|
|
6
9
|
skip: [codeql-python]
|
|
@@ -32,7 +35,7 @@ repos:
|
|
|
32
35
|
- --skip=*.css,*.js,*.map,*.scss,*.svg
|
|
33
36
|
- --ignore-words-list=magent,pres,roate
|
|
34
37
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
35
|
-
rev: v0.15.
|
|
38
|
+
rev: v0.15.12
|
|
36
39
|
hooks:
|
|
37
40
|
- id: ruff
|
|
38
41
|
name: Ruff Linter
|
|
@@ -47,7 +50,7 @@ repos:
|
|
|
47
50
|
|
|
48
51
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
49
52
|
# uv version.
|
|
50
|
-
rev: 0.11.
|
|
53
|
+
rev: 0.11.8
|
|
51
54
|
hooks:
|
|
52
55
|
- id: uv-lock
|
|
53
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agilerl
|
|
3
|
-
Version: 2.7.0.
|
|
3
|
+
Version: 2.7.0.dev2
|
|
4
4
|
Summary: AgileRL is a deep reinforcement learning library focused on improving RL development through RLOps.
|
|
5
5
|
Author-email: Nick Ustaran-Anderegg <dev@agilerl.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -4599,6 +4599,14 @@ class LLMAlgorithm(EvolvableAlgorithm, ABC):
|
|
|
4599
4599
|
llm_kwargs["dtype"] = self.vllm_config.dtype
|
|
4600
4600
|
if self.vllm_config.quantization is not None:
|
|
4601
4601
|
llm_kwargs["quantization"] = self.vllm_config.quantization
|
|
4602
|
+
if self.vllm_config.kv_cache_memory_bytes is not None:
|
|
4603
|
+
# Forwards to vLLM's ``CacheConfig.kv_cache_memory_bytes``. When set,
|
|
4604
|
+
# vLLM's ``determine_available_memory`` returns early and skips the
|
|
4605
|
+
# memory-profiling assertion that otherwise fails when peer
|
|
4606
|
+
# processes on the same GPU release memory mid-init. This is what
|
|
4607
|
+
# lets the CI run multiple vLLM processes in parallel — see the
|
|
4608
|
+
# ``VLLMConfig.kv_cache_memory_bytes`` docstring for details.
|
|
4609
|
+
llm_kwargs["kv_cache_memory_bytes"] = self.vllm_config.kv_cache_memory_bytes
|
|
4602
4610
|
try:
|
|
4603
4611
|
self.llm = LLM(**llm_kwargs)
|
|
4604
4612
|
except ValueError as err:
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
"""Functions for collecting rollouts for on-policy algorithms."""
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING, Any
|
|
4
6
|
|
|
5
7
|
import numpy as np
|
|
6
8
|
import torch
|
|
7
9
|
from gymnasium import spaces
|
|
8
10
|
|
|
9
|
-
from agilerl
|
|
10
|
-
from agilerl.
|
|
11
|
+
from agilerl import HAS_LLM_DEPENDENCIES
|
|
12
|
+
from agilerl.algorithms import PPO
|
|
11
13
|
from agilerl.networks import StochasticActor
|
|
12
14
|
from agilerl.typing import GymEnvType
|
|
13
15
|
|
|
16
|
+
if TYPE_CHECKING or HAS_LLM_DEPENDENCIES:
|
|
17
|
+
from agilerl.algorithms import GRPO, LLMPPO, LLMREINFORCE
|
|
18
|
+
from agilerl.llm_envs import SyncMultiTurnVecEnv
|
|
19
|
+
|
|
14
20
|
SupportedOnPolicy = PPO
|
|
15
|
-
SupportedOnPolicyLLM = LLMPPO | LLMREINFORCE | GRPO
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
def _collect_rollouts(
|
|
@@ -241,7 +246,7 @@ def collect_rollouts_recurrent(
|
|
|
241
246
|
|
|
242
247
|
|
|
243
248
|
def collect_rollouts_llm(
|
|
244
|
-
agent:
|
|
249
|
+
agent: LLMPPO | LLMREINFORCE | GRPO,
|
|
245
250
|
env: SyncMultiTurnVecEnv,
|
|
246
251
|
n_steps: int,
|
|
247
252
|
batch_size: int,
|
|
@@ -1446,18 +1446,45 @@ class VLLMConfig:
|
|
|
1446
1446
|
:param frequency_penalty: Penalise tokens proportionally to how often they have
|
|
1447
1447
|
appeared so far. Passed to ``SamplingParams``, defaults to 0.0 (disabled).
|
|
1448
1448
|
:type frequency_penalty: float, optional
|
|
1449
|
+
:param kv_cache_memory_bytes: Manually pin KV cache size in bytes instead of
|
|
1450
|
+
letting vLLM auto-size from ``gpu_memory_utilization``. When set, vLLM
|
|
1451
|
+
uses this exact value for the KV cache and skips the auto-sizing path
|
|
1452
|
+
in ``determine_available_memory`` — but ``gpu_memory_utilization`` is
|
|
1453
|
+
**still honoured** by the upfront ``free_memory >= total_memory *
|
|
1454
|
+
gpu_memory_utilization`` startup check in
|
|
1455
|
+
``vllm/v1/worker/gpu_worker.py:init_device``. When running multiple
|
|
1456
|
+
vLLM processes concurrently you must keep ``gpu_memory_utilization``
|
|
1457
|
+
small enough that every worker's startup check passes.
|
|
1458
|
+
|
|
1459
|
+
**Required for safe parallel/colocated vLLM**: vLLM's startup
|
|
1460
|
+
``determine_available_memory`` profile run asserts that GPU free-memory
|
|
1461
|
+
does not increase between the pre- and post-profile snapshots. When
|
|
1462
|
+
peer processes on the same GPU release memory mid-profile (concurrent
|
|
1463
|
+
xdist workers, sibling CI containers sharing one GPU), the assertion
|
|
1464
|
+
fires with ``Error in memory profiling. Initial free memory ... current
|
|
1465
|
+
free memory ...``. Setting ``kv_cache_memory_bytes`` triggers vLLM's
|
|
1466
|
+
early-return path in ``determine_available_memory`` and skips that
|
|
1467
|
+
assertion entirely. CI tests set this to a small value (e.g. 32 MiB)
|
|
1468
|
+
on the tiny test fixture; production deployments running a single
|
|
1469
|
+
vLLM should leave it unset. Defaults to None.
|
|
1470
|
+
:type kv_cache_memory_bytes: int | None, optional
|
|
1449
1471
|
"""
|
|
1450
1472
|
|
|
1451
1473
|
# Colocate mode parameters
|
|
1452
1474
|
tensor_parallel_size: int = 1
|
|
1453
1475
|
gpu_memory_utilization: float = 0.3
|
|
1454
1476
|
max_num_seqs: int = 8
|
|
1477
|
+
swap_space: float | None = None
|
|
1478
|
+
enforce_eager: bool | None = None
|
|
1455
1479
|
sleep_mode: bool = False
|
|
1456
1480
|
dtype: str | None = None
|
|
1457
1481
|
quantization: str | None = None
|
|
1458
1482
|
stop_sequences: list[str] | None = None
|
|
1459
1483
|
presence_penalty: float = 0.0
|
|
1460
1484
|
frequency_penalty: float = 0.0
|
|
1485
|
+
# See class docstring above. Required to avoid vLLM's memory-profiling
|
|
1486
|
+
# assertion when running multiple vLLM processes on a shared GPU.
|
|
1487
|
+
kv_cache_memory_bytes: int | None = None
|
|
1461
1488
|
|
|
1462
1489
|
def __post_init__(self) -> None:
|
|
1463
1490
|
if self.sleep_mode:
|
|
@@ -123,7 +123,7 @@ def get_transformer_logs(
|
|
|
123
123
|
|
|
124
124
|
# --------------------------------------------------------------------------- #
|
|
125
125
|
# Distribution helpers (Discrete, Box, MultiDiscrete, MultiBinary) #
|
|
126
|
-
# Used by TorchDistribution in networks/
|
|
126
|
+
# Used by TorchDistribution in networks/distributions.py #
|
|
127
127
|
# --------------------------------------------------------------------------- #
|
|
128
128
|
|
|
129
129
|
|
|
@@ -3,7 +3,7 @@ import warnings
|
|
|
3
3
|
from collections.abc import Callable
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import TYPE_CHECKING, Any
|
|
7
7
|
|
|
8
8
|
import gymnasium as gym
|
|
9
9
|
import matplotlib.pyplot as plt
|
|
@@ -22,8 +22,6 @@ from agilerl.algorithms import (
|
|
|
22
22
|
DDPG,
|
|
23
23
|
DQN,
|
|
24
24
|
IPPO,
|
|
25
|
-
LLMPPO,
|
|
26
|
-
LLMREINFORCE,
|
|
27
25
|
MADDPG,
|
|
28
26
|
MATD3,
|
|
29
27
|
PPO,
|
|
@@ -41,8 +39,8 @@ from agilerl.typing import BPTTSequenceType, GymSpaceType, PopulationType
|
|
|
41
39
|
from agilerl.utils.algo_utils import CosineLRScheduleConfig, DummyOptimizer, clone_llm
|
|
42
40
|
from agilerl.vector.pz_async_vec_env import AsyncPettingZooVecEnv
|
|
43
41
|
|
|
44
|
-
if HAS_LLM_DEPENDENCIES:
|
|
45
|
-
from agilerl.algorithms import CISPO, DPO, GRPO, GSPO, SFT
|
|
42
|
+
if HAS_LLM_DEPENDENCIES or TYPE_CHECKING:
|
|
43
|
+
from agilerl.algorithms import CISPO, DPO, GRPO, GSPO, LLMPPO, LLMREINFORCE, SFT
|
|
46
44
|
from agilerl.utils.llm_utils import get_llm_accelerator, get_state_dict
|
|
47
45
|
|
|
48
46
|
SupportedObservationSpace = spaces.Box | spaces.Discrete | spaces.Dict | spaces.Tuple
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "agilerl"
|
|
3
|
-
version = "2.7.0.
|
|
3
|
+
version = "2.7.0.dev2"
|
|
4
4
|
description = "AgileRL is a deep reinforcement learning library focused on improving RL development through RLOps."
|
|
5
5
|
authors = [{ name = "Nick Ustaran-Anderegg", email = "dev@agilerl.com" }]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -104,15 +104,15 @@ filterwarnings = [
|
|
|
104
104
|
"ignore::pyparsing.exceptions.PyparsingDeprecationWarning",
|
|
105
105
|
]
|
|
106
106
|
markers = [
|
|
107
|
-
"
|
|
107
|
+
"vllm: tests that actually instantiate vllm.LLM (exclude with -m 'not vllm'). Pinned to a single xdist worker because vLLM's GPU memory profiling fails when peer workers free memory mid-init.",
|
|
108
|
+
"gpu: tests that use a GPU (CUDA, DeepSpeed, etc.) but do NOT initialise real vLLM (exclude with -m 'not gpu'). Safe to fan out across multiple xdist workers.",
|
|
108
109
|
]
|
|
109
110
|
|
|
110
111
|
[tool.coverage.run]
|
|
111
112
|
parallel = true
|
|
112
113
|
source = ["agilerl"]
|
|
113
|
-
concurrency = ["multiprocessing"]
|
|
114
|
+
concurrency = ["multiprocessing", "thread"]
|
|
114
115
|
sigterm = true
|
|
115
|
-
omit = ["agilerl/networks/distributions_experimental.py"]
|
|
116
116
|
|
|
117
117
|
[tool.coverage.report]
|
|
118
118
|
exclude_lines = [
|
|
@@ -147,6 +147,7 @@ exclude = ["tutorials"]
|
|
|
147
147
|
[tool.ruff]
|
|
148
148
|
target-version = "py310"
|
|
149
149
|
line-length = 88
|
|
150
|
+
extend-exclude = ["tests/assets/tiny_llm"]
|
|
150
151
|
|
|
151
152
|
[tool.ruff.lint]
|
|
152
153
|
select = ["ALL"]
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Build the Minari test fixture used by tests/test_utils/test_minari_utils.py.
|
|
2
|
+
|
|
3
|
+
Downloads ``D4RL/door/human-v2`` from the Farama/HuggingFace registry once and
|
|
4
|
+
saves it under ``tests/assets/minari_cache/`` so subsequent test runs can load
|
|
5
|
+
the dataset offline (``HF_HUB_OFFLINE=1`` is set globally in conftest.py).
|
|
6
|
+
|
|
7
|
+
The download writes ``.cache/huggingface/`` metadata alongside the dataset; we
|
|
8
|
+
prune it because Minari's offline loader doesn't need it and it inflates the
|
|
9
|
+
fixture size.
|
|
10
|
+
|
|
11
|
+
Run when the upstream dataset is updated, when fixture files are missing, or
|
|
12
|
+
when Minari format changes. The output directory should be committed to the
|
|
13
|
+
repo (a few MB).
|
|
14
|
+
|
|
15
|
+
Usage::
|
|
16
|
+
|
|
17
|
+
uv run python tests/assets/build_minari_fixture.py
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import os
|
|
23
|
+
import shutil
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
|
|
26
|
+
DATASET_ID = "D4RL/door/human-v2"
|
|
27
|
+
FIXTURE_DIR = Path(__file__).resolve().parent / "minari_cache"
|
|
28
|
+
SIZE_BUDGET_MB = 10
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def main() -> None:
|
|
32
|
+
if FIXTURE_DIR.exists():
|
|
33
|
+
shutil.rmtree(FIXTURE_DIR)
|
|
34
|
+
FIXTURE_DIR.mkdir(parents=True)
|
|
35
|
+
|
|
36
|
+
os.environ["MINARI_DATASETS_PATH"] = str(FIXTURE_DIR)
|
|
37
|
+
# Allow network for this build only; HF_HUB_OFFLINE is on globally for tests.
|
|
38
|
+
os.environ.pop("HF_HUB_OFFLINE", None)
|
|
39
|
+
os.environ.pop("TRANSFORMERS_OFFLINE", None)
|
|
40
|
+
|
|
41
|
+
import minari
|
|
42
|
+
|
|
43
|
+
print(f"Downloading {DATASET_ID} to {FIXTURE_DIR}...")
|
|
44
|
+
minari.download_dataset(DATASET_ID)
|
|
45
|
+
|
|
46
|
+
# Prune HF download metadata — not needed for offline loading.
|
|
47
|
+
for cache_dir in FIXTURE_DIR.rglob(".cache"):
|
|
48
|
+
if cache_dir.is_dir():
|
|
49
|
+
shutil.rmtree(cache_dir)
|
|
50
|
+
|
|
51
|
+
total_bytes = sum(p.stat().st_size for p in FIXTURE_DIR.rglob("*") if p.is_file())
|
|
52
|
+
total_mb = total_bytes / (1024 * 1024)
|
|
53
|
+
print(f"Fixture size: {total_mb:.2f} MB")
|
|
54
|
+
|
|
55
|
+
if total_mb > SIZE_BUDGET_MB:
|
|
56
|
+
msg = (
|
|
57
|
+
f"Fixture exceeds {SIZE_BUDGET_MB} MB budget ({total_mb:.2f} MB). "
|
|
58
|
+
"Aborting — investigate before committing."
|
|
59
|
+
)
|
|
60
|
+
raise RuntimeError(msg)
|
|
61
|
+
|
|
62
|
+
print("Done. Commit the fixture directory:")
|
|
63
|
+
print(f" git add {FIXTURE_DIR.relative_to(Path.cwd())}")
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if __name__ == "__main__":
|
|
67
|
+
main()
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"""Build the tiny LLM test fixture used by unit tests.
|
|
2
|
+
|
|
3
|
+
Constructs a randomly-initialised Qwen2 model with the upstream
|
|
4
|
+
``trl-internal-testing/tiny-Qwen2ForCausalLM-2.5`` tokenizer and saves it
|
|
5
|
+
under ``tests/assets/tiny_llm/`` so subsequent test runs can load the model
|
|
6
|
+
offline via ``from_pretrained(<local_path>)``.
|
|
7
|
+
|
|
8
|
+
Why we don't just download the upstream model: it ships with
|
|
9
|
+
``hidden_size=8`` / ``num_attention_heads=4``, giving ``head_dim=2``. vLLM
|
|
10
|
+
imposes a per-backend lower bound on ``head_dim`` that the upstream model
|
|
11
|
+
violates:
|
|
12
|
+
|
|
13
|
+
- **GPU FlexAttention backend** (used on GPUs without FA2, i.e. compute
|
|
14
|
+
capability < 8) requires ``head_dim >= 16``.
|
|
15
|
+
- **CPU backend** (`_PagedAttention` in ``vllm/v1/attention/backends/cpu_attn.py``,
|
|
16
|
+
used on macOS / Linux-without-CUDA) only accepts head sizes from a fixed
|
|
17
|
+
whitelist: ``{32, 64, 80, 96, 112, 128, 192, 256}``. A ``head_dim`` outside
|
|
18
|
+
this set fails at runtime with ``RuntimeError: Unsupported head size: N``
|
|
19
|
+
during ``paged_attention_v1``.
|
|
20
|
+
|
|
21
|
+
We construct our own Qwen2 with ``head_dim=32`` (the smallest value satisfying
|
|
22
|
+
both backends) so the same fixture is usable across CI matrices and local
|
|
23
|
+
macOS development.
|
|
24
|
+
|
|
25
|
+
Run when transformers/safetensors compatibility shifts, or when the model
|
|
26
|
+
config needs adjusting. The output directory should be committed to the repo
|
|
27
|
+
(<25 MB).
|
|
28
|
+
|
|
29
|
+
Usage::
|
|
30
|
+
|
|
31
|
+
uv run python tests/assets/build_tiny_llm_fixture.py
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
from __future__ import annotations
|
|
35
|
+
|
|
36
|
+
import json
|
|
37
|
+
import shutil
|
|
38
|
+
from pathlib import Path
|
|
39
|
+
|
|
40
|
+
import torch
|
|
41
|
+
from transformers import AutoTokenizer, Qwen2Config, Qwen2ForCausalLM
|
|
42
|
+
|
|
43
|
+
UPSTREAM_TOKENIZER_ID = "trl-internal-testing/tiny-Qwen2ForCausalLM-2.5"
|
|
44
|
+
FIXTURE_DIR = Path(__file__).resolve().parent / "tiny_llm"
|
|
45
|
+
SIZE_BUDGET_MB = 25
|
|
46
|
+
# transformers >=4.57.3 flags any local non-mistral tokenizer with vocab >100k
|
|
47
|
+
# as a "broken Mistral regex" unless the saved transformers_version is <=4.57.2.
|
|
48
|
+
# Pin the saved version so AutoTokenizer doesn't emit the false-positive warning.
|
|
49
|
+
PINNED_TRANSFORMERS_VERSION = "4.57.2"
|
|
50
|
+
|
|
51
|
+
# head_dim = hidden_size // num_attention_heads must satisfy BOTH backends:
|
|
52
|
+
# - vLLM GPU FlexAttention (no-FA2 GPUs): head_dim >= 16
|
|
53
|
+
# - vLLM CPU PagedAttention (macOS, etc.): head_dim in
|
|
54
|
+
# {32, 64, 80, 96, 112, 128, 192, 256}
|
|
55
|
+
# 32 is the smallest head_dim satisfying both. To stay under the 25 MB fixture
|
|
56
|
+
# budget (tokenizer alone is ~11 MB, embeddings dominate model weights at this
|
|
57
|
+
# scale because tie_word_embeddings shares them with lm_head), we keep
|
|
58
|
+
# hidden_size=32 and use a single head so head_dim = 32 / 1 = 32. The single-
|
|
59
|
+
# head config still exercises the full Qwen2 forward/backward path; head count
|
|
60
|
+
# is an implementation detail that the LLM-level tests (DPO/GRPO/SFT/REINFORCE)
|
|
61
|
+
# don't probe.
|
|
62
|
+
HIDDEN_SIZE = 32
|
|
63
|
+
NUM_ATTENTION_HEADS = 1 # head_dim = 32
|
|
64
|
+
NUM_KEY_VALUE_HEADS = 1
|
|
65
|
+
NUM_HIDDEN_LAYERS = 2
|
|
66
|
+
INTERMEDIATE_SIZE = 64
|
|
67
|
+
SEED = 0
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def main() -> None:
|
|
71
|
+
if FIXTURE_DIR.exists():
|
|
72
|
+
shutil.rmtree(FIXTURE_DIR)
|
|
73
|
+
FIXTURE_DIR.mkdir(parents=True)
|
|
74
|
+
|
|
75
|
+
print(f"Loading tokenizer from {UPSTREAM_TOKENIZER_ID}...")
|
|
76
|
+
tokenizer = AutoTokenizer.from_pretrained(UPSTREAM_TOKENIZER_ID)
|
|
77
|
+
|
|
78
|
+
print("Constructing tiny Qwen2 model from scratch...")
|
|
79
|
+
config = Qwen2Config(
|
|
80
|
+
vocab_size=len(tokenizer),
|
|
81
|
+
hidden_size=HIDDEN_SIZE,
|
|
82
|
+
intermediate_size=INTERMEDIATE_SIZE,
|
|
83
|
+
num_hidden_layers=NUM_HIDDEN_LAYERS,
|
|
84
|
+
num_attention_heads=NUM_ATTENTION_HEADS,
|
|
85
|
+
num_key_value_heads=NUM_KEY_VALUE_HEADS,
|
|
86
|
+
max_position_embeddings=32768,
|
|
87
|
+
rope_theta=10000.0,
|
|
88
|
+
rms_norm_eps=1e-6,
|
|
89
|
+
tie_word_embeddings=True,
|
|
90
|
+
torch_dtype="float32",
|
|
91
|
+
bos_token_id=151643,
|
|
92
|
+
eos_token_id=151645,
|
|
93
|
+
)
|
|
94
|
+
torch.manual_seed(SEED)
|
|
95
|
+
model = Qwen2ForCausalLM(config)
|
|
96
|
+
# Store weights in float16 to keep the fixture under the size budget.
|
|
97
|
+
# Tests run under bf16/fp16 anyway (DeepSpeed bf16, vLLM fp16 downcast)
|
|
98
|
+
# so this matches the working dtype and avoids any precision surprise.
|
|
99
|
+
model = model.to(torch.float16)
|
|
100
|
+
|
|
101
|
+
print(f"Saving fixture to {FIXTURE_DIR}...")
|
|
102
|
+
model.save_pretrained(FIXTURE_DIR, safe_serialization=True)
|
|
103
|
+
tokenizer.save_pretrained(FIXTURE_DIR)
|
|
104
|
+
# Drop redundant slow-tokenizer files; the fast tokenizer.json is sufficient.
|
|
105
|
+
for legacy in ("vocab.json", "merges.txt"):
|
|
106
|
+
(FIXTURE_DIR / legacy).unlink(missing_ok=True)
|
|
107
|
+
|
|
108
|
+
config_path = FIXTURE_DIR / "config.json"
|
|
109
|
+
config_dict = json.loads(config_path.read_text())
|
|
110
|
+
config_dict["transformers_version"] = PINNED_TRANSFORMERS_VERSION
|
|
111
|
+
config_path.write_text(json.dumps(config_dict, indent=2) + "\n")
|
|
112
|
+
|
|
113
|
+
total_bytes = sum(p.stat().st_size for p in FIXTURE_DIR.rglob("*") if p.is_file())
|
|
114
|
+
total_mb = total_bytes / (1024 * 1024)
|
|
115
|
+
print(f"Fixture size: {total_mb:.2f} MB")
|
|
116
|
+
|
|
117
|
+
if total_mb > SIZE_BUDGET_MB:
|
|
118
|
+
msg = (
|
|
119
|
+
f"Fixture exceeds {SIZE_BUDGET_MB} MB budget ({total_mb:.2f} MB). "
|
|
120
|
+
"Aborting — investigate before committing."
|
|
121
|
+
)
|
|
122
|
+
raise RuntimeError(msg)
|
|
123
|
+
|
|
124
|
+
print("Done. Commit the fixture directory:")
|
|
125
|
+
print(f" git add {FIXTURE_DIR.relative_to(Path.cwd())}")
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
if __name__ == "__main__":
|
|
129
|
+
main()
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"env_spec": "{\"id\": \"AdroitHandDoor-v1\", \"entry_point\": \"gymnasium_robotics.envs.adroit_hand.adroit_door:AdroitHandDoorEnv\", \"reward_threshold\": null, \"nondeterministic\": false, \"max_episode_steps\": 200, \"order_enforce\": true, \"disable_env_checker\": false, \"kwargs\": {\"reward_type\": \"dense\"}, \"additional_wrappers\": [], \"vector_entry_point\": null}", "dataset_id": "D4RL/door/human-v2", "author": ["Rodrigo de Lazcano"], "author_email": ["rperezvicente@farama.org"], "code_permalink": "https://github.com/rodrigodelazcano/d4rl-minari-dataset-generation", "minari_version": "0.4.3", "ref_max_score": 2940.578369140625, "ref_min_score": -45.80706024169922, "num_episodes_average_score": 100, "total_episodes": 25, "total_steps": 6729, "data_format": "hdf5", "dataset_size": 3.5, "description": "25 human demonstrations provided in the [DAPG](https://github.com/aravindr93/hand_dapg) repository. The environment used to collect the dataset is [`AdroitHandDoor-v1`](https://robotics.farama.org/envs/adroit_hand/adroit_door/).", "requirements": ["gymnasium-robotics>=1.2.4"], "action_space": "{\"type\": \"Box\", \"dtype\": \"float32\", \"shape\": [28], \"low\": [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0], \"high\": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}", "observation_space": "{\"type\": \"Box\", \"dtype\": \"float64\", \"shape\": [39], \"low\": [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity], \"high\": [Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity]}"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"display_name": "Door", "description": "These datasets were generated with the [`AdroitHandDoor-v1`](https://robotics.farama.org/envs/adroit_hand/adroit_door/) environment, originally hosted in the [`hand_dapg`](https://github.com/aravindr93/hand_dapg) repository. The objective of the task is to open a door with a 24-DoF robotic hand. This domain was selected to measure the effect of a narrow expert data distributions and human demonstrations on a sparse reward, high-dimensional robotic manipulation task.\n\nThere are three types of datasets, two from the original paper[1] (`human` and `expert`), and another one introduced in D4RL[2] (`cloned`).\n\n## References\n\n[1] Rajeswaran, Aravind, et al. \u2018Learning Complex Dexterous Manipulation with Deep Reinforcement Learning and Demonstrations\u2019. CoRR, vol. abs/1709.10087, 2017, http://arxiv.org/abs/1709.10087.\n\n[2] Fu, Justin, et al. \u2018D4RL: Datasets for Deep Data-Driven Reinforcement Learning\u2019. CoRR, vol. abs/2004.07219, 2020, https://arxiv.org/abs/2004.07219."}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"description": "The D4RL dataset group contains a reproduction of the datasets from the [D4RL benchmark](https://github.com/Farama-Foundation/D4RL)[1]. For reproducibility purposes, not all the datasets are the same as in D4RL, but they are generated with the same principles. We provide the code that reproduces each dataset on GitHub in the repository [Farama-Foundation/minari-dataset-generation-scripts](https://github.com/Farama-Foundation/minari-dataset-generation-scripts).\n\n## References\n\n[1] Fu, Justin, et al. \u2018D4RL: Datasets for Deep Data-Driven Reinforcement Learning\u2019. CoRR, vol. abs/2004.07219, 2020, https://arxiv.org/abs/2004.07219.", "namespaces": ["D4RL/door", "D4RL/kitchen", "D4RL/hammer", "D4RL/pointmaze", "D4RL/pen", "D4RL/minigrid", "D4RL/antmaze", "D4RL/relocate"], "datasets": ["D4RL/antmaze/medium-play-v1", "D4RL/pointmaze/open-dense-v2", "D4RL/pen/human-v2", "D4RL/kitchen/partial-v2", "D4RL/antmaze/umaze-diverse-v1", "D4RL/pointmaze/umaze-v2", "D4RL/pen/cloned-v2", "D4RL/door/human-v2", "D4RL/pointmaze/large-dense-v2", "D4RL/hammer/cloned-v2", "D4RL/relocate/human-v2", "D4RL/pointmaze/medium-v2", "D4RL/pointmaze/umaze-dense-v2", "D4RL/hammer/expert-v2", "D4RL/door/cloned-v2", "D4RL/pointmaze/medium-dense-v2", "D4RL/door/expert-v2", "D4RL/minigrid/fourrooms-random-v0", "D4RL/pen/expert-v2", "D4RL/relocate/expert-v2", "D4RL/antmaze/large-diverse-v1", "D4RL/antmaze/large-play-v1", "D4RL/minigrid/fourrooms-v0", "D4RL/pointmaze/large-v2", "D4RL/antmaze/medium-diverse-v1", "D4RL/antmaze/umaze-v1", "D4RL/hammer/human-v2", "D4RL/kitchen/complete-v2", "D4RL/kitchen/mixed-v2", "D4RL/pointmaze/open-v2", "D4RL/relocate/cloned-v2"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"</tool_call>": 151658,
|
|
3
|
+
"<tool_call>": 151657,
|
|
4
|
+
"<|box_end|>": 151649,
|
|
5
|
+
"<|box_start|>": 151648,
|
|
6
|
+
"<|endoftext|>": 151643,
|
|
7
|
+
"<|file_sep|>": 151664,
|
|
8
|
+
"<|fim_middle|>": 151660,
|
|
9
|
+
"<|fim_pad|>": 151662,
|
|
10
|
+
"<|fim_prefix|>": 151659,
|
|
11
|
+
"<|fim_suffix|>": 151661,
|
|
12
|
+
"<|im_end|>": 151645,
|
|
13
|
+
"<|im_start|>": 151644,
|
|
14
|
+
"<|image_pad|>": 151655,
|
|
15
|
+
"<|object_ref_end|>": 151647,
|
|
16
|
+
"<|object_ref_start|>": 151646,
|
|
17
|
+
"<|quad_end|>": 151651,
|
|
18
|
+
"<|quad_start|>": 151650,
|
|
19
|
+
"<|repo_name|>": 151663,
|
|
20
|
+
"<|video_pad|>": 151656,
|
|
21
|
+
"<|vision_end|>": 151653,
|
|
22
|
+
"<|vision_pad|>": 151654,
|
|
23
|
+
"<|vision_start|>": 151652
|
|
24
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{%- if tools %}
|
|
2
|
+
{{- '<|im_start|>system\n' }}
|
|
3
|
+
{%- if messages[0]['role'] == 'system' %}
|
|
4
|
+
{{- messages[0]['content'] }}
|
|
5
|
+
{%- else %}
|
|
6
|
+
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
|
7
|
+
{%- endif %}
|
|
8
|
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
|
9
|
+
{%- for tool in tools %}
|
|
10
|
+
{{- "\n" }}
|
|
11
|
+
{{- tool | tojson }}
|
|
12
|
+
{%- endfor %}
|
|
13
|
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
|
14
|
+
{%- else %}
|
|
15
|
+
{%- if messages[0]['role'] == 'system' %}
|
|
16
|
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
|
17
|
+
{%- else %}
|
|
18
|
+
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
|
19
|
+
{%- endif %}
|
|
20
|
+
{%- endif %}
|
|
21
|
+
{%- for message in messages %}
|
|
22
|
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
|
23
|
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
|
24
|
+
{%- elif message.role == "assistant" %}
|
|
25
|
+
{{- '<|im_start|>' + message.role }}
|
|
26
|
+
{%- if message.content %}
|
|
27
|
+
{{- '\n' + message.content }}
|
|
28
|
+
{%- endif %}
|
|
29
|
+
{%- for tool_call in message.tool_calls %}
|
|
30
|
+
{%- if tool_call.function is defined %}
|
|
31
|
+
{%- set tool_call = tool_call.function %}
|
|
32
|
+
{%- endif %}
|
|
33
|
+
{{- '\n<tool_call>\n{"name": "' }}
|
|
34
|
+
{{- tool_call.name }}
|
|
35
|
+
{{- '", "arguments": ' }}
|
|
36
|
+
{{- tool_call.arguments | tojson }}
|
|
37
|
+
{{- '}\n</tool_call>' }}
|
|
38
|
+
{%- endfor %}
|
|
39
|
+
{{- '<|im_end|>\n' }}
|
|
40
|
+
{%- elif message.role == "tool" %}
|
|
41
|
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
|
42
|
+
{{- '<|im_start|>user' }}
|
|
43
|
+
{%- endif %}
|
|
44
|
+
{{- '\n<tool_response>\n' }}
|
|
45
|
+
{{- message.content }}
|
|
46
|
+
{{- '\n</tool_response>' }}
|
|
47
|
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
|
48
|
+
{{- '<|im_end|>\n' }}
|
|
49
|
+
{%- endif %}
|
|
50
|
+
{%- endif %}
|
|
51
|
+
{%- endfor %}
|
|
52
|
+
{%- if add_generation_prompt %}
|
|
53
|
+
{{- '<|im_start|>assistant\n' }}
|
|
54
|
+
{%- endif %}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"architectures": [
|
|
3
|
+
"Qwen2ForCausalLM"
|
|
4
|
+
],
|
|
5
|
+
"attention_dropout": 0.0,
|
|
6
|
+
"bos_token_id": 151643,
|
|
7
|
+
"dtype": "float16",
|
|
8
|
+
"eos_token_id": 151645,
|
|
9
|
+
"hidden_act": "silu",
|
|
10
|
+
"hidden_size": 32,
|
|
11
|
+
"initializer_range": 0.02,
|
|
12
|
+
"intermediate_size": 64,
|
|
13
|
+
"layer_types": [
|
|
14
|
+
"full_attention",
|
|
15
|
+
"full_attention"
|
|
16
|
+
],
|
|
17
|
+
"max_position_embeddings": 32768,
|
|
18
|
+
"max_window_layers": 28,
|
|
19
|
+
"model_type": "qwen2",
|
|
20
|
+
"num_attention_heads": 1,
|
|
21
|
+
"num_hidden_layers": 2,
|
|
22
|
+
"num_key_value_heads": 1,
|
|
23
|
+
"rms_norm_eps": 1e-06,
|
|
24
|
+
"rope_scaling": null,
|
|
25
|
+
"rope_theta": 10000.0,
|
|
26
|
+
"sliding_window": null,
|
|
27
|
+
"tie_word_embeddings": true,
|
|
28
|
+
"transformers_version": "4.57.2",
|
|
29
|
+
"use_cache": true,
|
|
30
|
+
"use_sliding_window": false,
|
|
31
|
+
"vocab_size": 151665
|
|
32
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"additional_special_tokens": [
|
|
3
|
+
"<|im_start|>",
|
|
4
|
+
"<|im_end|>",
|
|
5
|
+
"<|object_ref_start|>",
|
|
6
|
+
"<|object_ref_end|>",
|
|
7
|
+
"<|box_start|>",
|
|
8
|
+
"<|box_end|>",
|
|
9
|
+
"<|quad_start|>",
|
|
10
|
+
"<|quad_end|>",
|
|
11
|
+
"<|vision_start|>",
|
|
12
|
+
"<|vision_end|>",
|
|
13
|
+
"<|vision_pad|>",
|
|
14
|
+
"<|image_pad|>",
|
|
15
|
+
"<|video_pad|>"
|
|
16
|
+
],
|
|
17
|
+
"eos_token": {
|
|
18
|
+
"content": "<|im_end|>",
|
|
19
|
+
"lstrip": false,
|
|
20
|
+
"normalized": false,
|
|
21
|
+
"rstrip": false,
|
|
22
|
+
"single_word": false
|
|
23
|
+
},
|
|
24
|
+
"pad_token": {
|
|
25
|
+
"content": "<|endoftext|>",
|
|
26
|
+
"lstrip": false,
|
|
27
|
+
"normalized": false,
|
|
28
|
+
"rstrip": false,
|
|
29
|
+
"single_word": false
|
|
30
|
+
}
|
|
31
|
+
}
|