mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-06 11:37:44 +00:00
add CI fix tool to app (#10)
* add CI fix tool to app * perform ruff safe fix * wrap too long lines in prompts.py
This commit is contained in:
@@ -3,10 +3,9 @@ from abc import ABC, abstractmethod
|
||||
from typing import Tuple
|
||||
|
||||
import pandas as pd
|
||||
from finco.log import FinCoLog
|
||||
from jinja2 import Template
|
||||
|
||||
from oai.llm_utils import APIBackend
|
||||
from finco.log import FinCoLog
|
||||
from factor_implementation.share_modules.conf import FactorImplementSettings
|
||||
from factor_implementation.share_modules.factor import (
|
||||
FactorImplementation,
|
||||
@@ -15,6 +14,7 @@ from factor_implementation.share_modules.factor import (
|
||||
from factor_implementation.share_modules.prompt import (
|
||||
FactorImplementationPrompts,
|
||||
)
|
||||
from oai.llm_utils import APIBackend
|
||||
|
||||
|
||||
class Evaluator(ABC):
|
||||
@@ -454,7 +454,7 @@ class FactorImplementationValueEvaluator(Evaluator):
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
FinCoLog().warning(f"Error occurred when calculating the correlation: {str(e)}")
|
||||
FinCoLog().warning(f"Error occurred when calculating the correlation: {e!s}")
|
||||
conclusions.append(
|
||||
f"Some error occurred when calculating the correlation. Investigate the factors that might be causing the discrepancies and ensure that the logic of the factor calculation is consistent. Error: {e}",
|
||||
)
|
||||
|
||||
@@ -7,15 +7,15 @@ from typing import Tuple, Union
|
||||
|
||||
import pandas as pd
|
||||
from filelock import FileLock
|
||||
|
||||
from oai.llm_utils import md5_hash
|
||||
from finco.log import FinCoLog
|
||||
|
||||
from factor_implementation.share_modules.conf import FactorImplementSettings
|
||||
from factor_implementation.share_modules.exception import (
|
||||
CodeFormatException,
|
||||
NoOutputException,
|
||||
RuntimeErrorException,
|
||||
)
|
||||
from oai.llm_utils import md5_hash
|
||||
|
||||
|
||||
class FactorImplementationTask:
|
||||
@@ -122,7 +122,7 @@ class FileBasedFactorImplementation(FactorImplementation):
|
||||
raise ValueError(self.FB_CODE_NOT_SET)
|
||||
with FileLock(self.workspace_path / "execution.lock"):
|
||||
(Path.cwd() / "git_ignore_folder" / "factor_implementation_execution_cache").mkdir(
|
||||
exist_ok=True, parents=True
|
||||
exist_ok=True, parents=True,
|
||||
)
|
||||
if FactorImplementSettings().enable_execution_cache:
|
||||
# NOTE: cache the result for the same code
|
||||
|
||||
@@ -2,7 +2,6 @@ from pathlib import Path
|
||||
from typing import Dict
|
||||
|
||||
import yaml
|
||||
|
||||
from finco.utils import SingletonBaseClass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user