Skip to content

Instantly share code, notes, and snippets.

@wochinge
Last active March 11, 2020 16:06
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wochinge/547a844f9851bb031c129e0416489068 to your computer and use it in GitHub Desktop.
Migrates a Rasa tracker store (Redis, Mongo, SQL) to Rasa X.
# This gist is deprecated.
# Please follow the guide here
# https://rasa.com/docs/rasa-x/installation-and-setup/existing-deployment/#import-existing-conversations-from-rasa-open-source
# to migrate from Rasa Open Source to Rasa X
@FrancisThibaultNRC
Copy link

Hi @wochinge,

I have been able to migrate conversations from rasa tracker store into sql databases, thank you so much for your script, worked nicely. Could it be possible to extract conversations by given a range (456-700). I know that now we can extract a maximum number of conversations (--max-trackers 10), but it could be nice to extract based on a given range.

Thanks.

@nicolasfarina
Copy link

the script doesn't work in rasa-x 0.24.1

@wochinge
Copy link
Author

@nicolasfarina Which error are you getting?

@nicolasfarina
Copy link

@nicolasfarina Which error are you getting?

Version of Rasa X is 24.6 in Rasa x 23.5 it is work.

image

@kevinthenet
Copy link

@nicolasfarina I believe that's because you have an older version of Rasa you're running the migration with, but you have a conversation on the database that has a document from Rasa 1.6 and up. I removed the document with the event session_started from my Mongo database and was able to run the migrations fine.

@nicolasfarina
Copy link

@wochinge Any solution or should we delete the event from the tracker.db?

@bardx
Copy link

bardx commented Feb 25, 2020

I'm using Rasa 1.7.0 with Redis 5.0.7.
I get this error:

File "migrate_tracker_store_to_rasa_x.py", line 259, in
args.max_trackers,
File "migrate_tracker_store_to_rasa_x.py", line 89, in _migrate_tracker_store_to_rasa_x
old_tracker_store = _get_tracker_store_from_endpoints_config(old_endpoints_file)
File "migrate_tracker_store_to_rasa_x.py", line 170, in _get_tracker_store_from_endpoints_config
tracker_store = TrackerStore.find_tracker_store(
AttributeError: type object 'TrackerStore' has no attribute 'find_tracker_store'

@wochinge
Copy link
Author

Please use rasa export now which is officially maintained and doesn't break between releases :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment