kkyamada/bert-rbp

Error running example TIAL1

Closed this issue · 1 comments

I downloaded DNABERT3, finetuned the model for TIAL1 (Step 3.2) and everything worked fine. But when I try to start the attention analysis with source analyze_regiontype.sh TIAL1 it gives an error stating:

05/08/2022 13:50:01 - INFO - __main__ - Training/evaluation parameters Namespace(cache_dir='', config_name='', data_dir='../sample_dataset/TIAL1/nontraining_sample_finetune/hg38/', device=device(type='cuda'), do_analyze_regiontype=True, do_analyze_regiontype_specific=False, do_cache=False, do_lower_case=False, eval_all_checkpoints=False, fp16=False, fp16_opt_level='O1', local_rank=-1, logging_steps=500, max_seq_length=101, model_name_or_path='../sample_dataset/TIAL1/finetuned_model', model_type='dna', n_gpu=1, n_process=8, no_cuda=False, output_mode='classification', output_visimage=False, overwrite_cache=False, per_gpu_pred_batch_size=64, predict_dir='../sample_dataset/TIAL1/finetuned_model/analyze_regiontype/', rbp_name='', region_type=0, save_steps=500, save_total_limit=None, seed=42, server_ip='', server_port='', should_continue=False, specific_heads='', task_name='dnaprom', tokenizer_name='', visualize_models=None) Traceback (most recent call last): File "../examples/run_analysis_regiontype.py", line 876, in <module> main() File "../examples/run_analysis_regiontype.py", line 798, in main output_dir = args.output_dir.replace("/690", "/690/" + str(kmer)) AttributeError: 'Namespace' object has no attribute 'output_dir'

But when I check the run_analysis_regiontype.py script for the output_dir argument, i realised it is never set in this script. How can i set the output dir without manipulating your code? Am I missing something?

Thanks in advance :)

Thank you for the notice.
We updated the scripts to fix the error. Please pull the updated files.