How to retrieve model fingerprint without running an optimization?
AnsweredHello Gurobi Team,
I am using the Python API, and I would like to check if a model is identical to a previous model. How do I retrieve the model fingerprint without running an optimization?
Thanks for your help
-
Official comment
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Barrett,
You can use the Fingerprint attribute on the model, which returns an integer. If you want to replicate the value that you see in our logfiles you will need to convert it to hexadecimal. You can do this with the following code snippet:
def fingerprint(model):
return hex((model.Fingerprint + (1 << 32)) % (1 << 32))Also, note that as a commercial customer C3 AI is welcome to open requests through our Gurobi Help Center, which we generally answer much more promptly.
Cheers,
Riley0 -
Thanks for the quick response Riley.
I tried this and for some reason I am getting a different model fingerprint with this method compared with the fingerprint that is returned after I run an optimization call.
Do you know why this would be happening?0 -
Hi Barrett,
I'm turning this into a ticket, and we can continue the discussion there.
Cheers,
Riley1
Post is closed for comments.
Comments
4 comments