Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError #1

Open
albi-10 opened this issue Jul 7, 2023 · 1 comment
Open

FileNotFoundError #1

albi-10 opened this issue Jul 7, 2023 · 1 comment

Comments

@albi-10
Copy link

albi-10 commented Jul 7, 2023

Hello im trying to run the project but im getting an Error.
Im using Google Colab as my environment.
I started with running the codes from JITLine_RQ1-RQ3.ipynb Jupiter Notebook file.
So after exceuting
openstack_k_of_smote, openstack_best_AUC_of_obj_func = run_experiment('openstack') im getting the following error:

FileNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 openstack_k_of_smote, openstack_best_AUC_of_obj_func = run_experiment('openstack')

2 frames
in run_experiment(cur_proj)
3 model_path = './final_model/'
4
----> 5 train_code, train_commit, train_label = prepare_data(cur_proj, mode='train',
6 remove_python_common_tokens=remove_python_common_tokens)
7 test_code, test_commit, test_label = prepare_data(cur_proj, mode='test',

/content/gdrive/My Drive/my_util.py in prepare_data(cur_proj, mode, use_text, remove_python_common_tokens, data_dir)
165
166 if use_text:
--> 167 all_added_code, all_removed_code, commit_id, dict, label = load_data(cur_proj,mode=mode, use_text=use_text,
168 remove_python_common_tokens=remove_python_common_tokens,
169 data_dir=data_dir)

/content/gdrive/My Drive/my_util.py in load_data(proj, mode, use_text, remove_python_common_tokens, data_dir)
30 def load_data(proj, mode='train',use_text=True,remove_python_common_tokens=False,data_dir='./data/'):
31 if mode == 'train':
---> 32 data = pickle.load(open(data_dir+proj+'_train.pkl','r+b'))
33 elif mode == 'test':
34 data = pickle.load(open(data_dir + proj + '_test.pkl','rb'))

FileNotFoundError: [Errno 2] No such file or directory: './data/openstack_train.pkl

So how do I generate the openstack_train.pkl file? Or did I something wrong.

@albi-10
Copy link
Author

albi-10 commented Jul 11, 2023

I have fixed the problem. The data files were missing in my data folder. These can be found under https://zenodo.org/record/3965149#.X2VeP5MzY1J. The Zenodo link in the readme file doesnt redirect to the missing data

@albi-10 albi-10 closed this as completed Jul 11, 2023
@albi-10 albi-10 reopened this Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant