Open
Conversation
…reate_managed_lease, _create_quick - Better separation of tunnel backends (managed lease vs managed tunnel vs quick tunnel) - Fixes close() to properly call synth_ai_py.tunnel_close(lease_id)
Contributor
|
Found 1 test failure on Blacksmith runners: Failure
|
Contributor
Greptile OverviewGreptile SummaryThis PR adds comprehensive progress tracking and demo utilities for GEPA optimization and eval workflows. The changes improve user experience with real-time progress updates, better terminal event detection, and infrastructure improvements for tunnel management. Key Changes
Notable Implementation Details
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant EvalJob
participant Streamer
participant ProgressPrinter
participant Backend
participant Tunnel
User->>EvalJob: poll_until_complete(progress=True)
EvalJob->>ProgressPrinter: create printer with label
EvalJob->>ProgressPrinter: log_start()
loop Until terminal state
EvalJob->>Backend: get_status()
Backend-->>EvalJob: status + results
EvalJob->>ProgressPrinter: handle_status(status)
ProgressPrinter->>ProgressPrinter: update clock, tick idle timer
ProgressPrinter-->>User: print progress update
alt Status is terminal (completed)
loop Retry with deadline
EvalJob->>Backend: get_results()
alt Results available
Backend-->>EvalJob: full results
else Results not ready
EvalJob->>EvalJob: wait 1s, retry
end
end
alt Results empty
EvalJob->>Backend: get_status() (fresh)
Backend-->>EvalJob: status with results in metadata
end
EvalJob->>ProgressPrinter: log_terminal(status, mean_reward)
ProgressPrinter-->>User: print final status
EvalJob-->>User: return EvalResult
end
EvalJob->>EvalJob: sleep(interval)
end
Note over User,Tunnel: Tunnel Management
User->>Tunnel: create tunnel via tunnel_open()
Tunnel->>Tunnel: skip DNS verification for quick tunnels
Tunnel->>Backend: wait_for_health_check() via httpx
loop Health check polling
Tunnel->>Backend: GET /health
alt Health check passes
Backend-->>Tunnel: 200 OK
Tunnel-->>User: tunnel ready
else Check fails/timeout
Tunnel->>Tunnel: sleep 0.5s, retry
end
end
User->>Tunnel: tunnel_close(lease_id)
Tunnel->>Tunnel: cleanup connector state
|
Comment on lines
+75
to
+76
| if event_type.endswith("job.completed") or event_type.endswith(".job.completed"): | ||
| return True |
Contributor
There was a problem hiding this comment.
The second condition endswith(".job.completed") is redundant - any string ending with .job.completed will already match endswith("job.completed"). Consider simplifying to just event_type.endswith("job.completed")
Suggested change
| if event_type.endswith("job.completed") or event_type.endswith(".job.completed"): | |
| return True | |
| if event_type.endswith("job.completed"): |
Prompt To Fix With AI
This is a comment left during a code review.
Path: synth_ai/core/streaming/streamer.py
Line: 75:76
Comment:
The second condition `endswith(".job.completed")` is redundant - any string ending with `.job.completed` will already match `endswith("job.completed")`. Consider simplifying to just `event_type.endswith("job.completed")`
```suggestion
if event_type.endswith("job.completed"):
```
How can I resolve this? If you propose a fix, please make it concise.
Comment on lines
+90
to
+91
| if event_type.endswith("job.failed") or event_type.endswith(".job.failed"): | ||
| return True |
Contributor
There was a problem hiding this comment.
Same redundancy - endswith(".job.failed") is a subset of endswith("job.failed")
Suggested change
| if event_type.endswith("job.failed") or event_type.endswith(".job.failed"): | |
| return True | |
| if event_type.endswith("job.failed"): |
Prompt To Fix With AI
This is a comment left during a code review.
Path: synth_ai/core/streaming/streamer.py
Line: 90:91
Comment:
Same redundancy - `endswith(".job.failed")` is a subset of `endswith("job.failed")`
```suggestion
if event_type.endswith("job.failed"):
```
How can I resolve this? If you propose a fix, please make it concise.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.