mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-09 04:57: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:
+11
-2
@@ -2,13 +2,16 @@ 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
|
||||
@@ -17,6 +20,7 @@ class TaskImplementation(ABC):
|
||||
def execute(self, *args, **kwargs) -> Tuple[str, pd.DataFrame]:
|
||||
raise NotImplementedError("__call__ method is not implemented.")
|
||||
|
||||
|
||||
class TestCase:
|
||||
def __init__(
|
||||
self,
|
||||
@@ -26,3 +30,8 @@ class TestCase:
|
||||
self.ground_truth = ground_truth
|
||||
self.target_task = target_task
|
||||
|
||||
|
||||
class TaskLoader:
|
||||
@abstractmethod
|
||||
def load(self, *args, **kwargs) -> BaseTask | list[BaseTask]:
|
||||
raise NotImplementedError("load method is not implemented.")
|
||||
|
||||
Reference in New Issue
Block a user