Open SteamedGit opened 4 months ago
Hi,
What is your question ? I would recommend using the --skipMiss option
My question is why do the args in run_full_learning.sh not work?
Ah sorry error was in the title. I look into that...
Could you use shallow0_decoupled.config.json. In the last training script I introduced the possibility to have different config for the peptide encoder and CDRs encoder. shallow0_decoupled.config.json is the same as configs/shallow.config.json.
Thanks for the remark I pushed the correction
Ok thanks. I've been able to train with that config. Unfortunately, predict.py does not work with shallow0_decoupled.config.json.
python predict.py --test_dir data/tune.csv --modelconfig configs/shallow0_decoupled.config.json --load models/300/model.safetensors --output data_output/
Gives the error:
File "TULIP-TCR/predict.py", line 117, in main num_attention_heads = modelconfig["num_attn_heads"], KeyError: 'num_attn_heads'
Switching to configs/shallow.config.json. I get a different error:
loading hyperparameter
Using device: cuda
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
55
Loading models ..
self.pad_token_id 1
self.pad_token_id 1
self.pad_token_id 1
Traceback (most recent call last):
File "TULIP-TCR/predict.py", line 183, in
Maybe this is related to full_learning_new.py saving the model using safetensors but the example model weights being in a .bin format?
can you compare the folder saved with your model and mine ? Btw how come you have already trained your model (seems super fast).
should contain:
config.json generation_config.json pytorch_model.bin
I managed to train a model yesterday with a newer version of transformers that seems to save the model as model.safetensors
. To load models in this newer format I think you can use safetensors.torch. load_model(model,args.load)
I'm trying to run full_learning_new.py, with the command:
python full_learning_new.py --train_dir data/train.csv --test_dir data/tune.csv --modelconfig configs/shallow.config.json --save models/ --batch_size 128
I've tried shallow.config.json since that's what is used in run_full_learning.sh