non2013 commited on
Commit
910da7b
·
1 Parent(s): 300d697

update deberta

Browse files
DeBERTaV3.py CHANGED
@@ -34,8 +34,8 @@ class QuestionDataset(Dataset):
34
  class ModelLoader:
35
  def __init__(self):
36
  self.path = "DeBERTaV3/input/"
37
- self.train_df = pd.read_csv(self.path + "cleaned_train.csv")
38
- self.test_df = pd.read_csv(self.path + "cleaned_test.csv")
39
 
40
  self.tokenizer = AutoTokenizer.from_pretrained('microsoft/deberta-v3-base')
41
  self.df = self.train_df
@@ -87,11 +87,11 @@ class ModelLoader:
87
  metrics=[accuracy, F1Score()]).to_fp16()
88
  try:
89
  # First attempt: Try loading with weights_only=True
90
- self.learn.load('fastai_QIQC-deberta-v3', strict=False, weights_only=True)
91
  except Exception as e:
92
  print(f"Warning: Could not load with weights_only=True. Falling back to default loading. Error: {e}")
93
  # Second attempt: Fall back to regular loading if the first attempt fails
94
- self.learn.load('fastai_QIQC-deberta-v3', strict=False)
95
 
96
  def get_learner(self):
97
  return self.learn
 
34
  class ModelLoader:
35
  def __init__(self):
36
  self.path = "DeBERTaV3/input/"
37
+ self.train_df = pd.read_csv(self.path + "train.csv")
38
+ self.test_df = pd.read_csv(self.path + "test.csv")
39
 
40
  self.tokenizer = AutoTokenizer.from_pretrained('microsoft/deberta-v3-base')
41
  self.df = self.train_df
 
87
  metrics=[accuracy, F1Score()]).to_fp16()
88
  try:
89
  # First attempt: Try loading with weights_only=True
90
+ self.learn.load('fastai_QIQC-deberta-v3-unclean', strict=False, weights_only=True)
91
  except Exception as e:
92
  print(f"Warning: Could not load with weights_only=True. Falling back to default loading. Error: {e}")
93
  # Second attempt: Fall back to regular loading if the first attempt fails
94
+ self.learn.load('fastai_QIQC-deberta-v3-unclean', strict=False)
95
 
96
  def get_learner(self):
97
  return self.learn
DeBERTaV3/input/test.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01169d7400285f1e5f1c155f1e07d87d5c15ca21e265bc0092a943eefc47f419
3
+ size 35011536
DeBERTaV3/input/train.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b8549942872d29c9eeb9778762a51d122e12a4e61d1e657cd9cd275a403b415
3
+ size 124206772