Skip to main content

DSRP ML Utils

Utility library for ML pipelines in the DSRP Machine Learning Engineering course.

Installation

pip install dsrp-ml-utils

With Azure storage support:

pip install dsrp-ml-utils[azure]

Quick Start

from dsrp_ml_utils import (
    load_imdb_database,
    add_derived_features,
    extract_top_genres,
    normalize_embeddings,
)

# Load and prepare data
movies = load_imdb_database("data/movies_base.parquet", "data/omdb_raw.jsonl")
movies = add_derived_features(movies)

# Extract metadata
genres = extract_top_genres(movies, top_n=10)

Features

Data Loading

  • load_imdb_database() - Load and combine IMDB data with OMDB enrichment
  • add_derived_features() - Add computed features (log votes, normalized year, etc.)

Metadata Extraction

  • extract_top_genres() - Get most frequent genres
  • extract_decades() - Get decades present in dataset

Query Generation

  • generate_template_queries() - Generate synthetic queries for LTR training

Candidate Retrieval

  • normalize_embeddings() - L2 normalize embeddings for cosine similarity
  • get_candidates_for_query() - Retrieve top-K candidate movies

Relevance Scoring

  • compute_relevance_score() - Calculate relevance scores with adjustable emphasis
  • assign_relevance_labels() - Convert continuous scores to discrete labels

MLflow Integration

  • search_best_model() - Search for best run by metric
  • get_artifact_uri_production() - Get production model artifact URI

Azure Storage (optional)

  • upload_to_blob() / download_from_blob() - File operations
  • sync_to_azure() / sync_from_azure() - Batch sync operations
  • blob_exists() / list_blobs() - Storage queries

License

MIT

Metadata

Release files for dsrp-ml-utils 0.1.0

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

Source distribution (sdist)

Source distribution for dsrp-ml-utils 0.1.0
File Size Uploaded Provenance Actions
dsrp_ml_utils-0.1.0.tar.gz 8.7 kB Without provenance Details for dsrp_ml_utils-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dsrp-ml-utils 0.1.0
File Interpreter ABI Platform Actions
dsrp_ml_utils-0.1.0-py3-none-any.whl Python 3 none any Details for dsrp_ml_utils-0.1.0-py3-none-any.whl

Total release size: 16.7 kB

Release files / dsrp_ml_utils-0.1.0.tar.gz

Download URL dsrp_ml_utils-0.1.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
86f859d4d510bad28eb75a72f062d45945ff298728ee17067b7380ac050b8229
BLAKE2b-256 checksum
How to use checksums
f01e7a67782045350c601c95763c4c777c66def968609604e3143605c87729e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dsrp_ml_utils-0.1.0-py3-none-any.whl

Download URL dsrp_ml_utils-0.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c463e66bea038c2ca5e0541517f00c6d4109035293663454d14c09c20f22751e
BLAKE2b-256 checksum
How to use checksums
2ec186eeeea9f5a2cd15879b87dfd32e8309cf85d7d66a8f1d58d7e5c8ac483e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for dsrp-ml-utils 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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