Ask: how to enumerate the selection and combination of modules?

ask a question of choosing the best among different combinations of various modules.

assume that a main program is essentially a process, first A, then B, then C. But A, B, and C all have a variety of implementations. For example, A can be A1, or A2, or A3.

class A:
    def func_a(self):
        pass

class A1(A):
    def func_a1(self):
        pass
class A2(A):
    def func_a2(self):
        pass

therefore, the main program can adopt a combination of modules such as A1+B1:

if __name__ == "__main__":
    A1()
    B1()

the main program can also use a combination of modules like A2+B2:

if __name__ == "__main__":
    A2()
    B2()

but I don"t know whether the result of A1+B1 is better, the result of A2+B2 is better, or other combinations such as A1+B3 are the best.

is there a way to configure a config file that enumerates all combinations of An and B , and then let the main program run all the combinations one by one and find the best? Thank you. First!

Apr.24,2022

use itertools.product to manually arrange all combinations?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b408fd-2c518.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b408fd-2c518.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?