This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import os | |
| import re | |
| import shlex | |
| import subprocess | |
| import sys | |
| import time | |
| import traceback | |
| import urllib.error | |
| import urllib.request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Test script for benchmark environment concurrency. | |
| Run the server first: | |
| cd benchmark && uvicorn server.app:app --reload --port 8000 | |
| Then run this script: | |
| python test_concurrency.py --requests 10 --wait 1.0 | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "huggingface-hub>=1.1.4", | |
| # "python-dotenv>=1.2.1", | |
| # "pyyaml>=6.0.3", | |
| # "requests>=2.32.5", | |
| # ] | |
| # /// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| GRPO training for BrowserGym tasks using TRL's `GRPOTrainer` and the OpenEnv HTTP | |
| environment interface. | |
| """ | |
| from __future__ import annotations | |
| from datetime import datetime | |
| import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "git+https://github.com/huggingface/trl.git#egg=trl[vllm]", | |
| # "trackio==0.8.1", | |
| # /// | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "git+https://github.com/huggingface/trl.git#egg=trl[vllm]", | |
| # "trackio==0.8.1", | |
| # /// | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| GRPO training for BrowserGym tasks using TRL's `GRPOTrainer` and the OpenEnv HTTP | |
| environment interface. | |
| Usage: | |
| # First, start a BrowserGym server (Docker or local) and note its base URL. | |
| # For MiniWoB++ you can use the official BrowserGym container. | |
| # Then run this training script (customise env vars as needed): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| GRPO training for Wordle using TRL's `GRPOTrainer` and the TextArena OpenEnv environment. | |
| Usage: | |
| # First, start the TextArena Wordle server (Docker or local): | |
| TEXTARENA_ENV_ID=Wordle-v0 TEXTARENA_NUM_PLAYERS=1 \ | |
| python -m src.envs.textarena_env.server.app | |
| # Then run this training script: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2020-2025 The HuggingFace Team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2020-2025 The HuggingFace Team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
NewerOlder