Repository: evidentlyai/evidently
Issue: Column Mapping error: 'dict' object has no attribute 'datetime'
Root cause: Validation Gap

Hi, I have been trying to create a regression performance report using evidently. But, I am stuck and I cannot find any solution to the error I am getting in column mapping. 

![image](https://user-images.githubusercontent.com/96055730/209689599-53764dda-34e6-455f-99d9-83b2c875e8f8.png)

This is the error I am getting after running the code.
![image](https://user-images.githubusercontent.com/96055730/209690250-939e2197-62c9-4166-980c-2bcf2754e6ce.png)

Can you please help me in identifying what I am missing?

Hi @rijulml, it seems that you are using the old API (with a `dashboard` object which has been replaced for `reports`), which has been deprecated. 

Could you try upgrading to the latest Evidenty version, and see if the issue persists?  You'll need to create a `Report` object and include  `RegressionPreset()`.

You can take a look at this example notebook with all presets to copy the code snippet:
https://github.com/evidentlyai/evidently/blob/main/examples/sample_notebooks/evidently_metric_presets.ipynb 

Here are the docs on column mapping: https://docs.evidentlyai.com/user-guide/input-data/column-mapping

Hi @rijulml , let me comment on this a bit.

Although ```dashboards``` are deprecated now, you can still run this code example if needed.

The problem with ColumnMapping was not caused by using Dashboards, rather than because you created ```ColumnMapping``` as a python dictionary.  If you import ColumnMapping from evidently like this:
```from evidently import ColumnMapping``` and assign values like this
```
column_mapping.target = target
column_mapping.prediction = 'prediction'
column_mapping.datetime = None

column_mapping.numerical_features = numerical_features
column_mapping.categorical_features = None
```
 then the rest of your code should works fine (apart from the deprecation message, so I also suggest you consider using reports🙂). 




Hello, 

I was going through the bicycle tutorial found on your website : https://www.evidentlyai.com/blog/tutorial-1-model-analytics-in-production

I replaced the dashboard module use by the report module but when i tried to generate a report , it is stuck at "Loading..."

Can you help me sort it out ?

Thank you

Hi @edgarkp, 

Could you check that you correctly installed the nbextension as shown here?
https://docs.evidentlyai.com/user-guide/install-evidently

If you want to see examples of code on generating reports / test suites, it is best to use one of these notebooks https://github.com/evidentlyai/evidently/tree/main/examples/sample_notebooks as they are regularly updated. 

If the nbextension installation does not solve the issue, please let us know! It is best to open a separate issue. 

 

Thank you for the quick reply. Actually, I am running my jupyter notebook on Windows and as I saw on your website, building reports inside a Jupyter notebook in that OS is not yet possible. Hope it will be sorted out in the next version

Hi @edgarkp ,

could you please try to specify mode='inline' while running show command like that:
```regression_perfomance_dashboard.show(mode='inline')```

This often helps to display reports in Windows as well.