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

feature: stream logs in chunks #1856

Closed
wants to merge 4 commits into from
Closed

Conversation

saikonen
Copy link
Collaborator

attempts to read logs with a fixed byte offset instead of all at once. Motivation is to decrease memory consumption when handling massive log files.

@@ -144,3 +150,34 @@ def iter_results():
yield r.key, None, None

return CloseAfterUse(iter_results(), closer=s3)

def stream_bytes(self, paths, chunk_size=2**1024):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

default chunk_size choice is arbitrary here, mainly for testing purposes. For the UI Backend case this should probably be made configurable.

savingoyal
savingoyal previously approved these changes May 24, 2024
@saikonen
Copy link
Collaborator Author

saikonen commented Jun 5, 2024

closing this as unnecessary for the planned metaflow-service feature

@saikonen saikonen closed this Jun 5, 2024
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.

2 participants