evidently icon indicating copy to clipboard operation
evidently copied to clipboard

TypeError: Sequential.forward() got an unexpected keyword argument 'threshold'

Open edloginova opened this issue 2 years ago • 1 comments

Hello,

When running example notebook how_to_run_drift_report_for_text_data.ipynb on Colab or locally, I run into the following issue:

report = Report(metrics = [
    EmbeddingsDriftMetric('small_subset', 
                          drift_method = model(
                              threshold = 0.55,
                              bootstrap = None,
                              quantile_probability = 0.95,
                              pca_components = None,
                          )
                         )
])

report.run(reference_data = ref_df[:50], current_data = cur_df[:50], 
           column_mapping = column_mapping)
report
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-30-b6292193e8aa>](https://localhost:8080/#) in <cell line: 1>()
      1 report = Report(metrics = [
      2     EmbeddingsDriftMetric('small_subset', 
----> 3                           drift_method = model(
      4                               threshold = 0.55,
      5                               bootstrap = None,

[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in _call_impl(self, *args, **kwargs)
   1499                 or _global_backward_pre_hooks or _global_backward_hooks
   1500                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1501             return forward_call(*args, **kwargs)
   1502         # Do not call functions when jit is used
   1503         full_backward_hooks, non_full_backward_hooks = [], []

TypeError: Sequential.forward() got an unexpected keyword argument 'threshold'

Evidently version is 0.3.2, torch version is 2.0.1+cu118. Python 3.10.11

edloginova avatar May 26 '23 07:05 edloginova

Hi @edloginova, apologies for the delay - this should have been fixed in Evidently 0.3.3.

emeli-dral avatar Jul 05 '23 14:07 emeli-dral