mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
1d9b4cd2ec
* use CoSTEER as component name * rename factorimplementation to avoid confusion * rename modelimplementation * align benchmark and evolving evaluators * add scenario to evaluator init function * rename all factorimplementationknowledge in CoSTEER * remove all scenario related information in component * remove useless code --------- Co-authored-by: xuyang1 <xuyang1@microsoft.com>
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
from rdagent.components.coder.factor_coder.factor import (
|
|
FactorExperiment,
|
|
FactorTask,
|
|
FileBasedFactorImplementation,
|
|
)
|
|
from rdagent.core.evolving_framework import EvolvableSubjects
|
|
from rdagent.core.log import RDAgentLog
|
|
|
|
|
|
class FactorEvolvingItem(FactorExperiment, EvolvableSubjects):
|
|
"""
|
|
Intermediate item of factor implementation.
|
|
"""
|
|
|
|
def __init__(
|
|
self,
|
|
sub_tasks: list[FactorTask],
|
|
sub_gt_implementations: list[FileBasedFactorImplementation] = None,
|
|
):
|
|
FactorExperiment.__init__(self, sub_tasks=sub_tasks)
|
|
self.corresponding_selection: list = None
|
|
if sub_gt_implementations is not None and len(
|
|
sub_gt_implementations,
|
|
) != len(self.sub_tasks):
|
|
self.sub_gt_implementations = None
|
|
RDAgentLog().warning(
|
|
"The length of sub_gt_implementations is not equal to the length of sub_tasks, set sub_gt_implementations to None",
|
|
)
|
|
else:
|
|
self.sub_gt_implementations = sub_gt_implementations
|