Skip to content

Conversation

@ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Apr 11, 2024

Linked to #1351 from Chris

@ mention of reviewers

@ihsaan-ullah

A brief description of the purpose of the changes contained in this PR.

If a submission writes a output line larger than the stream buffer size ( default 64k ) a LimitOverrunError will be raise. Rather than using readline(...) use readutil(....) and in the case of a overrun just return the current buffer, the rest of the line will be returned with the next read.

A checklist for hand testing

  • Tested with local worker connected to codabench.org

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

cjh1 and others added 2 commits March 5, 2024 19:48
If a submission writes a output line larger than the stream buffer
size ( default 64k ) a LimitOverrunError will be raise. Rather than
using readline(...) use readutil(....) and in the case of a overrun
just return the current buffer, the rest of the line will be returned
with the next read.

Signed-off-by: Chris Harris <cjh@lbl.gov>
Prevent LimitOverrunError with large output lines
@ihsaan-ullah
Copy link
Collaborator Author

ihsaan-ullah commented Apr 11, 2024

Tested

@cjh1 Thanks a lot for the change.

when you don't have this change and you print the following in your ingestion or scoring program, your submission will be stuck in Running and compute worker code will crash

more_than_64k = "a" * 64000 + "BREAK_POINT" + "b" * 6000
print(more_than_64k)

With this change from Chris compute worker will not crash and will return prints normally.

@ihsaan-ullah ihsaan-ullah changed the title Limit over run outpuut Limit over run output Apr 11, 2024
@Didayolo Didayolo self-assigned this Apr 11, 2024
@Didayolo
Copy link
Member

Note for myself: need to update the compute worker docker image for testing and deployment.

@Didayolo Didayolo merged commit e2bab19 into develop Apr 12, 2024
@Didayolo Didayolo deleted the limit_over_run_outpu branch April 12, 2024 09:27
@Didayolo
Copy link
Member

Didayolo commented Apr 12, 2024

@ihsaan-ullah @cjh1

Updating all compute workers is needed to take this change into account.

Are you using your own queue of compute workers?

This was referenced Apr 12, 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.

4 participants