Skip to content

kavehshahedi/tmll

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMLL

License Documentation

Trace-Server Machine Learning Library (TMLL) is an automated pipeline that aims to apply Machine Learning techniques to the analyses derived from Trace Server. TMLL aims to simplify the process of performing both primitive trace analyses and complementary ML-based investigations.

Overview

TMLL provides users with pre-built, automated solutions integrating general Trace-Server analyses (e.g., CPU, Memory, or Disk usage) with machine learning techniques. This allows for more precise, efficient analysis without requiring deep knowledge in either Trace-Server operations or machine learning. By streamlining the workflow, TMLL empowers users to identify anomalies, trends, and other performance insights without extensive technical expertise, significantly improving the usability of trace data in real-world applications.

Table of Contents

Installation

Install from PyPI

TMLL is currently available through the Test PyPI repository. To install it, you can use the following command:

pip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple tmll

Install from Source

To install the latest version from source:

# Clone TMLL from Git
git clone https://github.com/eclipse-tracecompass/tmll.git
cd tmll

# Clone its submodule(s)
git submodule update --init

# Create a virtual environment (if haven't already)
python3 -m venv venv
source venv/bin/activate # If Linux or MacOS
.\venv\Scripts\activate # If Windows 

# Install the required dependencies
pip3 install -r requirements.txt

If you install TMLL from source code, you need to add these lines before importing TMLL's library:

import sys
sys.path.append("tmll/tsp")

Quick Start

Here's a minimal example to get you started with TMLL:

from tmll.tmll_client import TMLLClient
from tmll.ml.modules.anomaly_detection.anomaly_detection_module import AnomalyDetection

# Initialize the TMLL client
client = TMLLClient(verbose=True)

# Create an experiment from trace files
experiment = client.create_experiment(traces=[
    {
        "path": "/path/to/trace/file",  # Required
        "name": "custom_name"  # Optional, random name assigned if absent
    }
], experiment_name="EXPERIMENT_NAME")

# Run anomaly detection
outputs = experiment.find_outputs(keyword=['cpu usage'], type=['xy'])
ad = AnomalyDetection(client, experiment, outputs)
anomalies = ad.find_anomalies(method='iforest')
ad.plot_anomalies(anomalies)

Prerequisites

  • Python 3.8 or higher
  • Trace Server instance
  • Required Python packages (automatically installed with pip)

Features and Modules

In a nutshell, TMLL employs a diverse set of machine learning techniques, ranging from straightforward statistical tests to more sophisticated model-training procedures, to provide insights from analyses driven by Trace Server. These features are designed to help users reduce their manual efforts by automating the trace analysis process.

To find out more on TMLL modules along with their usage instructions, check out the TMLL Documentation.

Documentation

Support

  • Create an issue for bug reports or feature requests

License

This project is licensed under the MIT - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%