Extract factors from financial reports loop finished. (#90)

- Extract factors from financial reports loop finished.

- Fix some small bugs.
This commit is contained in:
WinstonLiyt
2024-07-20 12:31:40 +08:00
committed by GitHub
parent 8c600f42ae
commit c17244a317
10 changed files with 357 additions and 19 deletions
@@ -68,9 +68,9 @@ class MultiProcessEvolvingStrategy(EvolvingStrategy):
# if the number of factors to be implemented is larger than the limit, we need to select some of them
if FACTOR_IMPLEMENT_SETTINGS.select_ratio < 1:
# if the number of loops is equal to the select_loop, we need to select some of them
implementation_factors_per_round = int(
FACTOR_IMPLEMENT_SETTINGS.select_ratio * len(to_be_finished_task_index)
)
implementation_factors_per_round = round(FACTOR_IMPLEMENT_SETTINGS.select_ratio * len(to_be_finished_task_index) + 0.5) # ceilling
implementation_factors_per_round = min(implementation_factors_per_round, len(to_be_finished_task_index)) # but not exceed the total number of tasks
if FACTOR_IMPLEMENT_SETTINGS.select_method == "random":
to_be_finished_task_index = RandomSelect(
to_be_finished_task_index,