mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-01 01:27:42 +00:00
reporeformat V2 (#23)
* reformat factor implement process * move some code to more reasonable place * fix the bug * add test function in factor_extract_and_implement.py * change select factor number to ratio , add some factor implement setting and fix some bug while using knowledgebase * change evoagent * add abstract class EvoAgent * add benchmark workflow * fix some bug in llm_utils * run wenjun's code * fix the knowledgebase instance check --------- Co-authored-by: xuyang1 <xuyang1@microsoft.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Tuple
|
||||
import pandas as pd
|
||||
|
||||
'''
|
||||
This file contains the all the data class for rdagent task.
|
||||
'''
|
||||
class BaseTask(ABC):
|
||||
# 把name放在这里作为主键
|
||||
pass
|
||||
|
||||
class TaskImplementation(ABC):
|
||||
def __init__(self, target_task: BaseTask) -> None:
|
||||
self.target_task = target_task
|
||||
|
||||
@abstractmethod
|
||||
def execute(self, *args, **kwargs) -> Tuple[str, pd.DataFrame]:
|
||||
raise NotImplementedError("__call__ method is not implemented.")
|
||||
|
||||
class TestCase:
|
||||
def __init__(
|
||||
self,
|
||||
target_task: BaseTask,
|
||||
ground_truth: TaskImplementation,
|
||||
):
|
||||
self.ground_truth = ground_truth
|
||||
self.target_task = target_task
|
||||
|
||||
Reference in New Issue
Block a user