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

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

Open
baa-ableton opened this issue Jul 24, 2023 · 2 comments
Open

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

baa-ableton opened this issue Jul 24, 2023 · 2 comments

Comments

@baa-ableton
Copy link

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
@MarshBear
Copy link

MarshBear commented Oct 26, 2023

I have met the same issue. Did you figure out what is going on here?
I guess assign Target parameter as [], but still don't understand the exact meaning here. Thanks for sharing.

@baa-ableton
Copy link
Author

@MarshBear I have a PR that addresses this:
#384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants