mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-04 02:37:44 +00:00
Refine all the implementation code to higher quality for release (#29)
* refine CI script * refine all the code to higher quality * refine the script to factor extraction and implementation * add task loader interface * add a task loader interface && move pdf analysis to pdf task loader * change the name to global variables --------- Co-authored-by: xuyang1 <xuyang1@microsoft.com>
This commit is contained in:
@@ -33,27 +33,7 @@ class EvolvableSubjects:
|
||||
return copy.deepcopy(self)
|
||||
|
||||
|
||||
class QlibEvolvableSubjects(EvolvableSubjects):
|
||||
...
|
||||
|
||||
|
||||
class Evaluator(ABC):
|
||||
"""Both external EvolvableSubjects and internal evovler, it is
|
||||
|
||||
FAQ:
|
||||
- Q: If we have a external whitebox evaluator, do we need a
|
||||
intenral EvolvableSubjects?
|
||||
A: When the external evovler is very complex, maybe a internal LLM-based evovler
|
||||
may provide more understandable feedbacks.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def evaluate(self, evo: EvolvableSubjects, **kwargs: Any) -> Feedback:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class SelfEvaluator(Evaluator):
|
||||
pass
|
||||
class QlibEvolvableSubjects(EvolvableSubjects): ...
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -91,16 +71,6 @@ class EvolvingStrategy(ABC):
|
||||
"""
|
||||
|
||||
|
||||
class EvoAgent(ABC):
|
||||
def __init__(self, max_loop, evolving_strategy) -> None:
|
||||
self.max_loop = max_loop
|
||||
self.evolving_strategy = evolving_strategy
|
||||
|
||||
@abstractmethod
|
||||
def multistep_evolve(self, evo: EvolvableSubjects, eva: Evaluator | Feedback, **kwargs: Any) -> EvolvableSubjects:
|
||||
pass
|
||||
|
||||
|
||||
class RAGStrategy(ABC):
|
||||
"""Retrival Augmentation Generation Strategy"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user