refactor: unify data preparations and research input snapshots
Deploy production / deploy (push) Successful in 53s
Deploy production / deploy (push) Successful in 53s
This commit is contained in:
@@ -7,6 +7,7 @@ from pydantic import Field, field_validator, model_validator
|
||||
|
||||
from ..backtests.contracts import SimulationSettings
|
||||
from ..catalog.contracts import Scope
|
||||
from ..preparations.contracts import PreparationReference
|
||||
from ..schemas import Contract
|
||||
from .expressions import IDENTIFIER, PLACEHOLDER, normalize_template
|
||||
|
||||
@@ -70,7 +71,8 @@ class FeatureStep(Contract):
|
||||
class FeatureSpec(Contract):
|
||||
name: str = Field(min_length=1, max_length=200)
|
||||
hypothesis: str = Field(min_length=1, max_length=10000)
|
||||
input_ids: list[str] = Field(min_length=1, max_length=20)
|
||||
input_ids: list[str] = Field(default_factory=list, max_length=20)
|
||||
preparation_refs: list[PreparationReference] = Field(default_factory=list, max_length=20)
|
||||
steps: list[FeatureStep] = Field(default_factory=list, max_length=30)
|
||||
template: TemplateSpec | None = None
|
||||
|
||||
@@ -102,7 +104,8 @@ class Expansion(Contract):
|
||||
asset_id: str | None = Field(default=None, max_length=36)
|
||||
version: int | None = Field(default=None, ge=1)
|
||||
template: TemplateSpec | None = None
|
||||
input_ids: list[str] = Field(min_length=1, max_length=20)
|
||||
input_ids: list[str] = Field(default_factory=list, max_length=20)
|
||||
preparation_refs: list[PreparationReference] = Field(default_factory=list, max_length=20)
|
||||
hypothesis: str = Field(min_length=1, max_length=10000)
|
||||
settings: SimulationSettings
|
||||
mode: Literal["all", "random"] = "all"
|
||||
@@ -123,7 +126,8 @@ class Expansion(Contract):
|
||||
class Generation(Contract):
|
||||
name: str = Field(min_length=1, max_length=200)
|
||||
hypothesis: str = Field(min_length=1, max_length=10000)
|
||||
input_ids: list[str] = Field(min_length=1, max_length=20)
|
||||
input_ids: list[str] = Field(default_factory=list, max_length=20)
|
||||
preparation_refs: list[PreparationReference] = Field(default_factory=list, max_length=20)
|
||||
parent_alpha_ids: list[str] = Field(default_factory=list, max_length=20)
|
||||
parent_experiment_ids: list[str] = Field(default_factory=list, max_length=20)
|
||||
method: Literal["template", "structure", "feature"] = "template"
|
||||
@@ -131,7 +135,8 @@ class Generation(Contract):
|
||||
|
||||
class SettingVariants(Contract):
|
||||
alpha_id: str = Field(min_length=1, max_length=100)
|
||||
input_ids: list[str] = Field(min_length=1, max_length=100)
|
||||
input_ids: list[str] = Field(default_factory=list, max_length=100)
|
||||
preparation_refs: list[PreparationReference] = Field(default_factory=list, max_length=100)
|
||||
hypothesis: str = Field(default="保持表达式,比较字段共同支持的市场与设置", max_length=10000)
|
||||
|
||||
|
||||
@@ -229,7 +234,8 @@ class FlowStart(Contract):
|
||||
name: str = Field(min_length=1, max_length=200)
|
||||
workflow_id: str | None = None
|
||||
workflow_version: int | None = Field(default=None, ge=1)
|
||||
input_ids: list[str] = Field(min_length=1, max_length=20)
|
||||
input_ids: list[str] = Field(default_factory=list, max_length=20)
|
||||
preparation_refs: list[PreparationReference] = Field(default_factory=list, max_length=20)
|
||||
hypothesis: str = Field(min_length=1, max_length=10000)
|
||||
settings: SimulationSettings
|
||||
budget: Budget
|
||||
|
||||
Reference in New Issue
Block a user