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

Implement rich Progress Bars for CLI Commands in mlstacks #125

Open
1 task
strickvl opened this issue Jan 3, 2024 · 9 comments
Open
1 task

Implement rich Progress Bars for CLI Commands in mlstacks #125

strickvl opened this issue Jan 3, 2024 · 9 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@strickvl
Copy link
Contributor

strickvl commented Jan 3, 2024

Open Source Contributors Welcomed!

Please comment below if you would like to work on this issue!

Contact Details [Optional]

[email protected]

What happened?

Currently, the mlstacks CLI lacks visual feedback in the form of progress bars or spinners when executing commands like mlstacks deploy ... or mlstacks destroy .... This can leave users uncertain about the progress or status of these commands.

Task Description

Integrate Rich progress bars into the mlstacks CLI to provide users with real-time visual feedback when executing commands. The goal is to enhance the user experience by making the interface more interactive and informative without overwhelming the user with excessive visuals.

Expected Outcome

  • Smooth and visually appealing progress bars or spinners should be displayed during the execution of mlstacks deploy ... and mlstacks destroy ... commands.
  • The progress indicators should accurately represent the status and progression of the ongoing tasks.
  • The implementation should not significantly impact the performance of the commands.

Steps to Implement

  • Explore the Rich library and identify suitable progress bar or spinner styles for integration.
  • Implement the progress bars/spinners in the mlstacks CLI, particularly for the deploy and destroy commands.
  • Ensure that the progress indicators are accurately tied to the actual process milestones.
  • Test the implementation across different platforms to ensure consistent behavior and appearance.
  • (optionally) Update documentation to mention these new UI features for user awareness.

Additional Context

This enhancement aims to improve the overall user experience of the mlstacks CLI, making it more engaging and informative, which is especially helpful in managing expectations during longer-running processes.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@strickvl strickvl added enhancement New feature or request good first issue Good for newcomers labels Jan 3, 2024
@strickvl strickvl changed the title Implement Rich Progress Bars for CLI Commands in mlstacks Implement rich Progress Bars for CLI Commands in mlstacks Jan 3, 2024
@strickvl strickvl changed the title Implement rich Progress Bars for CLI Commands in mlstacks Implement rich Progress Bars for CLI Commands in mlstacks Jan 3, 2024
@code-master-ajay
Copy link

I would like to take this up.

@strickvl
Copy link
Contributor Author

strickvl commented Jan 5, 2024

Great. Let me know if you have any questions about this, and def take a look at our sister repo where we do similar things with progress bars etc.

@code-master-ajay
Copy link

Sure, thanks for letting me contribute.

@strickvl
Copy link
Contributor Author

strickvl commented Feb 4, 2024

@code-master-ajay any progress on this or questions about the implementation / approach you want to take?

@code-master-ajay
Copy link

Hi @strickvl, i looked up rich library and tried to use it with the terraform deploy function, but i am not able to get the terraform output in the code to be able to show the progress.

please let me know if i am doing something wrong, or should i try any other approach.
Sorry for the delayed update.

@strickvl
Copy link
Contributor Author

strickvl commented Feb 5, 2024

So I think it might be as simple as emulating how we handle it here: https://github.com/zenml-io/zenml/blob/cdd14528d674e0cafe00173755e556ea00c6343c/src/zenml/cli/integration.py#L274.

I.e. using the context handler around the deployment call. But in any case would be useful to see specifically what you tried as it's hard to give feedback without more information.

@code-master-ajay
Copy link

code-master-ajay commented Feb 5, 2024

i was trying to capture the stdout of tf.apply function, and create a progress bar like this :

Terraform Deployment ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--

Which would show the progress percentage and estimated time.

We could read the stdout if we use subprocess but i can't figure out how to do it using the terraform python library.

From the link you have shared i guess we just need to show a static line like
Deploying stack ...
until the terraform runs.

@strickvl
Copy link
Contributor Author

strickvl commented Feb 5, 2024

Yeah no need to make it so complicated, I think :) The console.status() method shows a spinner, so I think that's basically what we're looking for.

@code-master-ajay
Copy link

Sure @strickvl , I will do that . Thanks for the guidance :)

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

No branches or pull requests

2 participants