Skip to content

Commit

Permalink
make all tokenized cells be the confirmed pkl values
Browse files Browse the repository at this point in the history
  • Loading branch information
amva13 committed Oct 26, 2024
1 parent 366aadf commit ece3a08
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tdc/test/test_model_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import shutil
import pytest
import mygene
import numpy as np

# temporary solution for relative imports in case TDC is not installed
# if TDC is installed, no need to use the following line
Expand Down Expand Up @@ -106,10 +107,10 @@ def testGeneformerTokenizer(self):
print("using very few genes for these test cases so expecting empties... let's pad/remove just for the test case...")
for idx in range(len(cells)):
x = cells[idx]
if len(x)<2:
for _ in range(2-len(x)):
x.append(1)
cells[idx] = x
for j in range(len(x)):
v = x[j]
if len(v) < 2:
cells[idx][j] = [16162, 10576] # confirmed tokenizer values from pkl dict
input_tensor = torch.tensor(cells)
# input_tensor = torch.squeeze(input_tensor)
try:
Expand Down

0 comments on commit ece3a08

Please sign in to comment.