Shivanandroy / simpleT5

simpleT5 is built on top of PyTorch-lightning⚡️ and Transformers🤗 that lets you quickly train your T5 models.
MIT License
381 stars 61 forks source link

Metrics and logging. #11

Open Sripaad opened 2 years ago

Sripaad commented 2 years ago

Is there a way to log and view my training and validation accuracy in wandb??

Shivanandroy commented 2 years ago

I will include wandb integration in the next release !!

versae commented 2 years ago

Any update on this?

versae commented 2 years ago

Maybe this PR helps: https://github.com/Shivanandroy/simpleT5/pull/22

Shivanandroy commented 2 years ago

@Sripaad Sorry for late reply. Now, SimpleT5 (latest pre-release) supports all the pytorch-lightning supported loggers

!pip install wandb

from pytorch_lightning.loggers import WandbLogger
wandb_logger = WandbLogger(project="simplet5")

from simplet5 import SimpleT5
model = SimpleT5()
model.from_pretrained("t5","t5-base")
model.train(train_df=train_df, 
            eval_df=eval_df,
            source_max_token_len = 512, 
            target_max_token_len = 128,
            batch_size = 8,
            max_epochs = 5,
            use_gpu = True,
            outputdir = "outputs",
            logger = wandb_logger
            )