You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dictionary that contains the names of the custom attributes to be added to the dataset.
27
+
The keys of the dictionary are the names of the custom attributes, and the values are the names of the columns in adata.obs.
28
+
For example, if you want to add a custom attribute called "cell_type" to the dataset, you would pass custom_attr_name_dict = {"cell_type": "cell_type"}.
29
+
If you do not want to add any custom attributes, you can leave this parameter as None.
30
+
Returns
31
+
-------
32
+
GenePTConfig
33
+
The GenePT configuration object
34
+
35
+
"""
36
+
def__init__(
37
+
self,
38
+
model_name: Literal["gpt3.5"] ="gpt3.5",
39
+
batch_size: int=24,
40
+
emb_layer: int=-1,
41
+
emb_mode: Literal["cls", "cell", "gene"] ="cell",
42
+
device: Literal["cpu", "cuda"] ="cpu",
43
+
accelerator: Optional[bool] =False,
44
+
nproc: int=1,
45
+
custom_attr_name_dict: Optional[dict] =None
46
+
):
47
+
48
+
# model specific parameters
49
+
self.model_map= {
50
+
"gpt3.5": {
51
+
'input_size': 4096,
52
+
'special_token': True,
53
+
'embsize': 512,
54
+
}
55
+
56
+
}
57
+
ifmodel_namenotinself.model_map:
58
+
raiseValueError(f"Model name {model_name} not found in available models: {self.model_map.keys()}")
0 commit comments