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

Getting Json Formatter error #25

Open
ukamath opened this issue Dec 23, 2022 · 1 comment
Open

Getting Json Formatter error #25

ukamath opened this issue Dec 23, 2022 · 1 comment

Comments

@ukamath
Copy link

ukamath commented Dec 23, 2022

Using Google Colab to run basic Uplift modeling.

try:
import causallift
except:
""" Install CausalLift """
!pip3 install causallift

'1.0.6'

from causallift import CausalLift

print('\n[Estimate propensity scores for Inverse Probability Weighting.]')
cl = CausalLift(train_df, test_df, enable_ipw=True, verbose=3)

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ :4 in │
│ │
│ /usr/local/lib/python3.8/dist-packages/causallift/causal_lift.py:510 in init
│ │
│ 507 │ │ │
│ 508 │ │ # Instance attributes were defined above. │
│ 509 │ │ if logging_config: │
│ ❱ 510 │ │ │ logging.config.dictConfig(logging_config) │
│ 511 │ │ │
│ 512 │ │ args_raw = dict( │
│ 513 │ │ │ cols_features=cols_features, │
│ │
│ /usr/lib/python3.8/logging/config.py:808 in dictConfig │
│ │
│ 805 │
│ 806 def dictConfig(config): │
│ 807 │ """Configure logging using a dictionary.""" │
│ ❱ 808 │ dictConfigClass(config).configure() │
│ 809 │
│ 810 │
│ 811 def listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None): │
│ │
│ /usr/lib/python3.8/logging/config.py:545 in configure │
│ │
│ 542 │ │ │ │ │ │ formatters[name] = self.configure_formatter( │
│ 543 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ formatters[name]) │
│ 544 │ │ │ │ │ except Exception as e: │
│ ❱ 545 │ │ │ │ │ │ raise ValueError('Unable to configure ' │
│ 546 │ │ │ │ │ │ │ │ │ │ 'formatter %r' % name) from e │
│ 547 │ │ │ │ # Next, do filters - they don't refer to anything else, either │
│ 548 │ │ │ │ filters = config.get('filters', EMPTY_DICT) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Unable to configure formatter 'json_formatter'

@Minyus
Copy link
Owner

Minyus commented Dec 23, 2022

The error could be returned if python-json-logger package (dependency of kedro version 0.18.2 or older) is not installed.
Could you try installing these packages?

pip install python-json-logger==2.0.4 kedro==0.17.7 scikit-learn==0.21.3

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