Skip to content
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

Add log streaming to the created job #680

Merged
merged 6 commits into from
Dec 18, 2024
Merged

Add log streaming to the created job #680

merged 6 commits into from
Dec 18, 2024

Conversation

amritghimire
Copy link
Contributor

@amritghimire amritghimire commented Dec 9, 2024

When running a job from studio, this adds a log streaming which checks
for the updates from the Studio.

Related PR: https://github.com/iterative/studio/pull/11068

image

When running a job from studio, this adds a log streaming which checks
for the updates from the Studio.

Relate PR: iterative/studio#11068
Copy link

cloudflare-workers-and-pages bot commented Dec 9, 2024

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: a19394b
Status: ✅  Deploy successful!
Preview URL: https://b8e72553.datachain-documentation.pages.dev
Branch Preview URL: https://amrit-stream-logs.datachain-documentation.pages.dev

View logs

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 72.09302% with 12 lines in your changes missing coverage. Please review.

Project coverage is 87.38%. Comparing base (10e90c5) to head (a19394b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/datachain/studio.py 54.54% 7 Missing and 3 partials ⚠️
src/datachain/remote/studio.py 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #680      +/-   ##
==========================================
- Coverage   87.44%   87.38%   -0.07%     
==========================================
  Files         114      114              
  Lines       10898    10939      +41     
  Branches     1499     1506       +7     
==========================================
+ Hits         9530     9559      +29     
- Misses        990      999       +9     
- Partials      378      381       +3     
Flag Coverage Δ
datachain 87.32% <72.09%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dreadatour dreadatour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for this update 🥰

src/datachain/remote/studio.py Outdated Show resolved Hide resolved
Co-authored-by: Helio Machado <0x2b3bfa0+git@googlemail.com>
Copy link
Member

@0x2b3bfa0 0x2b3bfa0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not sure WebSockets are a good idea, especially for log streaming. I'm not even talking about SSE here, but even about plain old polling.

src/datachain/remote/studio.py Show resolved Hide resolved
Copy link
Member

@0x2b3bfa0 0x2b3bfa0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works, but I wonder if it should be closer to real-time; the following example seems to be buffering the whole output and takes ages to print the logs: 🧐

datachain studio run test.py

import time

for number in range(60 * 60):
  time.sleep(0.1)
  print(number)

@amritghimire
Copy link
Contributor Author

amritghimire commented Dec 18, 2024

It works, but I wonder if it should be closer to real-time; the following example seems to be buffering the whole output and takes ages to print the logs: 🧐

datachain studio run test.py

import time


for number in range(60 * 60):
  time.sleep(0.1)
  print(number)

Found an possible cause in Studio side. Working on it alongside the test cases for this.

@amritghimire amritghimire merged commit b8e9856 into main Dec 18, 2024
33 of 34 checks passed
@amritghimire amritghimire deleted the amrit/stream-logs branch December 18, 2024 02:59
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.

3 participants