-
Notifications
You must be signed in to change notification settings - Fork 60
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
ENH: Verbose tracking #714
Conversation
d7e3c04
to
d04c2ff
Compare
Build passed ! Good Job 🍻 ! |
1 similar comment
Build passed ! Good Job 🍻 ! |
Yay ! I actually do it locally anyway, so I'm all for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Petite suggestion dans le tracking dipy. Idéalement, le tracking dev et le PFT seraient aussi verboses.
if scaled_min_length <= length(s) <= scaled_max_length)) | ||
if args.verbose: | ||
filtered_streamlines, seeds = \ | ||
zip(*((s, p) for s, p in tqdm( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu pourrais wrapper tqdm pour sauver un if-else imbriqué. Au dessus de if args.save_seeds, tu pourrais déclarer un truc du genre (pas testé)
def tqdm_wrapper(generator, *args, **kwargs):
if args.verbose:
return tqdm(generator, args, kwargs)
return generator
Pis après utiliser tqdm_wrapper(streamlines_generator)
partout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, bonne idée. Je vais checker ça.
J'ai essayé dans le dev. Mais le tqdm dans la boucle for fonctionne pas avec le multi-processing. J'ai checké un peu et j'ai trouvé des solutions dans le cas de générateurs, mais pas dans des boucles qu'on update manuellement. Si tu trouves comment, hésite pas! |
Build Failed 💥 |
Build Failed 💥 |
Tests pass locally. @arnaudbore or @frheault can you help me find the bug? |
Build Failed 💥 |
b8088b7
to
b895ddd
Compare
Build passed ! Good Job 🍻 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GTG
Just for a better user experience. Previously, option -v in scil_compute_local_tracking did not output any verbose at all. No way to know if the code has even started.
Using TQDM, with a refresh rate of 1% of the total number of seeds (only with option -v).
Also sneeking in a verification of the format with save_seed option.
Example of output: