From 9d0a857654edf63c9e1601a489d967f1784eddf1 Mon Sep 17 00:00:00 2001 From: Julio Faracco Date: Thu, 15 Aug 2024 10:21:45 -0300 Subject: [PATCH] Fixing security flaw with pyarrow Signed-off-by: Julio Faracco --- dasf/ml/dl/lightning_fit.py | 8 ++++++-- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dasf/ml/dl/lightning_fit.py b/dasf/ml/dl/lightning_fit.py index c28b583..680ea58 100644 --- a/dasf/ml/dl/lightning_fit.py +++ b/dasf/ml/dl/lightning_fit.py @@ -1,7 +1,11 @@ import os from typing import Any, Tuple, Union -import lightning as L +try: + import lightning as L +except ImportError: + pass + import numpy as np from torch.utils.data import DataLoader @@ -75,7 +79,7 @@ def __getitem__(self, index: int) -> Union[np.ndarray, Tuple[np.ndarray]]: class LightningTrainer: def __init__( self, - model: L.LightningModule, + model, use_gpu: bool = False, batch_size: int = 1, max_epochs: int = 1, diff --git a/pyproject.toml b/pyproject.toml index 7d033ca..be1d872 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ pandas = "1.5.2" portalocker = "2.8.2" protobuf = "<=3.20.1" psutil = "5.9.4" -pyarrow = "10.0.1" +pyarrow = "^14.0.1" python = "^3.8" scikit-learn = "1.5.1" tornado = "^6.3"