-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept pathlib model path #4341
Comments
Thanks for submitting this feature request 🚀@JustinaPetr will get back to you about it soon!✨ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, @Henrike100 and I are interested in taking this issue and will start working on it. |
That's great @silvasara. Please let us know if you need any help with this. |
Thanks @silvasara and @Henrike100, it works like a charm 👍 |
Description of Problem:
I am fond of pathlib and of this particular snippet to load the newest model I have:
The only friction here is
str(latest_model)
. Adding support for pathlib paths would be quite convenient.Overview of the Solution:
Since
os.path
functions are compatible withpathlib
, the only change we would need to do is right there https://github.com/RasaHQ/rasa/blob/master/rasa/core/agent.py#L355:I could submit a PR if the feedback is positive.
The interrogation left would be about the type hints:
model_path
is aText
right now, would aUnion[Text, Path]
type be acceptable?The text was updated successfully, but these errors were encountered: