Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explainer Parameter 'Target' needs a default #384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/causal-service/algorithms/dowhy/Explainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class ExplainerParams(common.OptionalParams, title="Explainer Algorithm"):
"""
"""
target: Optional[int] = Field(options=[{'key': '$fields', 'title': ''}], title="目标度量值字段", description="关注的度量值")
target: Optional[int] = Field(default=None, options=[{'key': '$fields', 'title': ''}], title="目标度量值字段", description="关注的度量值")
treatment: Optional[List[int]] = Field(default=[], options=[{'key': '$fields', 'title': ''}], title="可干预变量字段", description="可干预变量")
estimate_effect_method: Optional[str] = Field(
default=None,
Expand Down Expand Up @@ -75,4 +75,4 @@ def calc(self, params: Optional[ParamType] = ParamType(), focusedFields: List[st
# 'data': res.tolist(),
# 'matrix': res.tolist(),
# 'indep': coeff_p.tolist(),
}
}