mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-01 09:27:43 +00:00
eee2b3c56a
* remove ruff comment in log.py * change log framework and fix llm_utils.py's logs * Some thoughts for logging * fix SingletonMeta's definition, maintain an instance dict for each class that inherits it * adjust log codes directory, add some tag for factor implementation logging * Update rdagent/core/conf.py * fix factor task app & log * fix log import * Streamlet framework * fix log tag to path logic * Add todos * Add example in docstring * add log tag for llm_utils.py * Capture lost content --------- Co-authored-by: Young <afe.young@gmail.com> Co-authored-by: you-n-g <you-n-g@users.noreply.github.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.log import rdagent_logger as logger
|
|
|
|
|
|
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
|
|
logger.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
|