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

demo: shiny app (Python) #83

Closed
edublancas opened this issue Jan 26, 2024 · 8 comments
Closed

demo: shiny app (Python) #83

edublancas opened this issue Jan 26, 2024 · 8 comments
Assignees

Comments

@edublancas
Copy link
Contributor

a sample shiny app with Python: https://shiny.posit.co/py/

we don't support shiny yet so we'll need to deploy it via the docker option: https://docs.cloud.ploomber.io/en/latest/apps/docker.html

requirements

@edublancas
Copy link
Contributor Author

I just added docs for shiny express, regular shiny should be pretty similar: https://docs.cloud.ploomber.io/en/latest/apps/shiny-express.html

@neelasha23
Copy link
Contributor

This looks interesting: https://divine-rain-1541.ploomberapp.io/
Description of the template:

Shiny allows you to reactively update your app whenever an external data source changes. This application simulates that situation by writing data to a sqlite database after a random time period. Shiny polls the database every second to see if there is any new data, and if there it pulls the updated data and refreshes any elements which depend on that data. This application also uses dynamic UI to generate informative value boxes which tell the user when the model score falls below a certain threshold.

We can do something similar to https://sklearn-evaluation.ploomber.io/en/latest/comparison/nn_tracking.html

@neelasha23
Copy link
Contributor

Can I start on this? @edublancas

@edublancas
Copy link
Contributor Author

yes, this sounds like a good idea!

I'm guessing you're going to generate some fake data to populate the dashboard?

@neelasha23
Copy link
Contributor

no I think we can use some dataset and train and , it on every epoch write the losses and accuracy values in a sqlite db, just like we did using the sqlitetracker. and then the dashboard can pick up dynamically. I'll try this way and see if it works @edublancas

@edublancas
Copy link
Contributor Author

edublancas commented Jan 31, 2024

the problem is that you'll need two concurrent processes: the shiny one and the one that trains the model. you might get that to work in a single dockerfile but it'll be confusing to users because they'll have no control over the training process. and the resources provided for the app are small, so training will take a lot of time.

what you can do is to write to a remote database. you start the training process locally and write to a remote db and then shiny reads that db, this is much more appealing because users will be able to see how changes in their terminal reflect in real-time in the dashboard

but you'll need to find a free db provider, if you can use mongo db, that's a good option because it's a a big company and there's less of a chance that they'll change their free tier https://www.mongodb.com/pricing

@neelasha23
Copy link
Contributor

sure I'll try this way!

@edublancas
Copy link
Contributor Author

@neelasha23 remember to put "closes #X" in your PRs so the issue is closed automatically

closed by #105

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

No branches or pull requests

2 participants