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

feat: add master logs [DET-3680] #1007

Merged
merged 7 commits into from
Aug 6, 2020

Conversation

hamidzr
Copy link
Member

@hamidzr hamidzr commented Aug 4, 2020

Description

a port of #988

Test Plan

Commentary (optional)

master/internal/api_master.go Outdated Show resolved Hide resolved
master/internal/api_master.go Outdated Show resolved Hide resolved
@hamidzr hamidzr requested a review from stoksc August 4, 2020 17:43
offset, limit := effectiveOffsetNLimit(int(req.Offset), int(req.Limit), total)

for {
for _, log := range a.m.logs.Entries(offset, -1, limit) {
Copy link
Member Author

@hamidzr hamidzr Aug 4, 2020

Choose a reason for hiding this comment

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

@stoksc wouldn't this pin the CPU if there are no logs to send and the user has req.Follow set?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, looks like it would to me, nice catch. We could add a tiny timeout if it grabs a slice of entries without any logs (there are other things I can think of doing, but they're an order of magnitude more work)?

Copy link
Member Author

@hamidzr hamidzr Aug 5, 2020

Choose a reason for hiding this comment

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

alright that sounds good for now. I rather reserve more work for another PR so we can wrap this up without much change to the original work

Copy link
Contributor

@stoksc stoksc left a comment

Choose a reason for hiding this comment

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

nice catch with the for {} that's going to kill the cpu.

master/internal/api_master.go Outdated Show resolved Hide resolved
master/internal/api_master.go Outdated Show resolved Hide resolved
offset, limit := effectiveOffsetNLimit(int(req.Offset), int(req.Limit), total)

for {
for _, log := range a.m.logs.Entries(offset, -1, limit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, looks like it would to me, nice catch. We could add a tiny timeout if it grabs a slice of entries without any logs (there are other things I can think of doing, but they're an order of magnitude more work)?

@hamidzr hamidzr requested a review from stoksc August 5, 2020 21:13
@hamidzr hamidzr assigned stoksc and unassigned hamidzr Aug 5, 2020
@hamidzr hamidzr marked this pull request as ready for review August 5, 2020 21:13
Copy link
Contributor

@stoksc stoksc 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

master/internal/api_master.go Outdated Show resolved Hide resolved
@stoksc stoksc assigned hamidzr and unassigned stoksc Aug 6, 2020
@hamidzr hamidzr merged commit 7767524 into determined-ai:master Aug 6, 2020
@hamidzr hamidzr deleted the 3680-master-logs branch August 6, 2020 18:03
rb-determined-ai pushed a commit that referenced this pull request Oct 5, 2023
New test of HuggingFace examples/hf_trainer_api/hf_language_modeling on pytorch2.
Enabled for slurm_gpu + distributed marks.
rb-determined-ai pushed a commit that referenced this pull request Oct 10, 2023
New test of HuggingFace examples/hf_trainer_api/hf_language_modeling on pytorch2.
Enabled for slurm_gpu + distributed marks.
stoksc pushed a commit that referenced this pull request Oct 17, 2023
New test of HuggingFace examples/hf_trainer_api/hf_language_modeling on pytorch2.
Enabled for slurm_gpu + distributed marks.
rb-determined-ai pushed a commit that referenced this pull request Oct 27, 2023
New test of HuggingFace examples/hf_trainer_api/hf_language_modeling on pytorch2.
Enabled for slurm_gpu + distributed marks.
rb-determined-ai pushed a commit that referenced this pull request Oct 31, 2023
New test of HuggingFace examples/hf_trainer_api/hf_language_modeling on pytorch2.
Enabled for slurm_gpu + distributed marks.
rb-determined-ai pushed a commit that referenced this pull request Nov 2, 2023
New test of HuggingFace examples/hf_trainer_api/hf_language_modeling on pytorch2.
Enabled for slurm_gpu + distributed marks.
rb-determined-ai pushed a commit that referenced this pull request Nov 2, 2023
New test of HuggingFace examples/hf_trainer_api/hf_language_modeling on pytorch2.
Enabled for slurm_gpu + distributed marks.
@dannysauer dannysauer added this to the 0.13.0 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants