clinicalml / TabLLM

MIT License
265 stars 42 forks source link

Problem with reproducing #14

Open pretty-speeches opened 11 months ago

pretty-speeches commented 11 months ago

Hi, Thanks for your work. When trying to run few-shot-pretrained-100k.sh with the "car" dataset, the pl_train file looks for this dataset_readers.get_dataset_reader in t-few's configs, but it's not there. Therefore this script in not able to be completed.

How do I enable a run for the "car" dataset?

Traceback:

/root/t-few/bin/few-shot-pretrained-100k.sh: 45: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 46: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 49: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 52: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 55: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 58: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 61: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 64: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 67: [[: not found /root/t-few/bin/few-shot-pretrained-100k.sh: 70: [[: not found [2023-10-05 12:21:45,078] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect) Start experiment t011b_car_numshot4_seed42_ia3_pretrained100k { "exp_dir": "exp_out/t011b_car_numshot4_seed42_ia3_pretrained100k", "exp_name": "t011b_car_numshot4_seed42_ia3_pretrained100k", "allow_skip_exp": false, "seed": 42, "model": "EncDec", "max_seq_len": 1024, "origin_model": "bigscience/T0", "load_weight": "pretrained_checkpoints/t011b_ia3_finish.pt", "dataset": "car", "few_shot": true, "num_shot": 4, "few_shot_random_seed": 42, "train_template_idx": -1, "eval_template_idx": -1, "batch_size": 4, "eval_batch_size": 16, "num_workers": 8, "change_hswag_templates": false, "raft_cross_validation": true, "raft_validation_start": 0, "raft_labels_in_input_string": "comma", "cleaned_answer_choices_b77": false, "compute_precision": "bf16", "compute_strategy": "none", "num_steps": 30, "eval_epoch_interval": 30, "eval_before_training": false, "save_model": true, "save_step_interval": 20000, "mc_loss": 1, "unlikely_loss": 1, "length_norm": 1, "grad_accum_factor": 1, "split_option_at_inference": false, "optimizer": "adafactor", "lr": 0.003, "trainable_param_names": ".*lora_b.*", "scheduler": "linear_decay_with_warmup", "warmup_ratio": 0.06, "weight_decay": 0, "scale_parameter": true, "grad_clip_norm": 1, "model_modifier": "lora", "prompt_tuning_num_prefix_emb": 100, "prompt_tuning_encoder": true, "prompt_tuning_decoder": true, "lora_rank": 0, "lora_scaling_rank": 1, "lora_init_scale": 0.0, "lora_modules": ".*SelfAttention|.*EncDecAttention|.*DenseReluDense", "lora_layers": "k|v|wi_1.*", "bitfit_modules": ".*", "bitfit_layers": "q|k|v|o|wi_[01]|w_o", "adapter_type": "normal", "adapter_non_linearity": "relu", "adapter_reduction_factor": 4, "normal_adapter_residual": true, "lowrank_adapter_w_init": "glorot-uniform", "lowrank_adapter_rank": 1, "compacter_hypercomplex_division": 8, "compacter_learn_phm": true, "compacter_hypercomplex_nonlinearity": "glorot-uniform", "compacter_shared_phm_rule": false, "compacter_factorized_phm": false, "compacter_shared_W_phm": false, "compacter_factorized_phm_rule": false, "compacter_phm_c_init": "normal", "compacter_phm_rank": 1, "compacter_phm_init_range": 0.01, "compacter_kronecker_prod": false, "compacter_add_compacter_in_self_attention": false, "compacter_add_compacter_in_cross_attention": false, "intrinsic_projection": "fastfood", "intrinsic_said": true, "intrinsic_dim": 2000, "intrinsic_device": "cpu", "fishmask_mode": null, "fishmask_path": null, "fishmask_keep_ratio": 0.05, "prefix_tuning_num_input_tokens": 10, "prefix_tuning_num_target_tokens": 10, "prefix_tuning_init_path": null, "prefix_tuning_init_text": null, "prefix_tuning_parameterization": "mlp-512", "train_pred_file": "exp_out/t011b_car_numshot4_seed42_ia3_pretrained100k/train_pred.txt", "dev_pred_file": "exp_out/t011b_car_numshot4_seed42_ia3_pretrained100k/dev_pred.txt", "dev_score_file": "exp_out/t011b_car_numshot4_seed42_ia3_pretrained100k/dev_scores.json", "test_pred_file": "exp_out/t011b_car_numshot4_seed42_ia3_pretrained100k/test_pred.txt", "test_score_file": "exp_out/t011b_car_numshot4_seed42_ia3_pretrained100k/test_scores.json", "finish_flag_file": "exp_out/t011b_car_numshot4_seed42_ia3_pretrained100k/exp_completed.txt" } Mark experiment t011b_car_numshot4_seed42_ia3_pretrained100k as claimed Downloading (…)okenizer_config.json: 100% 1.86k/1.86k [00:00<00:00, 287kB/s] Downloading (…)lve/main/config.json: 100% 633/633 [00:00<00:00, 107kB/s] Downloading spiece.model: 100% 792k/792k [00:00<00:00, 18.9MB/s] Downloading (…)cial_tokens_map.json: 100% 1.79k/1.79k [00:00<00:00, 1.00MB/s] You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that thelegacy(previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, setlegacy=False. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in[ https://github.com/huggingface/transformers/pull/24565](https://github.com/huggingface/transformers/pull/24565) Downloading pytorch_model.bin: 100% 44.5G/44.5G [03:06<00:00, 238MB/s] Traceback (most recent call last): File "/usr/local/envs/tabllm/lib/python3.8/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/envs/tabllm/lib/python3.8/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/t-few/bin/src/pl_train.py", line 92, in <module> main(config) File "/root/t-few/bin/src/pl_train.py", line 40, in main dataset_reader = get_dataset_reader(config) File "/root/t-few/bin/src/data/dataset_readers.py", line 16, in get_dataset_reader dataset_class = { KeyError: 'car'

stefanhgm commented 10 months ago

Hello @pretty-speeches ,

thanks for using our code and please excuse the late reply.

It looks as if the dataset reader does not know about the car dataset. Did you use the t-few dataset and replace all files given in the TabLLM/t-few directory (see point 2 in the Readme). Especially, the TabLLM/t-few/src/data files seem to be relevant for your issue since they add our datasets to the ones of the t-few project.

Please let us know if that helps!

stefanhgm commented 10 months ago

Hello @pretty-speeches,

just as a heads-up: based on the feedback in the issues, we updated the readme now with all steps to reproduce a performance entry from the paper. Maybe that is also helpful for you!