You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a call_limit parameter to the vf2_mappings API
Background
Hey all, we have been using the vf2_mappings call more extensively lately and wanted to propose an improvement to the API. Currently the only way to limit the time that it takes for the vf2_mappings call to return results is via call_limit. However call_limit is hard to tune because
Its magnitude might depend on the input graphs
From the user's of the api is hard to predict how long the call is going to take.
It requires deeper knowledge of the vf2 algorithm to find a good limit.
What we would like to propose is the time_limit parameter. Which would limit the execution of the call up to a certain duration.
This is currently hard to implement outside of the rust API, because the call retains the GIL until the next mapping is found. The only option available is fork a new process and forcefully kill it after some time. Perhaps I am missing something here?
Hoping to hear your thoughts on this.
The text was updated successfully, but these errors were encountered:
After #1235 is merged, I think we’ll be able to spawn VF2 in a separate thread and then have the main thread check Python for Control + C signals.
Then maybe we can implement a time out. With that being said, this is a hard problem. Contributions are welcome but there is a reason why we haven’t had this feature.
What is the expected enhancement?
Add a
call_limit
parameter to thevf2_mappings
APIBackground
Hey all, we have been using the vf2_mappings call more extensively lately and wanted to propose an improvement to the API. Currently the only way to limit the time that it takes for the vf2_mappings call to return results is via
call_limit
. However call_limit is hard to tune becauseWhat we would like to propose is the
time_limit
parameter. Which would limit the execution of the call up to a certain duration.This is currently hard to implement outside of the rust API, because the call retains the GIL until the next mapping is found. The only option available is fork a new process and forcefully kill it after some time. Perhaps I am missing something here?
Hoping to hear your thoughts on this.
The text was updated successfully, but these errors were encountered: