-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using MLDatasets is very slow #126
Comments
julia> versioninfo()
Julia Version 1.9.0-DEV.351
Commit 385762b444 (2022-04-08 21:50 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 24 × 12th Gen Intel(R) Core(TM) i9-12900K
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, goldmont)
Threads: 1 on 24 virtual cores julia> @time_imports using MLDatasets
18.5 ms ┌ Preferences
26.9 ms ┌ JLLWrappers
30.0 ms ┌ OpenSSL_jll
0.3 ms ┌ Zlib_jll
31.5 ms ┌ HDF5_jll
9.2 ms ┌ MacroTools
9.7 ms ┌ ZygoteRules
1.6 ms ┌ GZip
1.0 ms ┌ ZipFile
0.1 ms ┌ IteratorInterfaceExtensions
0.3 ms ┌ TableTraits
101.7 ms ┌ SentinelArrays
25.3 ms ┌ Parsers
0.9 ms ┌ Compat
4.9 ms ┌ OrderedCollections
1.3 ms ┌ TranscodingStreams
2.5 ms ┌ CodecZlib
0.1 ms ┌ DataValueInterfaces
9.5 ms ┌ FilePathsBase
5.0 ms ┌ InlineStrings
0.8 ms ┌ DataAPI
16.9 ms ┌ WeakRefStrings
8.5 ms ┌ Tables
10.7 ms ┌ PooledArrays
1348.2 ms ┌ CSV
0.4 ms ┌ DefineSingletons
0.4 ms ┌ NaNMath
0.9 ms ┌ Adapt
36.4 ms ┌ OffsetArrays
39.2 ms ┌ PaddedViews
24.4 ms ┌ FixedPointNumbers
48.3 ms ┌ ChainRulesCore
49.2 ms ┌ ChangesOfVariables
5.8 ms ┌ AbstractFFTs
0.3 ms ┌ OpenLibm_jll
1.6 ms ┌ StackViews
1.4 ms ┌ MappedArrays
4.1 ms ┌ MosaicViews
0.6 ms ┌ InverseFunctions
0.1 ms ┌ Reexport
3.7 ms ┌ DocStringExtensions
107.3 ms ┌ ColorTypes
76.2 ms ┌ Colors
185.5 ms ┌ Graphics
3.4 ms ┌ IrrationalConstants
0.4 ms ┌ TensorCore
1.4 ms ┌ LogExpFunctions
215.0 ms ┌ OpenSpecFun_jll
252.4 ms ┌ SpecialFunctions
80.6 ms ┌ ColorVectorSpace
888.7 ms ┌ ImageCore
0.5 ms ┌ Requires
0.9 ms ┌ ConstructionBase
24.4 ms ┌ Setfield
14.2 ms ┌ InitialValues
81.5 ms ┌ BangBang
0.3 ms ┌ MbedTLS_jll
32.6 ms ┌ MbedTLS
11.6 ms ┌ FunctionWrappers
57.0 ms ┌ DataStructures
0.2 ms ┌ CompositionsBase
21.0 ms ┌ Accessors
0.3 ms ┌ InternedStrings
18.4 ms ┌ URIParser
113.0 ms ┌ BinDeps
10.4 ms ┌ StructTypes
1.3 ms ┌ ContextVariablesX
0.3 ms ┌ StatsAPI
0.4 ms ┌ SortingAlgorithms
7.9 ms ┌ Missings
27.0 ms ┌ StatsBase
7.7 ms ┌ MicroCollections
0.4 ms ┌ ArgCheck
8.8 ms ┌ SplittablesBase
23.7 ms ┌ Baselet
87.6 ms ┌ Transducers
0.5 ms ┌ Libiconv_jll
3.7 ms ┌ StringEncodings
9.6 ms ┌ JSON3
2.5 ms ┌ InvertedIndices
97.1 ms ┌ FileIO
352.8 ms ┌ NPZ
2.4 ms ┌ BufferedStreams
715.8 ms ┌ HDF5
719.9 ms ┌ MAT
203.6 ms ┌ MLStyle
0.5 ms ┌ IniFile
0.9 ms ┌ Glob
6.0 ms ┌ URIs
54.3 ms ┌ HTTP
4.3 ms ┌ DataDeps
161.8 ms ┌ JLD2
1.7 ms ┌ PrettyPrint
29.3 ms ┌ Crayons
0.8 ms ┌ Formatting
88.3 ms ┌ PrettyTables
790.5 ms ┌ DataFrames
7.8 ms ┌ ShowCases
393.5 ms ┌ FoldsThreads
0.3 ms ┌ FLoopsBase
0.6 ms ┌ NameResolution
3.5 ms ┌ JuliaVariables
1.4 ms ┌ TupleTools
33.8 ms ┌ Strided
7.0 ms ┌ FLoops
17.2 ms ┌ Pickle
7.0 ms ┌ MLUtils
6173.8 ms MLDatasets |
One way is to let For Might need to ask MAT to provide FileIO support |
If you want to build our own version of lazy loading, then we need to use |
I'll try to explore both the FileIO and the custom lazy loading. Filed an issue for .mat JuliaIO/FileIO.jl#361 |
In a fresh julia 1.7 session
Is there a way to conditionally import packages?
Related discourse thread
The text was updated successfully, but these errors were encountered: