Skip to content

Distributed HPO with Ray ♾

Compare
Choose a tag to compare
@aniketmaurya aniketmaurya released this 30 Aug 04:14
· 126 commits to main since this release
db3e871

0.0.3

Latest Changes

Get Started Now

📚 Documentation: docs.gradsflow.com

$ pip install -U gradsflow

Example

from gradsflow import AutoImageClassifier

from flash.core.data.utils import download_data
from flash.image import ImageClassificationData


data_dir = "/Users/aniket/personal/gradsflow/gradsflow/data/"
download_data("https://pl-flash-data.s3.amazonaws.com/hymenoptera_data.zip", data_dir)
datamodule = ImageClassificationData.from_folders(
    train_folder=f"{data_dir}/hymenoptera_data/train/",
    val_folder=f"{data_dir}/hymenoptera_data/val/",
)

model = AutoImageClassifier(
    datamodule,
    max_epochs=2,
    n_trials=4,
    optimization_metric="val_accuracy",
    timeout=50,
)

print("AutoImageClassifier initialised!")
model.hp_tune(gpu=1)