-
Notifications
You must be signed in to change notification settings - Fork 10
Description
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.