-
Notifications
You must be signed in to change notification settings - Fork 192
Api call server #1189
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
Closed
Closed
Api call server #1189
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b17f3c9
test api call server
Jorjeous 2504c3e
add server
Jorjeous 6ad0b60
fix compute eval problem
Jorjeous d92b023
apply hotfix
Jorjeous e4c895c
update
Jorjeous 1cbd24f
remove debug, default usage of input audio
Jorjeous b3bc4ed
fix lint and format
Jorjeous 38bd585
Merge branch 'main' into api_call_server
Jorjeous 6195764
Update, remove audio_url
Jorjeous 8df02c0
Merge branch 'main' into api_call_server
Jorjeous d1445be
refactor to match guidelines
Jorjeous fcd2191
Merge branch 'main' into api_call_server
Jorjeous f94ae76
fix tests
Jorjeous 26f1431
refator based on comments
Jorjeous File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -207,13 +207,15 @@ class GenerationTaskConfig: | |
| enable_litellm_cache: bool = False | ||
|
|
||
| # List of content types to drop from messages (e.g., base64 audio) to keep output files smaller | ||
| drop_content_types: list[str] = field(default_factory=lambda: ["audio_url"]) | ||
| drop_content_types: list[str] = field(default_factory=lambda: ["input_audio"]) | ||
|
|
||
| # Audio configuration - set by benchmarks that need audio processing (mmau-pro, audiobench, etc.) | ||
| enable_audio: bool = False # Enable audio preprocessing (set by benchmark configs) | ||
| enable_audio_chunking: bool = True | ||
| audio_chunk_task_types: list[str] | None = None # If None, chunk all task types; if specified, only chunk these | ||
| chunk_audio_threshold_sec: int = 30 # Duration in seconds for each audio chunk | ||
| # Audio format for API requests (input_audio only) | ||
| audio_format: str = "input_audio" | ||
|
|
||
| # Evaluation setup if requested. If eval_type is set to None, evaluation is skipped | ||
| eval_type: str | None = None # "lean4-proof", "math", etc. | ||
|
|
@@ -432,11 +434,11 @@ def setup_llm(self): | |
|
|
||
| # Build server config, potentially switching to vllm_multimodal for audio tasks | ||
| server_config = dict(self.cfg.server) | ||
| if needs_audio and server_config.get("server_type") not in ["vllm", "vllm_multimodal"]: | ||
| if needs_audio and server_config.get("server_type") not in ["vllm", "vllm_multimodal", "api_multimodal"]: | ||
| LOG.warning( | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated warnign, as it was misleading |
||
| f"enable_audio is set but server_type is '{server_config.get('server_type')}'. " | ||
| "Audio processing is only supported for vllm_multimodal server types. " | ||
| "Audio will not be processed." | ||
| f"Audio enabled with server_type='{server_config.get('server_type')}'. " | ||
| "Advanced audio preprocessing (base64 encoding, chunking) is only available for " | ||
| "vllm_multimodal and api_multimodal. Server will receive raw audio paths." | ||
| ) | ||
| if needs_audio and server_config.get("server_type") in [ | ||
| "vllm", | ||
|
|
@@ -453,6 +455,16 @@ def setup_llm(self): | |
| "chunk_audio_threshold_sec": self.cfg.chunk_audio_threshold_sec, | ||
| } | ||
| ) | ||
| if needs_audio and server_config.get("server_type") == "api_multimodal": | ||
| # Pass audio config to api_multimodal (has built-in audio processing) | ||
| server_config.update( | ||
| { | ||
| "enable_audio_chunking": self.cfg.enable_audio_chunking, | ||
| "audio_chunk_task_types": self.cfg.audio_chunk_task_types, | ||
| "chunk_audio_threshold_sec": self.cfg.chunk_audio_threshold_sec, | ||
| "audio_format": self.cfg.audio_format, | ||
| } | ||
| ) | ||
|
|
||
| if self.cfg.code_execution: | ||
| llm = get_code_execution_model( | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.