Spaces:
Runtime error
Runtime error
fixes
Browse files- src/models/model.py +5 -6
src/models/model.py
CHANGED
@@ -7,7 +7,7 @@ from transformers import (
|
|
7 |
)
|
8 |
from torch.utils.data import Dataset, DataLoader
|
9 |
import pytorch_lightning as pl
|
10 |
-
from pytorch_lightning.loggers import MLFlowLogger
|
11 |
from pytorch_lightning import Trainer
|
12 |
from pytorch_lightning.callbacks.early_stopping import EarlyStopping
|
13 |
from pytorch_lightning import LightningDataModule
|
@@ -327,11 +327,10 @@ class Summarization:
|
|
327 |
learning_rate=learning_rate, adam_epsilon=adam_epsilon, weight_decay=weight_decay
|
328 |
)
|
329 |
|
330 |
-
MLlogger = MLFlowLogger(experiment_name="Summarization",
|
331 |
-
|
332 |
-
#save_dir="reports/training_metrics.txt"
|
333 |
|
334 |
-
|
335 |
|
336 |
# logger = DAGsHubLogger(metrics_path='reports/training_metrics.txt')
|
337 |
|
@@ -352,7 +351,7 @@ class Summarization:
|
|
352 |
gpus = -1 if use_gpu and torch.cuda.is_available() else 0
|
353 |
|
354 |
trainer = Trainer(
|
355 |
-
logger=
|
356 |
callbacks=early_stop_callback,
|
357 |
max_epochs=max_epochs,
|
358 |
gpus=gpus,
|
|
|
7 |
)
|
8 |
from torch.utils.data import Dataset, DataLoader
|
9 |
import pytorch_lightning as pl
|
10 |
+
from pytorch_lightning.loggers import MLFlowLogger, WandbLogger
|
11 |
from pytorch_lightning import Trainer
|
12 |
from pytorch_lightning.callbacks.early_stopping import EarlyStopping
|
13 |
from pytorch_lightning import LightningDataModule
|
|
|
327 |
learning_rate=learning_rate, adam_epsilon=adam_epsilon, weight_decay=weight_decay
|
328 |
)
|
329 |
|
330 |
+
# MLlogger = MLFlowLogger(experiment_name="Summarization",
|
331 |
+
# tracking_uri="https://dagshub.com/gagan3012/summarization.mlflow")
|
|
|
332 |
|
333 |
+
WandLogger = WandbLogger(project="summarization-dagshub")
|
334 |
|
335 |
# logger = DAGsHubLogger(metrics_path='reports/training_metrics.txt')
|
336 |
|
|
|
351 |
gpus = -1 if use_gpu and torch.cuda.is_available() else 0
|
352 |
|
353 |
trainer = Trainer(
|
354 |
+
logger=WandLogger,
|
355 |
callbacks=early_stop_callback,
|
356 |
max_epochs=max_epochs,
|
357 |
gpus=gpus,
|