Skip to content

Commit 1311692

Browse files
committed
Load dataset from parent dir
1 parent 81e09aa commit 1311692

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

training/test_train.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@
3434
)
3535
def model(request):
3636
# Load dataset
37-
data = pd.read_csv(request.param["dataset"])
37+
data = None
38+
try:
39+
data = pd.read_csv(request.param["dataset"])
40+
except FileNotFoundError:
41+
# Check if the dataset is in the parent directory
42+
data = pd.read_csv("../" + request.param["dataset"])
3843

3944
# Load TF model from SavedModel
4045
sqli_model = TFSMLayer(request.param["model_path"], call_endpoint="serving_default")

0 commit comments

Comments
 (0)