Conversation
fedetask
left a comment
There was a problem hiding this comment.
Nice work! I don't spot any obvious problem at this moment.
One question about the stile: in SearchJobInstance you used the type hints for the return value like def fun(args) -> float:, do you think it would make sense to consistently use it in all functions? (Along with argument type hints)
Other than that, I like the idea of letting the user define the job class.
CarolinaBianchi
left a comment
There was a problem hiding this comment.
Looks good! Left one minor comment
| @abstractmethod | ||
| def kill(self) -> None: | ||
| """Finish job | ||
| """ | ||
| raise NotImplementedError | ||
|
|
||
| @abstractmethod | ||
| def end(self) -> None: | ||
| """Run any task necessary when done | ||
| """ | ||
| raise NotImplementedError No newline at end of file |
There was a problem hiding this comment.
Are these two functions called by anyone? If not, I would not include them in the abstract SearchJobInstance
There was a problem hiding this comment.
They are not called now. I thought they might be useful but you are right, they are not needed.
I'll remove them for now :)
Hey guys (@fedetask @CarolinaBianchi @cserranocolome ), so the code is pure garbage but I use it a lot and I wanted to have parallel optimization
So in an effort to make it a bit cleaner I refactored it a bit and added a ParallelSearcher class which schedules calls to SearchJobInstance abstract class.
This SearchJobInstance has to be implemented by the user populating functions to launch a particular job, check if it is finished, get the result and this sort of stuff
Let me know if you have any comments on this (or if you care at all) otherwise I'll just merge it to master. One day it would be nice to make a major cleanup of this repo though