Skip to content

Instantly share code, notes, and snippets.

View yudhiesh's full-sized avatar

Yudhiesh Ravindranath yudhiesh

  • MoneyLion
  • Kuala Lumpur
  • 19:24 (UTC +08:00)
View GitHub Profile
@yudhiesh
yudhiesh / distributed_optuna_metaflow.py
Last active January 28, 2023 02:30
Train a Deep Learning model using Optuna for HPO with Distributed HPO in Metaflow
import logging
import os
import uuid
from functools import (
partial,
)
from typing import (
List,
Optional,
)
import lightgbm as lgb
import mlflow
import optuna
from optuna.integration import LightGBMPruningCallback
from datetime import datetime
from sklearn.metrics import roc_auc_score, log_loss
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as np
import lightgbm as lgb
import optuna
from optuna.integration import LightGBMPruningCallback
from sklearn.metrics import log_loss, roc_auc_score
def get_features_labels(df, target_columns):
"""
Splits the dataframe into features and labels