Skip to content

Commit

Permalink
pysp not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan1999 committed Dec 28, 2023
1 parent 7b13016 commit 0463e19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 41 deletions.
16 changes: 0 additions & 16 deletions exp.py

This file was deleted.

6 changes: 0 additions & 6 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from sklearn.preprocessing import LabelEncoder, MinMaxScaler
import math
import matplotlib.pyplot as plt, joblib
import pysplitter as pysp


# from sklearn.linear_model import LinearRegression
Expand Down Expand Up @@ -210,11 +209,6 @@ def train(fname, max_depth=-1):

joblib.dump(model, f"model/{os.path.basename(fname)}.joblib")

pysp.split(
f"model/{os.path.basename(fname)}.joblib",
f"model",
5000000,
)
return model


Expand Down
28 changes: 9 additions & 19 deletions serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from model import features
import streamlit_analytics
import pysplitter as pysp

# features = [
# "batting_team",
Expand Down Expand Up @@ -78,25 +77,16 @@ def save_history(fname, row, total_balls):


def load_model(format):
format = format.lower()
pysp.unsplit(
f"model/{format}*.split",
f"model/{format}.feather.joblib",
return joblib.load(
"model/"
+ (
"t20features.feather.joblib"
if format == "T20"
else "odifeatures.feather.joblib"
if format == "ODI"
else None
)
)
return joblib.load(f"model/{format}.feather.joblib")


# def load_model(format):
# return joblib.load(
# "model/"
# + (
# "t20features.feather.joblib"
# if format == "T20"
# else "odifeatures.feather.joblib"
# if format == "ODI"
# else None
# )
# )


def simulator(args, format):
Expand Down

0 comments on commit 0463e19

Please sign in to comment.