oumi icon indicating copy to clipboard operation
oumi copied to clipboard

[Feature] Add loading spinner during interactive inference

Open wizeng23 opened this issue 8 months ago • 13 comments

Feature request

Since we don't support streaming yet, there is no visual indication that progress is being made for inference, especially for outputs that take multiple seconds to minutes to generate. Adding a loading spinner can help alleviate this.

Motivation / references

Could use this existing _print_and_wait() fn from the job launcher: https://github.com/oumi-ai/oumi/blob/f4e90e794f31bcf87f906b6e496536c3e97c6614/src/oumi/cli/launch.py#L75. It would need to be modified so that the result of the function call is piped through and returned.

Your contribution

I'm happy to consult and provide help for whoever takes this on

wizeng23 avatar Mar 06 '25 22:03 wizeng23

I can help work on this one.

jackz261 avatar Mar 09 '25 18:03 jackz261

Thanks Jack! Let me know if you have any questions.

wizeng23 avatar Mar 10 '25 19:03 wizeng23

Hi @wizeng23 ,

I can take it up if it is available again.

shivam096 avatar Mar 30 '25 04:03 shivam096

@shivam096 it's all yours!

nikg4 avatar Apr 01 '25 19:04 nikg4

Thanks @nikg4 for assigning the issue.

@wizeng23 can you help me with a brief about the requirement and also it would really help me if you could also provide any resource that could help me with the task.

shivam096 avatar Apr 01 '25 21:04 shivam096

Hi Shivam, the description for this Feature at the top should have most of the details you need. This is the call where the spinner should be displayed: https://github.com/oumi-ai/oumi/blob/47df09e9b36344988d7ca653a888305d8d9a02d9/src/oumi/infer.py#L58

wizeng23 avatar Apr 01 '25 21:04 wizeng23

Hi team! I’d love to take this up if it’s still available. I’ve gone through the code references in infer.py and launch.py and I’m planning to wrap the infer() call with a modified _print_and_wait() to show a loading spinner during interactive inference.

Let me know if there’s anything specific you'd like me to keep in mind before I get started. Thanks!

swapnilbanduke avatar Jul 29 '25 04:07 swapnilbanduke

Sure! Assigned the task to you.

wizeng23 avatar Jul 29 '25 16:07 wizeng23

Hi @wizeng23 , I’d love to contribute to this issue! Since my background is in UX/UI design, I can create a simple, user-friendly loading spinner concept in Figma (e.g., animated dots or a circular loader) that aligns with Oumi’s style. I’ll share both a minimal and a more creative option for the team to review, so developers can easily implement the one that best suits their needs. Please let me know if you’d like me to proceed. I’m excited to help improve the user experience here!

Thanks, Paniz

panizniksiar avatar Sep 03 '25 18:09 panizniksiar

Hey Paniz, thank you for your interest in this issue! This feature is actually for our CLI tool, so the output has to be all characters. We already have an implementation for a loading spinner here: https://github.com/oumi-ai/oumi/blob/f4e90e794f31bcf87f906b6e496536c3e97c6614/src/oumi/cli/launch.py#L79

wizeng23 avatar Sep 03 '25 19:09 wizeng23

@wizeng23 Got it, thanks for clarifying! Since my background is more focused on UX/UI, I’d be happy to contribute if there are any design-related tasks or research needs (e.g., usability, accessibility, or interface improvements) in future issues. Please keep me in mind for anything user experience related. I’d love to get involved!

panizniksiar avatar Sep 03 '25 19:09 panizniksiar

Hi @swapnilbanduke and @wizeng23

As a new contributor looking to get involved, this good first issue seems like a great place to start. I have experience with Streamlit and understand the importance of good UI/UX during loading.

I've read the description and the suggestion to modify the _print_and_wait() function.

Is this issue still open for someone to take? If so, I'd love to claim it and start working on a PR.

VamsiMyla916 avatar Nov 11 '25 18:11 VamsiMyla916

Sounds good @VamsiMyla916 ,assigning to you! Feel free to reference PR #1656 which previously addressed, but was closed due to inactivity.

wizeng23 avatar Nov 11 '25 22:11 wizeng23