Hacker News new | ask | show | jobs
by 5cotts 1573 days ago
This seems pretty cool! I deployed a model to a REST endpoint and am trying to test it out now using a Jupyter notebook running Python.

Two things that happened to me:

1) I wasn't able to install `slai` using Pip and PyPi. I ended up downloading the source tarball from https://pypi.org/project/slai/#files and installing locally.

2) I am following the example for how to "Integrate" my model using Python under the "Metrics" tab. However, the call to `model = slai.model("foobarbaz")` is failing. It looks like the regex check for `MODEL_ROUTE_URI` from line 21 in `model.py` doesn't like my custom email address :(. For example, the following model endpoint isn't valid according to the regex: "s@slai.io/foo-bar-baz/initial" (My custom email is very similar to `s@slai.io`). I'll post the regex below.

`MODEL_ROUTE_URI = r"([A-Za-z0-9]+[\._]?[A-Za-z0-9]+[@]\w+[.]\w{2,3})/([a-zA-Z0-9\-\_]+)/?([a-zA-Z0-9\-\_]*)"`

Just wanted to let you know! Looking forward to experimenting with this more.

2 comments

The second SDK issue w/ the regex is resolved. Just bumped latest version to 0.1.70. If you upgrade you should be good to go. Still haven't been able to reproduce your issue with pip.
Can confirm it works now! Thanks.
Thanks for the heads up - yep, looks like a bug in our SDK. Should have a new version out shortly that handles it.

Weird that you weren't able to install the slai sdk via pip, we just released a new version of the SDK this morning, unsure if that's related. I'll take a look into that this afternoon.

Thanks for trying it out!