Hello,
I’d like to know if you can recommend any best practices (tips, do’s & don’ts) when using Streamlit for MLOps purposes?
I’m compiling some material to teach my students.
Thanks
This depends on how extensive the “ML part” of the project is. However, from my experience the following helps in most projects:
-
Inculcating a habit of creating docker images appropriately (for some projects one might need to use a different python image or nvidia gcc image)
-
Using dockerignore to avoid notebooks,logs,etc on the image
-
Setting up a mkdocs branch (or Sphinx if one wishes to spend more time) for the streamlit application especially if it has multiple functionalities on multiple pages and has different util files comprising tens or maybe hundreds of methods/functions for data processing/prediction, etc saves a lot of time for the developer/team to maintain the code and return to add/remove features
-
Managing secrets appropriately
-
Setting up GitHub Actions for code quality checks
-
DVC for any input data used in the streamlit app for analysis
-
Pre-Commit for better code checking + unit test enforcement (of individual functions at times)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.