Skip to content

Commit

Permalink
require explicit Pickle import in load_pytorch (#170)
Browse files Browse the repository at this point in the history
* required pickle and pass tests

* Require hot fix
  • Loading branch information
Dsantra92 authored Oct 4, 2022
1 parent 0d91bfe commit 5c380f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/MLDatasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using Printf
using Glob
using DelimitedFiles: readdlm
using FileIO
import CSV
using LazyModules: @lazy

include("require.jl") # export @require
Expand All @@ -26,7 +27,6 @@ include("require.jl") # export @require
# @lazy import NPZ # lazy imported by FileIO
@lazy import Pickle="fbb45041-c46e-462f-888f-7c521cafbc2c"
@lazy import MAT="23992714-dd62-5051-b70f-ba57cb901cac"
import CSV
@lazy import HDF5="f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
# @lazy import JLD2

Expand Down
1 change: 1 addition & 0 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function read_npz(path)
end

function read_pytorch(path)
assert_imported(Pickle._lazy_pkgid)
return Pickle.Torch.THload(path)
end

Expand Down

0 comments on commit 5c380f1

Please sign in to comment.