Git Product home page Git Product logo

Comments (2)

liberalisman avatar liberalisman commented on September 26, 2024 1

折腾半天,把 0.0.0.0 替换为 localhost 后,终于跑起来了,太折磨

from search_with_lepton.

Rupert91 avatar Rupert91 commented on September 26, 2024

2024-02-04 21:14:33.492 | INFO | main:init:313 - Creating KV. May take a while for the first time.
2024-02-04 21:14:41.316 | INFO | leptonai.photon.photon:_uvicorn_run:820 - Setting up signal handlers for graceful incoming traffic shutdown after 5 seconds.
2024-02-04 21:14:41,316 - INFO:
If you are using standard photon, a few urls that may be helpful:
- http://0.0.0.0:8080/docs OpenAPI documentation
- http://0.0.0.0:8080/redoc Redoc documentation
- http://0.0.0.0:8080/openapi.json Raw OpenAPI schema
- http://0.0.0.0:8080/metrics Prometheus metrics

If you are using python clients, here is an example code snippet:
from leptonai.client import Client, local
client = Client(local(port=8080))
client.healthz() # checks the health of the photon
client.paths() # lists all the paths of the photon
client.method_name? # If client has a method_name method, get the docstring
client.method_name(...) # calls the method_name method
If you are using ipython, you can use tab completion by typing client. and then press tab.

2024-02-04 21:14:41,323 - INFO: Started server process [9096]
2024-02-04 21:14:41,323 - INFO: Waiting for application startup.
2024-02-04 21:14:41.323 | INFO | leptonai.photon.photon:uvicorn_startup:763 - Starting photon app - running startup prep code.
2024-02-04 21:14:41,323 - INFO: Application startup complete.
2024-02-04 21:14:41,324 - INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

Hey I may have came across the same problem.Do you mean by replacing 0.0.0.0 to localhost🤔?

from search_with_lepton.

Related Issues (20)

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.