Skip to content

fix: route List[Path] outputs through FileOutput IPC for upload#2779

Merged
tempusfrangit merged 4 commits intomainfrom
fix/list-path-upload
Feb 28, 2026
Merged

fix: route List[Path] outputs through FileOutput IPC for upload#2779
tempusfrangit merged 4 commits intomainfrom
fix/list-path-upload

Conversation

@tempusfrangit
Copy link
Member

@tempusfrangit tempusfrangit commented Feb 26, 2026

Summary

  • When a predict function returns List[Path] (not an iterator), the list was processed by output::process_output which base64-encodes Path objects inline, producing multi-megabyte data URIs in the response instead of uploaded URLs
  • process_single_output now detects list/tuple returns and iterates their items through send_output_item, which routes Path objects through the FileOutput IPC path for proper upload via --upload-url

Testing

  • New integration test coglet_list_path_upload_url verifies List[Path] outputs are uploaded and returned as URLs, not data URIs
  • Existing coglet_iterator_upload_url test still passes (Iterator[Path] path unaffected)

closes: #2777

@tempusfrangit tempusfrangit requested a review from a team as a code owner February 26, 2026 17:15
@tempusfrangit tempusfrangit added this to the 0.17.0 Release milestone Feb 26, 2026
@tempusfrangit
Copy link
Member Author

This has been confirmed to be resolved via E2E test on replicate with a real published model.

@tempusfrangit tempusfrangit changed the base branch from main to feat/build-time-schema February 26, 2026 21:25
When a predict function returns List[Path] (not an iterator), the list
was being processed by output::process_output which base64-encodes Path
objects inline. This caused multi-megabyte data URIs in the response
instead of uploaded URLs. Now process_single_output detects list/tuple
returns and iterates their items through send_output_item, which routes
Path objects through the FileOutput IPC path for proper upload.

Adds coglet_list_path_upload_url integration test to verify List[Path]
outputs are uploaded via --upload-url and not base64-encoded.
…t List[Path]

Single-element List[Path] returns were collapsed to a scalar string instead
of a one-element array, breaking the API contract. The orchestrator now
checks the schema's Output type ("type": "array") to decide Single vs
Stream wrapping. For Any/missing schemas, a predictor-side is_stream flag
on the Done message serves as fallback.

- Add wrap_outputs() helper with schema + predictor signal priority
- Propagate is_stream through PredictionOutcome -> worker -> Done IPC
- 13 unit tests covering all wrapping combinations + serde round-trip
- Integration tests for List[Path] single-element and scalar Path output
@mfainberg-cf mfainberg-cf changed the base branch from feat/build-time-schema to main February 27, 2026 22:22
@tempusfrangit tempusfrangit enabled auto-merge (squash) February 27, 2026 22:37
@tempusfrangit tempusfrangit merged commit 871b8c4 into main Feb 28, 2026
33 checks passed
@tempusfrangit tempusfrangit deleted the fix/list-path-upload branch February 28, 2026 00:13
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.

Outputs when uploaded are still base64 encoded in the output stream

2 participants