Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
amva13 committed Oct 23, 2024
1 parent 9e6c68e commit 0a95547
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions tdc/test/test_model_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,6 @@ def testGeneformerTokenizer(self):
)
# adata.obs["ncounts"] = [2] * len(adata.obs)
# raise Exception("obs", adata.obs.columns, "var", adata.var.columns)
"""
Exception: ('obs', Index(['soma_joinid', 'dataset_id', 'assay', 'assay_ontology_term_id',
'cell_type', 'cell_type_ontology_term_id', 'development_stage',
'development_stage_ontology_term_id', 'disease',
'disease_ontology_term_id', 'donor_id', 'is_primary_data',
'observation_joinid', 'self_reported_ethnicity',
'self_reported_ethnicity_ontology_term_id', 'sex',
'sex_ontology_term_id', 'suspension_type', 'tissue',
'tissue_ontology_term_id', 'tissue_type', 'tissue_general',
'tissue_general_ontology_term_id', 'raw_sum', 'nnz', 'raw_mean_nnz',
'raw_variance_nnz', 'n_measured_vars'],
dtype='object'), 'var', Index(['soma_joinid', 'feature_id', 'feature_name', 'feature_length', 'nnz',
'n_measured_obs'],
dtype='object'))
"""
print("initializing tokenizer")
tokenizer = GeneformerTokenizer()
print("testing tokenizer")
Expand All @@ -113,14 +98,13 @@ def testGeneformerTokenizer(self):

# test Geneformer can serve the request
cells = x[0]
print("cells is", len(cells), cells)
assert cells[0]
assert len(cells[0]) > 0
from tdc import tdc_hf_interface
import torch
geneformer = tdc_hf_interface("Geneformer")
model = geneformer.load()
out = model(torch.tensor(cells))
out = model(torch.tensor(cells).int())
assert out
assert out[0]
assert len(out[0]) > 0
Expand Down

0 comments on commit 0a95547

Please sign in to comment.