-
Notifications
You must be signed in to change notification settings - Fork 16
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
Shiny (Python) ML training example #105
Conversation
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.
please deploy the app so I can test it
readme zip removed unused function shiny doc removed parallel function shiny core toc renamed folder rename
Addressed the comments. App is deployed here: https://crimson-glade-4646.ploomberapp.io/ |
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.
Hi @neelasha23
I have cleared the db because it's a realtime monitoring. you need to connect to ur mongodb account and run training scripts from local and view the plot in the dashboard. have added instructions in the README @lfunderburk |
the polling logic is off: I tried the app many times (both the ploomberapp.io one and locally) and I only got it one time to work. I debugged it by printing the value of I changed the def last_modified():
n = my_collection.count_documents({})
return n and it worked better: as soon as I started training, the plot started updating. but I found another issue: the values in the plot did not match the values printed from the terminal and when starting to train another model, the plot didn't show a new line: 2024-02-03.8.57.55.a.m.mp4 |
I haven't been able to reproduce the timestamp not getting updated issue. Did you try with my account? I had selected an Indian server, so I'm doubting if that's causing a lag. Screen.Recording.2024-02-05.at.8.27.21.PM.mov |
@neelasha23 the problem is most likely the but there's no need to reproduce it since I already provided a fix: def number_of_observations():
n = my_collection.count_documents({})
return n this function will trigger an update as soon as there is a new element in the collection |
Fixed the polling function: https://github.com/ploomber/doc/pull/105/files#diff-c99010220192b232032cc417d9e26e799aa65a2dd2fbb5dd79b5595548293670R33-R38 Although I did not completely understand why polling the timestamp column would be an issue. Even if datetime generates in local timezone it will still get accurately stored in MongoDB. And the polling function keeps checking this stored timestamp to detect if any new row has been added. You also mentioned that even after changing the polling function the timestamps in the plot are not matching the training ones , but I don't see that happening in my local. Which is why I feel maybe there's a lag between the training and the storage/retrieval process in your case? Screen.Recording.2024-02-06.at.10.50.53.AM.mov |
Add Shiny example
📚 Documentation preview 📚: https://ploomber-doc--105.org.readthedocs.build/en/105/