Skip to content

Instantly share code, notes, and snippets.

@wochinge
Last active March 11, 2020 16:06
Show Gist options
  • Select an option

  • Save wochinge/547a844f9851bb031c129e0416489068 to your computer and use it in GitHub Desktop.

Select an option

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
@wochinge

Copy link
Copy Markdown
Author

@diegoprotec That's an issue with Rasa X and compatible. Can you please create an issue in the rasa repository (I believe you have already done that, didn't you)?

@diegoprotec

Copy link
Copy Markdown

Hi @wochinge, here is there, issue.
Ty!

@FrancisThibaultNRC

Copy link
Copy Markdown

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
Copy Markdown

the script doesn't work in rasa-x 0.24.1

@wochinge

Copy link
Copy Markdown
Author

@nicolasfarina Which error are you getting?

@nicolasfarina

Copy link
Copy Markdown

@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
Copy Markdown

@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
Copy Markdown

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

@bardx

bardx commented Feb 25, 2020

Copy link
Copy Markdown

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
Copy Markdown
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