From 70ab6c04d2310536bd06cbb99649d1c58e2fd2d1 Mon Sep 17 00:00:00 2001 From: saanikat Date: Fri, 13 Sep 2024 16:34:37 -0400 Subject: [PATCH] instantiation issue solved --- bedms/utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bedms/utils.py b/bedms/utils.py index 67dbd2e..632c1d9 100644 --- a/bedms/utils.py +++ b/bedms/utils.py @@ -186,7 +186,7 @@ def data_encoding( X_values_embeddings = embeddings if schema == "ENCODE": # Bag of Words Vectorizer - vectorizer = CountVectorizer() + vectorizer = None vc_path = hf_hub_download( repo_id=REPO_ID, filename=ENCODE_VECTORIZER_FILENAME, @@ -202,7 +202,7 @@ def data_encoding( # print(transformed_columns) X_values_bow = transformed_columns # Label Encoding - label_encoder = LabelEncoder() + label_encoder =None lb_path = hf_hub_download( repo_id=REPO_ID, filename=ENCODE_LABEL_ENCODER_FILENAME, @@ -211,7 +211,7 @@ def data_encoding( label_encoder = pickle.load(f) elif schema == "FAIRTRACKS": - vectorizer = CountVectorizer() + vectorizer = None vc_path = hf_hub_download( repo_id=REPO_ID, filename=FAIRTRACKS_VECTORIZER_FILENAME ) @@ -226,7 +226,7 @@ def data_encoding( # print(transformed_columns) X_values_bow = transformed_columns # Label Encoding - label_encoder = LabelEncoder() + label_encoder = None lb_path = hf_hub_download( repo_id=REPO_ID, filename=FAIRTRACKS_LABEL_ENCODER_FILENAME, @@ -235,7 +235,7 @@ def data_encoding( label_encoder = pickle.load(f) elif schema == "BEDBASE": - vectorizer = CountVectorizer() + vectorizer = None vc_path = hf_hub_download(repo_id=REPO_ID, filename=BEDBASE_VECTORIZER_FILENAME) with open(vc_path, "rb") as f: vectorizer = pickle.load(f) @@ -248,7 +248,7 @@ def data_encoding( # print(transformed_columns) X_values_bow = transformed_columns # Label Encoding - label_encoder = LabelEncoder() + label_encoder = None lb_path = hf_hub_download( repo_id=REPO_ID, filename=BEDBASE_LABEL_ENCODER_FILENAME,