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 option to remove (or modify behaviour) progress bar #65

Closed
scarlehoff opened this issue Dec 1, 2022 · 14 comments
Closed

Add option to remove (or modify behaviour) progress bar #65

scarlehoff opened this issue Dec 1, 2022 · 14 comments
Labels
enhancement New feature or request

Comments

@scarlehoff
Copy link
Member

The progress bar looks nice but if one is in a metered or low-bandwith connection over ssh the constant update apparently takes quite some data.

@scarlehoff scarlehoff added the enhancement New feature or request label Dec 1, 2022
@cschwan
Copy link
Contributor

cschwan commented Dec 1, 2022

I think this will be fixed with the move to Grid::evolve in PineAPPL which doesn't show any progress, because it's much faster.

@scarlehoff
Copy link
Member Author

"It's so much faster that it doesn't need a progress bar", that's a good tag line :P

@alecandido
Copy link
Member

In any case, I take the message, and we should add a --no-interaction global option.

@cschwan
Copy link
Contributor

cschwan commented Dec 1, 2022

So technically this will be a non-issue when #49 will be merged.

@alecandido
Copy link
Member

So technically this will be a non-issue when #49 will be merged.

Pineko is not only doing convolutions, but yes, #49 will solve the specific issue.

Even though, even if takes ~10s for big sets, I would show a bar the same. It is not intuitive to get a program stuck with no output, if you don't at least warn the user in advance (but maybe also big grids with big ekos are convoluted in <1s, is this the case?)

@cschwan
Copy link
Contributor

cschwan commented Dec 1, 2022

For timings see NNPDF/pineappl#184 (comment); the entire theory 208 took roughly 10 mins. Personally I dislike libraries (not programs) printing to stdout if everything goes OK, and I'd like to keep it that way and I rather spend more time on optimizing the code then showing a progress bar. If the code ever gets stuck, that's a bug and it should be fixed, of course. However, that shouldn't happen - maybe we'll just have to implement #49 and see how it 'feels'.

@scarlehoff
Copy link
Member Author

We can have a "evolving, could take a few minutes..." and then most of the time takes seconds which makes people using it happy because it is so fast.

@alecandido
Copy link
Member

alecandido commented Dec 1, 2022

We can have a "evolving, could take a few minutes..." and then most of the time takes seconds which makes people using it happy because it is so fast.

Indeed, this is a possible solution.
However, consider that Pineko itself is mostly used as a program, and PineAPPL CLI is also a program. So, being programs, they have human users, and human users need UI (I agree on libraries, since they are consumed by other programs).

@felixhekhorn
Copy link
Contributor

The problem is how to feed the information/progress from inside the library to the program outside ... (possible solutions might be a console argument or just a boolean argument ...)

@cschwan
Copy link
Contributor

cschwan commented Dec 5, 2022

I suggest that we simply make the transition from Grid::convolute_eko to Grid::evolve and see if it's really a problem.

@felixhekhorn
Copy link
Contributor

I still agree with @cschwan above - just to point out that this is (quasi) in conflict with #77

@alecandido
Copy link
Member

Proper solution to both issues would be a mechanism to pass the information to the caller. Like exposing a pointer to a structure that will be updated with progresses.

Nothing is printed, so the library itself is not doing it, but the application calling the library can decide to print on its own.

Unfortunately, this is rather complex, since it requires async programming, otherwise the control would never return to the caller, and it would be impossible to print anything.

@scarlehoff
Copy link
Member Author

The progress bar is gone as far as I can see.

@alecandido
Copy link
Member

The progress bar is gone as far as I can see.

Yes, @cschwan speeded up PineAPPL evolution, such that we don't need it any longer, and we don't waste time deciding what to do :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants