HiQ - A Modern Observability System
Project description
🦉 A Modern Observability System
🔥 HiQ now supports GPU tracing, and supports DNN libraries like pyTorch,
transformers
, LAVIS, and LLM like T5 and GPT2 in addition to Onnxruntime, FastAPI and Flask.
HiQ is a declarative
, non-intrusive
, dynamic
and transparent
tracking system for both monolithic application and distributed system. It brings the runtime information tracking and optimization to a new level without compromising with speed and system performance, or hiding any tracking overhead information. HiQ applies for both I/O bound and CPU bound applications.
To explain the four features, declarative means you can declare the things you want to track in a text file, which could be a json, yaml or even csv,and no need to change program code. Non-intrusive means HiQ doesn't requires to modify original python code. Dynamic means HiQ supports tracing metrics featuring at run time, which can be used for adaptive tracing. Transparent means HiQ provides the tracing overhead and doesn't hide it no matter it is huge or tiny.
In addition to latency tracking, HiQ provides memory, disk I/O and Network I/O tracking out of the box. The output can be saved in form of normal line by line log file, or HiQ tree, or span graph.
HiQ's philosophy is to decouple observability logic
from business logic
. We don't have to enter the black hole to observe it. Do you like the idea? Leave a ⭐ if you enjoy the project and welcome to say Hi to us on Slack 👋
Installation
- Basic Installation
pip install hiq-python
- HiQ also supports extra installation
pip install hiq-python[fastapi] # To support fastapi web server online tracing
pip install hiq-python[gpu] # To support GPU tracing, which will install pynvml
pip install hiq-python[lavis] # To support Salesforce LAVIS Vision Language models
pip install hiq-python[transformers] # To support tracing Hugging Face's transformers library
pip install hiq-python[full] # To support all the cases, and this will install all the dependency libraries
Get Started
Let start with a simplest example by running HiQ against a simple monolithic python code 📄 main.py
:
# this is the main.py python source code
import time
def func1():
time.sleep(1.5)
print("func1")
func2()
def func2():
time.sleep(2.5)
print("func2")
def main():
func1()
if __name__ == "__main__":
main()
In this code, there is a simple chain of function calls: main()
-> func1
-> func2
.
Now we want to trace the functions without modifying its code. Let's run the following:
git clone https://github.com/oracle-samples/hiq.git
cd hiq/examples/quick_start
python main_driver.py
If everything is fine, you should be able to see the output like this:
From the screenshot we can see the timestamp and the latency of each function:
main | func1 | func2 | tracing overhead | |
---|---|---|---|---|
latency(second) | 4.0045 | 4.0044 | 2.5026 | 0.0000163 |
HiQ just traced the main.py
file running without touching one line of its code.
HiQ UI
- Main Page
- Latency Details
Documentation
HTML: 🔗 HiQ Online Documents | PDF: Please check 🔗 HiQ User Guide.
Logging: https://hiq.readthedocs.io/en/latest/4_o_advanced.html#log-monkey-king
Tracing: https://hiq.readthedocs.io/en/latest/5_distributed.html
- Zipkin: https://hiq.readthedocs.io/en/latest/5_distributed.html#zipkin
- Jaeger: https://hiq.readthedocs.io/en/latest/5_distributed.html#jaeger
Metrics:
Streaming:
Jupyter NoteBook
HiQ was originally developed to find Onnxruntime performance bottleneck in DNN inference, and it works well for other computation intensive applications too. The following are two examples.
Add Observability to PaddlePaddle (PaddleOCR)
- HiQ Call Graph
Add Observability to Onnxruntime (AlexNet)
Examples
Please check 🔗 examples for usage examples.
Contributing
HiQ welcomes contributions from the community. Before submitting a pull request, please review our 🔗 contribution guide.
Security
Please consult the 🔗 security guide for our responsible security vulnerability disclosure process.
License
Copyright (c) 2022 Oracle and/or its affiliates. Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/.
Presentation and Demos
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file hiq_python-1.1.10-py3-none-any.whl
.
File metadata
- Download URL: hiq_python-1.1.10-py3-none-any.whl
- Upload date:
- Size: 68.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9beb7817137d21c9c75ee6c22f2ec4181e33c64ed9429ddf80631d703289a7f5 |
|
MD5 | b9b99995d15fdd75994ef568ffed8b08 |
|
BLAKE2b-256 | ed07ce76ab93499e4102218953b0e35a9cc9cf6bea64355d3dc533c3b4b88150 |