nadavlab / CPLLM

24 stars 3 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/sise/home/benshoho/projects/Med-BERT/Pretraining Code/Data Pre-processing Code/eicu_crd_data/eicu_crd.bencs.train' #2

Closed ArtificialZeng closed 8 months ago

ArtificialZeng commented 8 months ago

FileNotFoundError Traceback (most recent call last) Cell In[4], line 1 ----> 1 with open(PRETRAINED_TRAIN_PICKLE_PATH, 'rb') as f: 2 medbert_train_data = pickle.load(f) 3 with open(PRETRAINED_VALIDATION_PICKLE_PATH, 'rb') as f:

File ~/anaconda3/envs/cpllm-env/lib/python3.10/site-packages/IPython/core/interactiveshell.py:324, in _modified_open(file, *args, *kwargs) 317 if file in {0, 1, 2}: 318 raise ValueError( 319 f"IPython won't let you open fd={file} by default " 320 "as it is likely to crash IPython. If you know what you are doing, " 321 "you can use builtins' open." 322 ) --> 324 return io_open(file, args, **kwargs)

FileNotFoundError: [Errno 2] No such file or directory: '/sise/home/benshoho/projects/Med-BERT/Pretraining Code/Data Pre-processing Code/eicu_crd_data/eicu_crd.bencs.train'

Ofir408 commented 8 months ago

Hi, you need to replace this path to your path that contains the training data in the same format. The format should be like this example in our documentation: https://github.com/nadavlab/CPLLM/blob/e2255cf8e3d689026331c59c5edf1763673d2422/cpllm.py#L18

You can change this to other tasks that is not diagnosis prediction if needed (see #1 )