Closed HawkeWoo closed 3 years ago
this AliyunPersistor
had implementation?
Thanks for submitting this feature request 🚀 @wochinge will get back to you about it soon! ✨
this
AliyunPersistor
had implementation?
yes
@HawkeWoo I think that's a great idea 🚀 🙏 To keep the core of Rasa Open Source small and maintainable, I'd suggest that you publish this as a separate Rasa Open Source library and that we add an option to Rasa Open Source to load different persistors depending on the module path. This way we would open up Rasa Open Source to an ecosystem of persistors and you have full control over the library you're designing. What do you think?
@HawkeWoo I think that's a great idea 🚀 🙏 To keep the core of Rasa Open Source small and maintainable, I'd suggest that you publish this as a separate Rasa Open Source library and that we add an option to Rasa Open Source to load different persistors depending on the module path. This way we would open up Rasa Open Source to an ecosystem of persistors and you have full control over the library you're designing. What do you think?
I think that is a great iead. I had published the AliPersistor here: https://github.com/HawkeWoo/rasa-alipersistor. We can install the library by: pip install git+git://github.com/HawkeWoo/rasa-alipersistor.git, and import it like this: from AliPersistor import OssPersistor I wonder if you have any suggesstions for it?
We can install the library by: pip install git+git://github.com/HawkeWoo/rasa-alipersistor.git, and import it like this: from AliPersistor import OssPersistor
Awesome 👍 I'd import by module path then (we are doing the same here for the TrackerStore
)
To use the OssPersistor
it would look like (configuration via env variables):
rasa run --remote-storage AliPersistor.OssPersistor
I wonder if you have any suggesstions for it?
I'd recommend to use a lower case, snake case module name, e.g. ali_persistor.OssPersistor
You can also add me as reviewer if you think that would be of help.
Let me know when you're done, then we can e.g. promote this in the Rasa forum (cc @EmmaWightman ). Do you also want to make the Rasa change to open Rasa Open Source to external model persistors or should we do it? Side note: I am going to be on vacation for 1.5 weeks, so don't wonder if I don't come back immediately 🙂 )
We can install the library by: pip install git+git://github.com/HawkeWoo/rasa-alipersistor.git, and import it like this: from AliPersistor import OssPersistor
Awesome 👍 I'd import by module path then (we are doing the same here for the
TrackerStore
)To use the
OssPersistor
it would look like (configuration via env variables):rasa run --remote-storage AliPersistor.OssPersistor
I wonder if you have any suggesstions for it?
I'd recommend to use a lower case, snake case module name, e.g.
ali_persistor.OssPersistor
You can also add me as reviewer if you think that would be of help.Let me know when you're done, then we can e.g. promote this in the Rasa forum (cc @EmmaWightman ). Do you also want to make the Rasa change to open Rasa Open Source to external model persistors or should we do it? Side note: I am going to be on vacation for 1.5 weeks, so don't wonder if I don't come back immediately 🙂 )
I had change the module from AliPersistor to ali_persistor. You can use this library like this now:
from ali_persistor import OssPersistor
and in rasa it can use the remote storage aliyun oss like:
rasa run --remote-storage ali-oss
I had make a PR here
closed with https://github.com/RasaHQ/rasa/pull/6266
Description of Problem:
There is only three persistor in rasa now: aws, gcs, azure, I hope to add a new persistor to store or download rasa model via aliyun oss , so that can provide more convenience to Chinese developer
Overview of the Solution:
Implement a AliyunPersistor class which is inheriting the Persistor class, we can use oss2 sdk(https://pypi.org/project/oss2/) to visit the aliyun oss storage. The AliyunPersistor can support two way to get the bucket auth: via access key id and access key secret directly or via sts(Security Token Service).The AliyunPersistor will provide the following methods: list models in the oss, downloads and decompress model from oss, upload a model to oss
Definition of Done:
[ ] Tests are added