Closed giahung24 closed 1 month ago
Hi @giahung24 ! We indeed changed metrics type name in new version, however old typenames should be compatible since they are just classpathes. I just ran this snippet and it worked
from pydantic import parse_obj_as
from evidently.base_metric import Metric
from evidently.metrics import DataDriftTable
def main():
metric = DataDriftTable(columns=["a"])
payload = metric.dict()
print(payload["type"])
payload["type"] = "evidently.metrics.data_drift.data_drift_table.DataDriftTable"
parse_obj_as(Metric, payload)
if __name__ == '__main__':
main()
So 500 errors are something else. Or maybe you run new snapshots with old UI version?
You can run UI in debug mode with this code and see full stacktrace
from evidently.ui.app import run
from evidently.ui.local_service import LocalConfig
from evidently.ui.local_service import LocalServiceComponent
config = LocalConfig(service=LocalServiceComponent(debug=True))
run(config)
Hi @giahung24 ! We indeed changed metrics type name in new version, however old typenames should be compatible since they are just classpathes. I just ran this snippet and it worked
from pydantic import parse_obj_as from evidently.base_metric import Metric from evidently.metrics import DataDriftTable def main(): metric = DataDriftTable(columns=["a"]) payload = metric.dict() print(payload["type"]) payload["type"] = "evidently.metrics.data_drift.data_drift_table.DataDriftTable" parse_obj_as(Metric, payload) if __name__ == '__main__': main()
So 500 errors are something else. Or maybe you run new snapshots with old UI version?
Hi @mike0sv,
Yeah my UI was always on old version (0.4.36) when I accidentally added the new snapshots from 0.4.38. So, we are agreed that the new shapshots can't be load with old UI ?
Yes, you can load old snapshots with new UI but can't load new snapshots with old UI
Okay, thank you for your verification !
Hi, I have set up an Evidently project to track my data drift. All of my past snapshot are stored with the version 0.4.36 (or below). Today when I accidentally update to 0.4.38, the snapshots saved to the project directory can not be loaded into Dashboard UI (local).
Quick comparison of two json versions gives me this :
Snapshot generated by 0.4.38:
Snapshot generated by 0.4.36:
Can you confirm the change in metrics type name between two versions (
evidently:metric:DataDriftTable
vs.evidently.metrics.data_drift.data_drift_table.DataDriftTable
)?Can you verify if this change breaks the behavior of the local Dashboard UI ? Because if I have these two versions of snapshot in the project dir, when I restart the web ui, I get a 500 error like this :