Skip to content

Commit 207f1f2

Browse files
properly loading pickle
Co-authored-by: Copilot <[email protected]>
1 parent 96f4b77 commit 207f1f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drevalpy/cli_run_cv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def cv_split():
7878
args = parser.parse_args()
7979

8080
# load the response data and split it into CV splits
81-
response_data = pickle.load(open(args.response, "rb"))
81+
with open(args.response, "rb") as f:
82+
response_data = pickle.load(f)
8283
response_data.remove_nan_responses()
8384
response_data.split_dataset(
8485
n_cv_splits=args.n_cv_splits,

0 commit comments

Comments
 (0)