kovacsvi commited on
Commit
0b09517
·
1 Parent(s): 5ed0b8d

debug logits

Browse files
Files changed (2) hide show
  1. interfaces/cap.py +3 -1
  2. utils.py +1 -0
interfaces/cap.py CHANGED
@@ -105,7 +105,9 @@ def predict(text, model_id, tokenizer_id):
105
  inputs = {k: v.to(device) for k, v in inputs.items()}
106
 
107
  with torch.no_grad():
108
- logits = model(inputs["input_ids"], inputs["attention_mask"]).logits
 
 
109
 
110
  release_model(model, model_id)
111
 
 
105
  inputs = {k: v.to(device) for k, v in inputs.items()}
106
 
107
  with torch.no_grad():
108
+ output = model(inputs["input_ids"], inputs["attention_mask"])
109
+ print(output)
110
+ logits = output["logits"]
111
 
112
  release_model(model, model_id)
113
 
utils.py CHANGED
@@ -57,6 +57,7 @@ for domain in domains_illframes.values():
57
  tokenizers = ["xlm-roberta-large"]
58
 
59
  def download_hf_models():
 
60
  # Ensure the JIT model directory exists
61
  os.makedirs(JIT_DIR, exist_ok=True)
62
 
 
57
  tokenizers = ["xlm-roberta-large"]
58
 
59
  def download_hf_models():
60
+ return ### DEBUG
61
  # Ensure the JIT model directory exists
62
  os.makedirs(JIT_DIR, exist_ok=True)
63