Skip to content

docs: update README.md#7

Merged
garrett4wade merged 1 commit into
areal-project:mainfrom
eltociear:patch-1
Mar 30, 2025
Merged

docs: update README.md#7
garrett4wade merged 1 commit into
areal-project:mainfrom
eltociear:patch-1

Conversation

@eltociear

Copy link
Copy Markdown

evalutation -> evaluation

evalutation -> evaluation
@garrett4wade garrett4wade merged commit b8acc1e into areal-project:main Mar 30, 2025
zhshgmail pushed a commit to zhshgmail/AReaL that referenced this pull request Oct 29, 2025
This commit addresses design issues #1-#4 by reorganizing interfaces:

## Changes

**1. Moved to api module (proper location for interfaces):**
- `QueueAPI` → `areal/api/queue_api.py`
- `CacheAPI` → `areal/api/cache_api.py`
- `EventType`, `EventContext`, `EventHandler` → `areal/api/event_api.py`
- `QueueFilter` → `Filter` in `areal/api/filter_api.py`

**2. Created separate queue/cache event handler protocols:**
- `QueueEventHandler` + `QueueEventContext` in `areal/api/queue_event_handler.py`
- `CacheEventHandler` + `CacheEventContext` in `areal/api/cache_event_handler.py`

**3. Simplified event_system.py:**
- Now only contains `EventRegistry` class
- Imports interfaces from api module
- No longer defines protocols

**4. Renamed QueueFilter → Filter:**
- Generic name since it applies to both queue and cache
- Located in api module as proper interface
- StalenessFilter now implements Filter protocol

## Why Protocol as superclass? (Answer to #4)

Protocol enables **structural subtyping** (duck typing with types):

```python
from typing import Protocol

class QueueAPI(Protocol):
    def put(self, item): ...

# No need to inherit!
class MyQueue:
    def put(self, item):
        pass

# Type checker accepts this ✓
def foo(q: QueueAPI):
    q.put(1)

foo(MyQueue())  # Works! Structural typing
```

vs ABC (requires inheritance):
```python
from abc import ABC

class QueueAPI(ABC):
    ...

class MyQueue:  # Must inherit from QueueAPI
    ...
```

**Protocol = Interface without inheritance requirement**

## Remaining Work

Still TODO (per user feedback):
- Redesign ProximalRecomputer with propagator pattern (#3)
- Fix AsyncTaskRunner to require QueueAPI/CacheAPI (#5)
- Remove executor._filter_context (#6)
- Add CacheFilter or apply Filter to all operations (areal-project#7, areal-project#8)
- Fix RemoteInfEngine to not expose queue/cache (areal-project#9)
- Merge event_factory into workflow_factory (areal-project#10)
- Add vLLM recompute support (areal-project#11)

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

Co-Authored-By: Claude <noreply@anthropic.com>
zhshgmail pushed a commit to zhshgmail/AReaL that referenced this pull request Oct 29, 2025
Addresses Issue areal-project#7 from user feedback: put() was bypassing filters while
put_nowait() was checking them. This inconsistency violated the filter
contract.

Changes:
1. Updated put() to check all registered filters before adding items
2. Updated put_nowait() documentation to clarify it's equivalent to put(block=False)
3. Both methods now silently drop items rejected by filters
4. Filter checking logic is consistent across all put operations

This ensures that admission control filters (like StalenessFilter) are
applied consistently regardless of which put method is used.

All 22 PPO tests continue to pass.

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

Co-Authored-By: Claude <noreply@anthropic.com>
guozhihao-224 added a commit to guozhihao-224/AReaL that referenced this pull request Apr 18, 2026
1. Change "first-fit decreasing" to "first-fit". The code in
   _greedy_build_tries() iterates sequences in original order without
   sorting by decreasing size.

2. Document the full token alignment constraint:
   lcm(BLOCK_SIZE, parallel_size) instead of just BLOCK_SIZE (128).
   When parallel_size divides 128 (common case) this equals 128,
   but can be larger with unusual parallel configs.

Ref: areal-project#1165 (Findings areal-project#6, areal-project#7)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants