Closed farshad68 closed 6 months ago
Please follow the example provided in the readme. You are sending the wrong key argument. 'pretrained': 'pretrained' is the wrong key argument
`import json import requests with open(f"LPs/Mutagenesis/lps.json") as json_file: learning_problems = json.load(json_file)["problems"] for str_target_concept, examples in learning_problems.items(): response = requests.get('http://0.0.0.0:8000/cel', headers={'accept': 'application/json', 'Content-Type': 'application/json'}, json={"pos": examples['positive_examples'], "neg": examples['negative_examples'], "model": "Drill", "path_embeddings": "mutagenesis_embeddings/Keci_entity_embeddings.csv", "path_to_pretrained_drill": "pretrained_drill",
"num_of_training_learning_problems": 2,
"num_of_target_concepts": 3,
"max_runtime": 60000, # seconds
"iter_bound": 1 # number of iterations/applied refinement opt.
})
print(response.json()) # {'Prediction`
path_to_pretrained_drill": "pretrained_drill", if pretrained_drill exists, upload, otherwise train one and save it there.
I am mobile at the moment. If the issue is still unclear, I will provide a more detailed info tomorrow:)
Thank you for your prompt response.
it works thank you
Firstly, I want to express my gratitude for the excellent application and the prompt responses to previous issues. Thank you for your hard work!
I'm currently encountering an error while trying to utilize the Class Expression Learning (CEL) feature. Here's a breakdown of the process:
Training:
I initiate the training process by sending an HTTP request with the following parameters:
The training seems to complete successfully, as indicated by the logs provided.
Evaluation:
Following the completion of training, I send a request for evaluation using the same parameters as the training request.
However, this results in an internal server error with the following traceback:
Expected Behavior:
I expect the evaluation process to run smoothly without encountering any errors.
Potential Cause:
Upon investigation, it appears that the KeyError is triggered by an attempt to access 'path_to_pretrained_drill' in the code, which is not present in the dictionary data.
Request for Assistance:
Could you please guide me on how to resolve this issue? Any insights or suggestions would be greatly appreciated. Once again, thank you for your support, and I look forward to resolving this issue together.
Best regards, Farshad