Commit graph

28 commits

Author SHA1 Message Date
Jai Suphavadeeprasit
6bc962c746 initial commit 2026-02-20 01:45:41 -05:00
pre-commit-ci[bot]
9bef7a1b46 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-07 18:10:40 +00:00
Nina
722385e715
Update server.py 2025-11-07 19:06:03 +01:00
Nina
b3feae5eef
Update server.py 2025-11-07 19:03:54 +01:00
Nina
74b5412c2b
Update server.py 2025-11-07 19:02:26 +01:00
Nina
16a40a5617
Update server.py 2025-11-07 19:01:48 +01:00
Nina
97107ca868
Update server.py 2025-11-07 19:01:09 +01:00
Nina
a5a8b07848
Update server.py 2025-11-07 19:00:32 +01:00
dmahan93
b1e164eef5
Merge pull request #264 from NousResearch/add-logprob-server-manager-fn
add sglang specific token level logprob handling and server manager/b…
2025-10-29 13:53:39 -07:00
Dakota
5d6d6bb0dc add docs :) 2025-10-29 11:26:43 -05:00
pre-commit-ci[bot]
0840c26e94 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-10-15 04:19:25 +00:00
ropresearch
e5b8fb8654 clean up 2025-10-10 11:50:39 -04:00
ropresearch
baf4b2d8a8 gzip compression for atropos api 2025-10-10 01:26:52 -04:00
dmahan93
36243bd3f4
Merge pull request #253 from NousResearch/rop/gen-params
group temps, sample temps, and logprob api params
2025-10-01 12:58:03 -05:00
ropresearch
6a20b90549 added gen params for latest examples endpoint 2025-10-01 13:05:37 -04:00
ropresearch
b9ecb0cc7f docs update 2025-09-25 17:00:05 -04:00
ropresearch
c3fc68879c group temps, sample temps, and logprob api params 2025-09-25 16:41:58 -04:00
pre-commit-ci[bot]
e02d2c373e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-09-21 22:33:59 +00:00
Ragnar
60addb9a7d
Update server.py 2025-09-22 00:32:39 +02:00
Dakota
08e14cc745 feat: add minimum batch allocation support for environments
- Add min_batch_allocation parameter to ensure environments contribute minimum proportion to each batch
- Implement grab_batch_with_minimum_allocations function with proper scaling when allocations exceed 100%
- Add mixed-size group buffering to handle variable-sized data submissions
- Update server to use minimum allocation logic when any env has min_batch_allocation set
- Add comprehensive tests for minimum allocation scenarios
- Update documentation in API README and CONFIG.md
- Update example environments to demonstrate the feature

This feature allows critical environments to guarantee they contribute at least a specified proportion (0.0-1.0) to each training batch, ensuring important data sources are always represented during training.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 08:50:28 -05:00
Dakota
e13526d308 Fix API to accept messages without reward field + comprehensive tests
- Made reward field truly optional in messages (no auto-addition)
- Accept custom roles (dog, cat, etc.) beyond standard ones
- Added 24 new tests for edge cases (tuples, unicode, large content)
- Reorganized test structure: moved from testing/ to atroposlib/tests/
- Fixed legacy API tests and removed tests requiring missing data files

All 43 tests pass\! Fixes message handling for SFT use cases.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-09 14:03:08 -05:00
dmahan93
4a21ed0891 Enhance ScoredData model and API documentation
- Added optional fields: advantages, messages, and images to the ScoredData model.
- Updated API responses to include these new fields when no data is available.
- Revised README.md to reflect changes in the API structure and response format.
2025-06-02 17:28:25 -05:00
Shannon Sands
a7dfd377da moving env to clean branch 2025-05-10 07:44:29 +10:00
Shannon Sands
4f6a0014bc precommit 2025-05-10 07:30:57 +10:00
dmahan93
c1ba77ec26
Merge pull request #7 from misrasaurabh1/codeflash/optimize-grab_exact_from_heterogeneous_queue-ma3pegzo
️ Speed up function `grab_exact_from_heterogeneous_queue` by 1,680%
2025-05-09 12:18:56 -05:00
dmahan93
301cc03b9d
require register-env to wait until batch is hit 2025-05-08 11:28:38 -05:00
codeflash-ai[bot]
837ef6295d
️ Speed up function grab_exact_from_heterogeneous_queue by 1,680%
Here’s a highly optimized version of your code for both **runtime** and **memory**, based on the profile hot spots.

- **Avoid repeated summing** for checking lengths in a growing list — we keep a running sum.
- **Avoid repeatedly copying lists/dicts** by using lists of indices and marking to remove in one pass, and using set operations for fast membership checks.
- **Avoid creating lots of small dicts** and list extensions inside loops.
- **Combine related generator expressions** so costly operations are only done once.
- **Group similar linear scans** into one to minimize number of loops over `queue`.
- Use **pre-allocated lists and sets** where it saves time.

Here's the rewritten function (all comments preserved except where the code logic was changed).



**Key optimizations:**
- Only a *single pass* over queue for setup.
- No repeated `.append(dict)`; pass only indices around until the end.
- Use `.clear()` for lists inside dict to avoid reallocations.
- Use lists of lengths for O(1) access everywhere.
- Maintain a running sum for batch size check, not repeated `sum`.

This should **dramatically cut runtime**, especially at the hot spots from your line profiler output. If you need even more speed and the queue is huge/long-lived, consider reworking the data structure for the queue itself (`deque`, heap, etc.), but for code-level optimization this is near optimal for this algorithm!
2025-04-30 08:58:23 +00:00
Dakota Nous
621d00dd80 first commit 2025-04-29 12:10:10 -07:00