Skip to content

[Causal Service] Explainer Parameter 'Target' needs a default. #383

@baa-ableton

Description

@baa-ableton

I believe a default Field parameter needs to be added to ExplainerParams.target.

To reproduce:

cd ./services/causal-service && bash fetch.sh
uvicorn main:app --reload --host 0.0.0.0:8001`
  File "/home/dataviz/investigation/Rath/services/causal-service/main.py", line 9, in <module>
    import interfaces as I
  File "/home/dataviz/investigation/Rath/services/causal-service/interfaces.py", line 62, in <module>
    from algorithms.common import OptionalParams, AlgoInterface, getCausalRequest, CausalAlgorithmResponse, CausalAlgorithmData
  File "/home/dataviz/investigation/Rath/services/causal-service/algorithms/__init__.py", line 15, in <module>
    from .dowhy.Explainer import Explainer
  File "/home/dataviz/investigation/Rath/services/causal-service/algorithms/dowhy/Explainer.py", line 27, in <module>
    class Explainer(common.AlgoInterface):
  File "/home/dataviz/investigation/Rath/services/causal-service/algorithms/dowhy/Explainer.py", line 29, in Explainer
    def __init__(self, dataSource: List[common.IRow], fields: List[common.IFieldMeta], params: Optional[ParamType] = ParamType()):
  File "/home/dataviz/.local/lib/python3.10/site-packages/pydantic/main.py", line 150, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Explainer Algorithm
target
  Field required [type=missing, input_value={}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.0.3/v/missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions