Giter Site home page Giter Site logo

tensorchord / modelz-py Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 6.0 204 KB

Python SDK and CLI for modelz.ai, which is a developer-first platform for prototyping and deploying machine learning models.

Home Page: https://tensorchord.github.io/modelz-py/

License: Apache License 2.0

Makefile 0.25% Python 99.75%
inference llm machine-learning serverless serverless-inference

modelz-py's People

Contributors

cutecutecat avatar gaocegege avatar kaiyang-chen avatar kemingy avatar tddschn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

modelz-py's Issues

Bug: Modelz guide not work

Guide:

SDK
pip install modelz-py
You could use the following code to make a prediction request:

import modelz

# Or you could set the environment variable MODELZ_API_KEY
key = "xxx"

client = modelz.ModelzClient(key=key, project="text-xieydd-mosec-sd-1ooppa18x0pqaxuu.modelz.tech")
Check out [SDK documentation](https://docs.modelz.ai/sdk) for more details.

CLI
modelz inference --key xxx --deployment text-xieydd-mosec-sd-1ooppa18x0pqaxuu.modelz.tech --params prompt="cute cat"
Please add --serde if you want to use custom serialization. (e.g. --serde msgpack)

Check out [CLI documentation](https://docs.modelz.ai/cli) for more details.

Log:

 File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'text-xieydd-mosec-sd-1ooppa18x0pqaxuu.modelz.tech.modelz.io'. (_ssl.c:1123)

self.host: str = "https://{}.modelz.io/"

Bug: Update sdk document

https://docs.modelz.ai/sdk

$ python3 test-sd-mosec.py
Traceback (most recent call last):
  File "/Users/xieyuandong/Workspace/tencent/projects/tensorchord/modelz/test/test-sd-mosec.py", line 7, in <module>
    client = modelz.ModelzClient(key=key, deployment="text-xieydd-mosec-sd", serde="msgpack")
TypeError: __init__() got an unexpected keyword argument 'serde'


feat: --host argument to choose any remote or local host

inf_parser.add_argument(
        "--host", help="host", default="https://{}.modelz.io/"
    )

client = ModelzClient(key=key, deployment=deployment, host=host)

The value could be one of:

  • https://{}.xxx.yyy/ for formatting Deployment Key
  • http://127.0.0.1:8000/ for no Deployment Key

Or maybe an environment variable MODELZ_API_HOST could be implemented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.