Fundamentos de MLOps y tracking de modelos
驴Qu茅 es MLOps y para qu茅 sirve?
Tracking de modelos en localhost con MLflow
Tracking de modelos en localhost: directorio personalizado
Etapas del ciclo de MLOps
Componentes de MLOps
Tracking de modelos con MLflow y SQLite
Tracking de modelos con MLflow en la nube
Tracking del ciclo de vida de modelos de machine learning
Tracking de experimentos con MLflow: preprocesamiento de datos
Tracking de experimentos con MLflow: definici贸n de funciones
Tracking de experimentos con MLflow: tracking de m茅tricas e hiperpar谩metros
Tracking de experimentos con MLflow: reporte de clasificaci贸n
Entrenamiento de modelos baseline y an谩lisis en UI de MLflow
MLflow Model Registry: registro y uso de modelos
Registro de modelos con mlflow.client
Testing de modelo desde MLflow con datos de prueba
驴Para qu茅 sirve el tracking de modelos en MLOps?
Orquestaci贸n de pipelines de machine learning
Tasks con Prefect
Flows con Prefect
Flow de modelo de clasificaci贸n de tickets: procesamiento de datos y features
Flow de modelo de clasificaci贸n de tickets: integraci贸n de las tasks
Flow de modelo de clasificaci贸n de tickets: ejecuci贸n de tasks
驴C贸mo se integra la orquestaci贸n en MLOps?
Despliegue de modelo de machine learning
Despligue con Docker y FastAPI: configuraci贸n y requerimientos
Despligue con Docker y FastAPI: definici贸n de clases y entry point
Despligue con Docker y FastAPI: procesamiento de predicciones en main app
Despligue con Docker y FastAPI: configuraci贸n de la base de datos
Despliegue y pruebas de modelo de machine learning en localhost
Despliegue y pruebas de modelo de machine learning en la nube
驴Qu茅 hacer con el modelo desplegado?
Monitoreo de modelo de machine learning en producci贸n
驴C贸mo monitorear modelos de machine learning en producci贸n?
Entrenamiento de modelo baseline
Preparar datos para crear reporte con Evidently
An谩lisis de la calidad de los datos con Evidently
Creaci贸n de reportes con Grafana
驴C贸mo mejorar tus procesos de MLOps?
You don't have access to this class
Keep learning! Join and start boosting your career
Developing a robust machine learning pipeline is essential to handle automated data analysis processes. In this context, we will implement a pipeline focused on ticket classification, integrating data processing and model training processes in an efficient flow using tools such as Visual Studio Code and relevant libraries.
Before starting to develop our pipeline, it is essential to prepare the working environment. Two important files are provided:
Houses crucial variables for the workflow, including data storage paths and model parameter settings.
It allows versatility by including a configurable version, helping to identify specific pipeline executions.
# Basic example structureconfig = { "data_path": "processed_data_path", "version": 2, "language": "English", "filename_input": "input_name", "model_params": {"param1": "value1", "param2": "value2"},}
picle
.Starting with the flow development, a number of libraries are imported:
Scikit-learn
for training and model metrics.Prefect
to orchestrate the pipeline.Creating a task that handles text processing is essential to prepare data for the model.
from prefect import task
@task(retries=3, retry_delay_seconds=60, name="textProcessingTask", tags=["data_processing"])def text_processing(language: str, filename: str, version: int): processor = TextProcessingProcessor(language) processed_data = processor.run(filename, version) return processed_data
Feature extraction allows you to structure the data more effectively for the model.
@task(retries=3, retry_delay_seconds=60, name="featureExtractionTask", tags=["feature_engineering"])def feature_extraction(data_path: str, version: int): feature_processor = FeatureExtractionProcessor() features = feature_processor.run(data_path, version) return features
Once the tasks are defined, they are integrated into a flow:
from prefect import Flow
# Flow definitionwith Flow("Ticket Classification Pipeline") as flow: processed_data = text_processing(config['language'], config['filename_input'], config['version']) features = feature_extraction(config['data_path'], config['version'])
flow.run().
This flow first runs the text processing and then the feature extraction, ensuring that the data is properly prepared for the model.
With the pipeline in place, the next step will be to integrate new tasks to complete the execution of the processes required for model training and evaluation. This includes tasks to apply transformations to the data, handle hyperparameters, and evaluate the accuracy of the model. Continuing to explore and improve the robustness of your pipeline will ensure not only accurate, but also efficient results, which is critical for any machine learning project.
Contributions 0
Questions 1
Want to see more contributions, questions and answers from the community?