Giter VIP home page Giter VIP logo

prom_client's Introduction

README.md

Environment Setup

Requirement

sudo apt update
sudo apt-get install ffmpeg
sudo apt-get install iperf3

1. Clone the repository:

git clone https://github.com/jangscon/prom_client.git

2. Run setup.py:

  • The script takes four parameters: the path to the image for prediction, the path to save the prediction results, the path to the video for resizing, and the path to save the results.
  • If you don't enter a path, it is set to the current directory.
  • Execute setup.sh with parameters as shown in the example below:
    python3 setup.py --yolo_input_path "/YOLO_IMAGE_PATH" --db_path "db_path" --dataset_path "dataset_path" --mode "yolo"
    
    python3 setup.py --yolo_input_path "/YOLO_IMAGE_PATH" --mode "yolo"
    
    python3 setup.py --db_path "db_path" --dataset_path "dataset_path" --mode "chromadb"
  • After this command, Running prom_client.py will start the FastAPI application.
    python3 prom_client.py 

Testing

get metrics

  • Communication is possible on port 8000. To retrieve metrics, execute the following command using curl on the client:
curl -o test.txt "http://[ServerIP]:8000/metrics/"
  • Check test.txt to verify if metrics have been retrieved correctly.

task requests

  • To send a request to the server, execute the following command:
  • This command instructs the server to perform prediction tasks for images numbered 0 to 29.
curl -X GET "http://[ServerIP]:8000/image_predict/0-30"
  • This command instructs the server to perform a size reduction operation on videos 0 through 29.
curl -X GET "http://[ServerIP]:8000/video_resize/0-30"

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.