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

Print x / N for subtargets? #1102

Closed
2 tasks done
kendonB opened this issue Dec 10, 2019 · 7 comments
Closed
2 tasks done

Print x / N for subtargets? #1102

kendonB opened this issue Dec 10, 2019 · 7 comments
Assignees

Comments

@kendonB
Copy link
Contributor

kendonB commented Dec 10, 2019

Prework

Proposal

In cases where the number of subtargets for a given dynamic target is known, it would be great to print something like

subtarget x/N target_name_hash

to give an indicator of progress. Is this feasible? Even when N is unknown you could still print x.

P.S. I have tried out the dynamic branching version of map with clustermq and SLURM and it seems to be working great!

@wlandau
Copy link
Member

wlandau commented Dec 10, 2019

Glad to hear dynamic branching is working well for you.

Sorry, but I hesitate to add more to the console messages because things tend to get visually busy very easily and there is extra bookkeeping involved that could slow us down (particularly for x). Believe it or not, printing to the console adds a surprising amount of overhead if the number of targets is large and each target is quick. I see it all the time in profiling studies nowadays. I suspect that assigning and keeping track of integer sub-target indices will have a similar cost.

@wlandau wlandau closed this as completed Dec 10, 2019
@kendonB
Copy link
Contributor Author

kendonB commented Dec 10, 2019

I would still urge you to consider some optional progress indication.

@wlandau
Copy link
Member

wlandau commented Dec 10, 2019

How do you feel about progress(), running(), and failed()?

@kendonB
Copy link
Contributor Author

kendonB commented Dec 10, 2019

I haven't used them until now but there's definitely value there.

However, those functions can only tell me about what has happened or is going on now. To really know progress we also need to know how much is to come.

Is there any feaible way to have drake also know N above? Even in a limited number of cases or as a guess? Or for a particular target that has already started and is currently calculating subtargets?

@wlandau
Copy link
Member

wlandau commented Dec 10, 2019

It does, actually.

ndeps <- length(subtargets_build)

Right under here, we could insert config$logger$minor("register", ndeps, "subtargets", target = target).

@wlandau wlandau reopened this Dec 10, 2019
@wlandau
Copy link
Member

wlandau commented Dec 10, 2019

That way, you will see it in the console_log_file.

@wlandau
Copy link
Member

wlandau commented Dec 10, 2019

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants