Skip to main content

PGL Utils

A comprehensive library for Machine Learning, Deep Learning, and Generative AI utilities, designed for PUC and IBMEC post-graduation students.

Features

  • Machine Learning (ML): Preprocessing, models, and utilities for classical ML
  • Deep Learning: Architectures, training utilities, and pre-trained models
  • Generative AI (GenAI): LLM utilities, RAG implementations, and prompt engineering tools
  • Institution-specific extensions: Customized tools for PUC and IBMEC students

Installation

Basic Installation

pip install pgl-utils

Installation with specific features

# Machine Learning only
pip install pgl-utils[ml]

# Deep Learning only
pip install pgl-utils[deep_learning]

# Generative AI only
pip install pgl-utils[genai]

# All features
pip install pgl-utils[all]

# Development
pip install pgl-utils[dev]

Installation from source

git clone https://github.com/renansantosmendes/pgl_utils.git
cd pgl_utils
pip install -e .

Quick Start

Using Core Utilities

from pgl_utils import core

# Your code here

Using Machine Learning Tools

from pgl_utils.ml import preprocessing, models

# Your code here

Using Deep Learning Tools

from pgl_utils.deep_learning import draw_neural_network

# Your code here

Using Generative AI Tools

from pgl_utils.genai import llm, rag

# Your code here

Using the PGL Search Gateway

from pgl_utils.genai.search_gateway import PGLSearchGateway

gateway = PGLSearchGateway()
results = gateway.search(
    "inteligência artificial generativa",
    search_depth="advanced",
    include_raw_content=True,
)

Institution-Specific Tools

For PUC Students

from pgl_utils.puc import config

puc_info = config.PUCConfig.get_info()

For IBMEC Students

from pgl_utils.ibmec import config

ibmec_info = config.IBMECConfig.get_info()

Project Structure

pgl_utils/
├── pgl_utils/          # Main package
│   ├── __init__.py
│   ├── core/                       # Shared utilities
│   │   ├── __init__.py
│   │   └── utils.py
│   ├── ml/                         # Machine Learning module
│   │   ├── __init__.py
│   │   ├── preprocessing.py
│   │   └── models.py
│   ├── deep_learning/              # Deep Learning module
│   │   ├── __init__.py
│   │   ├── architectures.py
│   │   └── training.py
│   ├── genai/                      # Generative AI module
│   │   ├── __init__.py
│   │   ├── llm.py
│   │   ├── rag.py
│   │   └── search_gateway.py
│   ├── puc/                        # PUC-specific extensions
│   │   ├── __init__.py
│   │   └── config.py
│   └── ibmec/                      # IBMEC-specific extensions
│       ├── __init__.py
│       └── config.py
├── tests/                          # Unit tests
├── examples/                       # Example notebooks and scripts
├── docs/                           # Documentation
├── setup.py                        # Package configuration
├── requirements.txt                # Dependencies
├── README.md                       # This file
└── .gitignore                      # Git ignore rules

Requirements

  • Python >= 3.8
  • numpy >= 1.21.0
  • pandas >= 1.3.0
  • scikit-learn >= 1.0.0

Dependencies by Module

Machine Learning (ML)

  • scikit-learn
  • xgboost
  • lightgbm

Deep Learning

  • torch
  • tensorflow
  • keras

Generative AI (GenAI)

  • openai
  • langchain
  • huggingface-hub

Examples

See the examples/ directory for jupyter notebooks and scripts demonstrating library usage.

Testing

Run tests with pytest:

pytest tests/

With coverage:

pytest tests/ --cov=pgl_utils

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

License

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

Support

For issues, questions, or suggestions, please open an issue on GitHub.

Changelog

Version 0.1.0

  • Initial release
  • Core functionality for ML, Deep Learning, and GenAI
  • Institution-specific extensions for PUC and IBMEC

Release files for pgl-utils 0.1.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pgl-utils 0.1.16
File Size Uploaded
pgl_utils-0.1.16.tar.gz 76.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pgl-utils 0.1.16
File Interpreter ABI Platform
pgl_utils-0.1.16-py3-none-any.whl Python 3 none any Details

Total release size: 123.9 kB

Release files / pgl_utils-0.1.16.tar.gz

Download URL pgl_utils-0.1.16.tar.gz
Size 76.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5a6de0530f25c3070e9a33052264c7871bc48f2ac1c375ee3442997b2ec48a38
BLAKE2b-256 checksum
How to use checksums
0766712c5cd3887e4d8924ae9e9fb785ee783785c09b243f1ca205b712801fef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pgl_utils-0.1.16-py3-none-any.whl

Download URL pgl_utils-0.1.16-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eef5a95ba04c18c18890925e3174dfa3fa97b91b8f7011c994c56c4d5157504
BLAKE2b-256 checksum
How to use checksums
455689931c9088e436e29b8e4780767440383cdfd6faa040930bcbfa81c70d69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.16 This release

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page