greschd / aiida-optimize

Defines AiiDA workchains that simplify running optimization workflows.
Apache License 2.0
2 stars 6 forks source link

Add genetic algorithm engine #50

Open unkcpz opened 2 years ago

unkcpz commented 2 years ago

Hi @greschd, I have a genetic algorithm workflow in my pseudopotential optimization plugin https://github.com/unkcpz/aiida-opsp which share and borrow lots of concept from this repository. I am thinking to separete and implementing genetic algorithm here and call aiida-optimize from my plugin. Leave only pseudo related code in aiida-opsp. But I working on aiida-opsp from develop branch aiida-core and compatible with just released aiida-core 2.0.0.

What is your opinion on processing this? I can either change my code to be compatible with aiida-1.x (then not compatible with 2.x). Or try to migrate aiida-optimize to compatible with aiida-core 2.x. I go through the code here and find the difficulty of the second option comes from there are also dependencies of aiida-pytest and aiida-tools. I think some fixture in aiida-pytest is now in aiida-core, but still some are special in aiida-pytest. Could you explain a bit about concept of aiida-pytest and your opinion in how it should be updated? I am happy to help and work on that.

greschd commented 2 years ago

I am thinking to separete and implementing genetic algorithm here and call aiida-optimize from my plugin.

I think that'd be great!

What is your opinion on processing this? I can either change my code to be compatible with aiida-1.x (then not compatible with 2.x). Or try to migrate aiida-optimize to compatible with aiida-core 2.x.

From my point of view, it doesn't make sense to change code which is already 2.x compliant back to 1.x. So, I'd prefer making aiida-optimize 2.x compliant.

I'm not all too familiar with the backwards-incompatible changes in 2.x: Do you think it's feasible to make aiida-optimize compatible with both 1.x and 2.x? Since aiida-optimize has just had a release, I'd guess we could also drop 1.x on the next one. @bosonie what's your opinion on that?

As for the dependencies:

bosonie commented 2 years ago

Hi all, I completely agree to port aiida-optimize to aiida 2.0. It is actually needed anyway since I'm preparing the aiida-siesta for 2.0 and it will require aiida-optimize to be compatible. The next release can already drop 1.x in my opinion. I can also contribute to the porting if you have a bit of patience, probably next weekend, otherwise feel free to do it.

unkcpz commented 2 years ago

Thanks for the quick reply!

Do you think it's feasible to make aiida-optimize compatible with both 1.x and 2.x?

I agree with @bosonie we drop 1.x. There are new entry points and some backward incompatible interface change.

I can also contribute to the porting if you have a bit of patience, probably next weekend, otherwise feel free to do it.

I think I can spend some time looking after it this week. I'll start with aiida-pytest without too much code change and leave remove this dependency for future. Then it would be straightforward for aiida-optimize to 2.x. I think it is not easy to only use aiida-core fixtures since as I know there are no direct fixture that start daemon from custom profile. EDIT: I think it can be probably replaced with with_daemon fixture https://github.com/aiidateam/aiida-core/blob/2c183fc4486e00f3348a1b66cdcd6d9fbfd563f0/tests/conftest.py#L376 of aiida-core.