sidhomj/DeepTCR

DeepTCR_WF object has no attribute 'Y'

hejing3283 opened this issue · 10 comments

DeepTCR_WF object has no attribute 'Y'

Just re-run it in jupyter notebook, I am getting the same error.
Version: 1.2.18

which jupyter notebook and line is causing problems?

I think it might has something to do with the system setting. I copied the script from local to a cluster, with the same setting of conda virtual environment, the local one run without a problem, but the hpc one give me error.

Now I am getting error from loading data:

DTCR_WF.Get_Data(directory=input_dir, Load_Prev_Data=False, aggregate_by_aa=True, count_column=6, aa_column_beta=1,v_beta_column=3,d_beta_column=4,j_beta_column=5,sep=",")

Loading Data...

TypeError Traceback (most recent call last)
in
26
27 DTCR_WF.Get_Data(directory=input_dir, Load_Prev_Data=False, aggregate_by_aa=True, count_column=6,
---> 28 aa_column_beta=1,v_beta_column=3,d_beta_column=4,j_beta_column=5,sep=",")
29

/data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/DeepTCR.py in Get_Data(self, directory, Load_Prev_Data, classes, type_of_data_cut, data_cut, n_jobs, aa_column_alpha, aa_column_beta, count_column, sep, aggregate_by_aa, v_alpha_column, j_alpha_column, v_beta_column, j_beta_column, d_beta_column, p, hla)
314
315 Y = self.lb.transform(label_id)
--> 316 OH = OneHotEncoder(sparse=False,categories='auto')
317 Y = OH.fit_transform(Y.reshape(-1,1))
318

TypeError: init() got an unexpected keyword argument 'categories'

make sure you are using sklearn 0.20

Yes, you were right! Now I check all the modules and their versions are exactly as specific. I am getting new errors....

DTCR_WF.Monte_Carlo_CrossVal(folds=20,test_size=0.5,stop_criterion=0.25, epochs_min=100,suppress_output = False)

File "/data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/DeepTCR.py", line 3384, in Monte_Carlo_CrossVal
embedding_dim_genes=embedding_dim_genes,embedding_dim_hla=embedding_dim_hla)
File "/data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/DeepTCR.py", line 3109, in Train
num_fc_layers,units_fc)
File "/data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/functions/Layers.py", line 136, in Conv_Model
GO.sp = tf.sparse.placeholder(dtype=tf.float32, shape=[None, None],name='sp')
AttributeError: module 'tensorflow.sparse' has no attribute 'placeholder'

what version of tensorflow are you using?

1.11.0

update to 1.13.1 and let me know if that fixes it

1.13.1 works. Thanks!