Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Can't use DecisionThresholdConvergence object #9

Closed
izagorac opened this issue Apr 17, 2024 · 2 comments · Fixed by #10
Closed

Bug: Can't use DecisionThresholdConvergence object #9

izagorac opened this issue Apr 17, 2024 · 2 comments · Fixed by #10
Labels
bug Something isn't working

Comments

@izagorac
Copy link

When I try to run the generate_counterfactual function in parallel as shown in the image below, I get an error about the Convergence object.

Code:
Screenshot 2024-04-17 at 21 04 02

Error:
Screenshot 2024-04-17 at 21 04 32

When I follow the stacktrace of the error it leads me to the get_convergence_type function in the Convergence module in the CounterfactualExplanations package. This function has 2 versions: one with AbstractConvergence as input and one with Symbol as input (see image below)

Screenshot 2024-04-17 at 21 07 10

In my case, because I have created my own DecisionThresholdConvergence object, I would expect the first function to be called. However, for reason currently unknown to me, when the @with_parallelizer macro is used the function with the Symbol as input is being called. I've tested the same code without the macro and this works how it is supposed to.

@pat-alt is this enough information for someone to look into? If more details are necessary, please let me know. Solving this issue would really help me out :)

@pat-alt pat-alt added the bug Something isn't working label Apr 24, 2024
@pat-alt
Copy link
Member

pat-alt commented Apr 24, 2024

That's all I need and indeed a nasty little bug. I'm working on it, but metaprogramming is always a little tricky (at least for me). In the meantime, you should be able to use the parallelize function directly, instead of the macro.

@izagorac
Copy link
Author

Thanks @pat-alt, this fixes the issue

@pat-alt pat-alt linked a pull request Apr 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants