gizatechxyz / giza-agents

Easy to use Verifiable AI and smart contracts interoperability.
https://docs.gizatech.xyz/products/ai-agents
MIT License
15 stars 10 forks source link

`model_category` should be inferred #54

Open Gonmeso opened 5 months ago

Gonmeso commented 5 months ago

Currently we leave to the user to use the model_category variable to indicate if its ONNX or XGB. This should be inferred from the data of the version and the original model, not to users input.

Error prone:

(result, proof_id) = model.predict(
        input_feed={"input": input}, verifiable=True, model_category="XGB"
    )

Inferred:

# In the instantiation we can check the original model or if is json, we can get from it the model XGB or LGBM
model = GizaModel(id=model_id, version=version_id)
(result, proof_id) = model.predict(
        input_feed={"input": input}, verifiable=True
    )
Jonatan-Chaverri commented 5 months ago

I will like to take care of this one

Josh-121 commented 5 months ago

Can get this done and ready within few hours, I understand that I'm to get the required value from the data version/original model as opposed to using human input value that is unreliable.

Gonmeso commented 4 months ago

Hi @Jonatan-Chaverri @Josh-121

Sorry for the late response, currently we are putting this a bit on hold while we work on a refactor in the following months