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:
Xu Yang
2024-06-18 11:50:03 +08:00
committed by GitHub
parent ebb659a018
commit a126c84c92
30 changed files with 567 additions and 564 deletions
+1 -31
View File
@@ -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"""