-
Notifications
You must be signed in to change notification settings - Fork 8
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
Infer Results are not getting saved #3
Comments
can you share the requirements.txt file? i am facing difficulties in running run.py file, getting dependencie issues. I will be really greatful to you! |
Hey, The original code didn't have a requirements.txt file, so when I ran the code in a new environment, I only needed a few packages. You can only run this code locally if you have GPU support; otherwise, you need to use Google Colab NB. These are the packages I installed: 1.torch_sparse You most probably have an issue with sent2vec. You need to git clone this package and then install it. The steps are already provided in the original code. Feel free to contact me if you need any further assistance. |
Thanks Anurag for your quick response. I was able to figure this out last night. Have you got the same evaluation metrics as in the paper? if yes, can you please share your hyper parameter config file? |
As I was using this model for inference only I had kept the metrics path null. |
thanks for your response mate. Can you share your hyper parameters config? i'm geting some index error during training :( |
I've made absolutely no changes to the hyperparameter file. Please share a screenshot or the code that's causing the error so I can understand what's going on in the code. |
As I mentioned, I was executing this model only for inference so I made no changes to the original code. |
okay thanks for your response! |
I am facing problems in infer results. Code is implemented correctly and infer_results.json file also created but the model is predicting nothing means in .json file,predictions is empty list.Please,can you help me about this problem ? |
I have modified the model for inference as per the requirements, but the results of the inference are not being saved.
I've made these changes to data_path.json(these paths are respective to my drive as I am executing this code in Colab NB)
{
"sec_src": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/secs.jsonl",
"train_src": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/train.jsonl",
"dev_src": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/dev.jsonl",
"test_src": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/test.jsonl",
"infer_src": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/infer1.json",
"sec_cache": "/content/drive/MyDrive/InLegal/LeSICiN-main/cache/secs.pkl",
"train_cache": "/content/drive/MyDrive/InLegal/LeSICiN-main/cache/train.pkl",
"dev_cache": "/content/drive/MyDrive/InLegal/LeSICiN-main/cache/dev.pkl",
"test_cache": "/content/drive/MyDrive/InLegal/LeSICiN-main/cache/test.pkl",
"infer_cache": "/content/drive/MyDrive/InLegal/LeSICiN-main/cache/infer.pkl",
"s2v_path": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/ils2v.bin",
"type_map": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/type_map.json",
"label_tree": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/label_tree.json",
"citation_network": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/citation_network.json",
"schemas": "/content/drive/MyDrive/InLegal/LeSICiN-main/data/schemas.json",
"model_load": null,
"metrics_load": null,
"model_dump": "/content/drive/MyDrive/InLegal/LeSICiN-main/saved/best_model.pt",
"dev_metrics_dump": "/content/drive/MyDrive/InLegal/LeSICiN-main/saved/dev_metrics.json",
"test_metrics_dump": "/content/drive/MyDrive/InLegal/LeSICiN-main/saved/test_metrics.json",
"infer_trg": "/content/drive/MyDrive/InLegal/LeSICiN-main/saved/infer_results.json"
}
And in "infer_src" I have used an example of mine:
{"id": "100114", "text": ["ORDER Kidwai, J.", "Kirpa Ram, Siaram, Ram Harsh and Bijai Bahadur were prosecuted on the complaint of Ram Asrey under Sections 379, 447 and 352/506, Penal Code, on the allegation that they had entered a grove situated in Ajitpur on 29-4-1949 and cut mangoes worth about Rs. 35/- from the grove.", "The case was tried and disposed of by Shri Kamta Prasad, Judicial Magistrate, Kaisarganj at Bahraich."], "labels": ["Section 379 in The Indian Penal Code"]}
Now I have tried giving a path "/content/drive/MyDrive/InLegal/LeSICiN-main/saved/infer_results.json" to "infer_trg" twice as I describe below
1.For the first time I tried giving a path with the file name "infer_results.json"(in this case there was no such file at this location
2.For the second time I created an empty json file with the same name and then executed the code hoping whatever the result of inference is will be saved into this empty file but unfortunately this didn't work either.
Can someone pls tell what I am doing wrong or how to solve this issue?
Thanks,
Anurag.
The text was updated successfully, but these errors were encountered: