kyleskom / NBA-Machine-Learning-Sports-Betting

NBA sports betting using machine learning
1.23k stars 443 forks source link

Cannot parse keras metadata #410

Closed Quantbrinx closed 8 months ago

Quantbrinx commented 8 months ago

Hi all,

install everything as instructed. having trouble running it when I use the: python main.py -xgb -odds=betmgm command. I get the following error: File "C:\Users\Stotle\Documents\NBA ML\NBA-Machine-Learning-Sports-Betting\main.py", line 9, in from src.Predict import NN_Runner, XGBoost_Runner File "C:\Users\Stotle\Documents\NBA ML\NBA-Machine-Learning-Sports-Betting\src\Predict\NN_Runner.py", line 12, in model = load_model('Models/NN_Models/Trained-Model-ML-1699315388.285516') File "C:\Users\Stotle\Documents\NBA ML\NBA-Machine-Learning-Sports-Betting\venv\lib\site-packages\keras\src\saving\saving_api.py", line 262, in load_model return legacy_sm_saving_lib.load_model( File "C:\Users\Stotle\Documents\NBA ML\NBA-Machine-Learning-Sports-Betting\venv\lib\site-packages\keras\src\utils\traceback_utils.py", line 70, in error_handler raise e.with_traceback(filtered_tb) from None File "C:\Users\Stotle\Documents\NBA ML\NBA-Machine-Learning-Sports-Betting\venv\lib\site-packages\keras\src\saving\legacy\saved_model\load.py", line 113, in load raise IOError( OSError: Cannot parse keras metadata at path Models/NN_Models/Trained-Model-ML-1699315388.285516\keras_metadata.pb: Received error: Error parsing message

any ideas or solutions? Any help is appreciated. Thanks

Scandianis commented 8 months ago

I think you are trying to load a non existing model:

model = load_model('Models/NN_Models/Trained-Model-ML-1699315388.285516')

Have a look in your Models directory and load a model created there after you trained on new data.

HyakuzaO commented 8 months ago

@Scandianis could you please read my topic #412? You helped me alot ty very much

Scandianis commented 8 months ago

@HyakuzaO - I will have a look.

HyakuzaO commented 8 months ago

@Scandianis Many thanks

HyakuzaO commented 8 months ago

@Scandianis Can you help me bro please?

yampara commented 8 months ago

See this, https://github.com/kyleskom/NBA-Machine-Learning-Sports-Betting/discussions/355