Skip to content

Commit

Permalink
Removed xgboost, removed update_script from action workflow that was …
Browse files Browse the repository at this point in the history
…causing errors, fixed bookmaker_scraper version
  • Loading branch information
nickpadd committed Feb 26, 2024
1 parent d520c3f commit 6dfcf5b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/script_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ jobs:
#----------------------------------------------
# run updates
#----------------------------------------------
- name: Run updates script
run: |
source $VENV
python run_updates.py
#- name: Run updates script
# run: |
# source $VENV
# python run_updates.py

#----------------------------------------------
# run predictions
Expand Down
4 changes: 0 additions & 4 deletions europeanfootballleaguepredictor/common/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ def load_configuration_class(self, config_data) -> dataclass:
module_path = 'sklearn.svm'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, config_data['model']['regressor'])
if config_data['model']['regressor'] == 'XGBRegressor':
module_path = 'xgboost'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, config_data['model']['regressor'])

self.config = Configuration(
league= config_data['league'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from sklearn.linear_model import PoissonRegressor
from sklearn.preprocessing import MinMaxScaler
from loguru import logger
import xgboost
import json

class FootballPredictor(BaseModel):
Expand Down
7 changes: 1 addition & 6 deletions predictor_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import importlib
import os
import argparse
import xgboost
from europeanfootballleaguepredictor.data.database_handler import DatabaseHandler


Expand Down Expand Up @@ -39,10 +38,6 @@ def league_predictions_figure(league_name, regressor_str, matchdays_to_drop, lon
module_path = 'sklearn.svm'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, regressor_str)
if regressor_str == 'XGBRegressor':
module_path = 'xgboost'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, regressor_str)

parser = argparse.ArgumentParser()
parser.add_argument("--config", type=str, help="Path to the configuration file (e.g., config.yaml)", default='europeanfootballleaguepredictor/config/config.yaml')
Expand Down Expand Up @@ -78,7 +73,7 @@ def main():
with gr.Blocks() as iface:
with gr.Row():
drop1 = gr.Dropdown(['EPL', 'Bundesliga', 'Ligue_1', 'La_Liga', 'Serie_A'], label="Select League")
drop3 = gr.Dropdown(['LinearRegression', 'PoissonRegressor', 'SVR', 'XGBRegressor'], label="Select regressor Type")
drop3 = gr.Dropdown(['LinearRegression', 'PoissonRegressor', 'SVR'], label="Select regressor Type")
with gr.Row():
with gr.Column(scale=1, min_width=600):
slide1 = gr.Slider(minimum=0, maximum=10, step=1, value=4, show_label=True, interactive=True, label="Select number of matchdays to drop")
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ matplotlib = "^3.8.1"
seaborn = "^0.13.0"
mlflow = "^2.8.0"
gradio = "^4.7.1"
xgboost = "^2.0.3"
ipykernel = "^6.29.2"
selenium = "^4.17.2"
undetected-chromedriver = "^3.5.4"
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,5 @@ websocket-client==1.6.4 ; python_version >= "3.9" and python_version < "4.0"
websockets==11.0.3 ; python_version >= "3.9" and python_version < "4.0"
werkzeug==3.0.1 ; python_version >= "3.9" and python_version < "4.0"
win32-setctime==1.1.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32"
xgboost==2.0.3 ; python_version >= "3.9" and python_version < "4.0"
yarl==1.9.3 ; python_version >= "3.9" and python_version < "4.0"
zipp==3.17.0 ; python_version >= "3.9" and python_version < "4.0"

0 comments on commit 6dfcf5b

Please sign in to comment.