cmunch1 / nba-prediction

A project to deploy an online app that predicts the win probability for each NBA game every day. Demonstrates end-to-end Machine Learning deployment.
https://cmunch1.github.io/nba-prediction/
218 stars 35 forks source link

love your work but forked it and having issues #7

Open Tw1zT3d2four7 opened 3 months ago

Tw1zT3d2four7 commented 3 months ago

File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script exec(code, module.dict) File "/workspaces/nba-prediction/src/streamlit_app.py", line 49, in raise Exception('Set environment variable HOPSWORKS_API_KEY')

love your work but forked it and having issues

cmunch1 commented 3 months ago

Thanks for your interest!

The error occurs when the streamlit app tries to read in the Hopsworks api key. Probably the error is that the environment you are running it from does not have the api key set.

  1. Do you have an account at Hopsworks.ai? This is a free service that this program uses for its Feature Store.
  2. Have you setup the Feature Store? Notebook 08 will create the initial Feature Store. Run Notebook 00 first to make sure all the data is up to date first.
  3. The api key is like a password that allows you to access your Feature Store. You don’t want this stored in code, so the approach employed here is to store it as an environment variable. Most environments like GitHub Actions and the Streamlit server provide a means to store environment variables.

NOTE - If you can wait a couple of months, I am in the process of redoing the project with one of the goals is to make it easier for people to duplicate the project on their own and possibly make it easier to apply it to different sports, and I plan to write a blog/tutorial with step-by-step instructions and explanations. I also plan to make the core logic less dependent on other software services, so Hopsworks won’t be necessary in the new version.