发布

  • [OPIK-2770] [Python BE] Add optimization log streaming to Redis for Studio (#4538)

    frostbyte_neo 发布于 2025-12-23 15:33:14 +00:00

    • [OPIK-2770] [SDK] Add optimization log streaming to Redis for Studio
    • Add RedisBatchLogCollector for streaming subprocess logs to Redis
    • Capture stdout/stderr from optimizer subprocess with Rich formatting
    • Store logs in Redis LIST with metadata in HASH (last_append_ts, status)
    • Implement deduplication for Rich progress bar spinner lines
    • Configure terminal width via STUDIO_LOG_TERM_WIDTH env var
    • Set TTL on Redis keys for automatic cleanup

    Demo: https://grid-comet-ml.enterprise.slack.com/files/U06VAFE2L8J/F0A54BNP34M/screenshare_-_2025-12-23_10_49_10_am.mp4

    • Fix: Restore JSON parsing in BatchLogCollector._read_stream
    • BatchLogCollector parses JSON logs to extract structured fields (for HTTP backend)
    • RedisBatchLogCollector overrides _read_stream to emit raw lines (for Redis storage)
    • This fixes test_subprocess_logging tests that expect JSON parsing
    • Addressing Ido PR review

    • Update Helm documentation

    • Update apps/opik-python-backend/src/opik_backend/jobs/optimizer_runner.py

    Co-authored-by: baz-reviewer[bot] <174234987+baz-reviewer[bot]@users.noreply.github.com>


    Co-authored-by: CometActions github-actions@comet.com
    Co-authored-by: baz-reviewer[bot] <174234987+baz-reviewer[bot]@users.noreply.github.com>

    下载附件