Skip to content

Commit

Permalink
[FeTS][GaNDLF] skip loading train.csv during inference mode (#1141)
Browse files Browse the repository at this point in the history
* remove train.csv path during inference step

Signed-off-by: kta-intel <[email protected]>

* check inference during dataloader

Signed-off-by: kta-intel <[email protected]>

* lint fix

Signed-off-by: kta-intel <[email protected]>

---------

Signed-off-by: kta-intel <[email protected]>
  • Loading branch information
kta-intel authored Nov 12, 2024
1 parent 0e16aff commit b8a1f57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openfl/federated/data/loader_gandlf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def __init__(self, data_path, feature_shape):
data_path (str): The path to the directory containing the data.
feature_shape (tuple): The shape of an example feature array.
"""
self.train_csv = data_path + "/train.csv"
if "inference" in data_path:
self.train_csv = None
else:
self.train_csv = data_path + "/train.csv"
self.val_csv = data_path + "/valid.csv"
self.train_dataloader = None
self.val_dataloader = None
Expand Down

0 comments on commit b8a1f57

Please sign in to comment.