Posts

MLflow vs Apache Airflow

  🔍 MLflow vs Apache Airflow for AI/ML GenAI Automation & Orchestration Overview AI/ML and GenAI workflows demand efficient management of model training, tracking, deployment, and orchestration. Two popular tools used for these purposes are MLflow and Apache Airflow . Though they serve different primary purposes, they often intersect in ML Ops pipelines. Key Differences Feature MLflow Apache Airflow Primary Purpose ML lifecycle management Workflow orchestration and scheduling Components Tracking, Projects, Models, Registry DAGs (Directed Acyclic Graphs), Operators, Tasks Focus Area Experiment tracking, model packaging & deployment Scheduling & orchestrating complex workflows Best For ML model versioning, reproducibility Automating multi-step data/ML pipelines UI Support Native UI for experiments & model registry Web UI for DAG monitoring and logs Built-in ML Support Yes (model tracking, packaging) No, generic but extensib...

Pytest Quick Start Guide

Let's get you up to speed on Pytest, mocking, fixtures, patching, and monkey patching so you can start writing tests quickly! Pytest Fundamentals Pytest is a powerful and easy-to-use testing framework for Python. Installation: pip install pytest Running Tests: Navigate to your project directory in the terminal and run pytest . Pytest automatically discovers test files (files starting with test_ or ending with _test.py ) and test functions/methods (functions starting with test_ ). Assertions: Pytest uses standard Python assert statements. Python def test_addition (): assert 1 + 1 == 2 def test_list_contains (): my_list = [ 1 , 2 , 3 ] assert 2 in my_list Test Classes: You can group related tests into classes. Python class TestCalculator : def test_add ( self ): assert 2 + 3 == 5 def test_subtract ( self ): assert 5 - 2 == 3 Fixtures Fixtures are functions that Pytest runs before (and sometimes after) your te...