Skip to content

Commit bacd010

Browse files
committed
More essential libs when packaging
1 parent 626fbc8 commit bacd010

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

iotdb-core/ainode/ainode.spec

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,17 @@ essential_libraries = {
4444
'torch': True, # Keep collect_all for torch as it has many dynamic imports
4545
'transformers': True, # Keep collect_all for transformers
4646
'safetensors': True, # Keep collect_all for safetensors
47+
'numpy': True,
48+
'scipy': True,
49+
'pandas': True,
50+
'scikit-learn': True,
51+
'statsmodels': True,
52+
'sktime': True,
53+
'pmdarima': True,
54+
'hmmlearn': True,
55+
'accelerate': True
4756
}
4857

49-
# For other libraries, use selective collection to speed up startup
50-
other_libraries = ['sktime', 'scipy', 'pandas', 'sklearn', 'statsmodels', 'optuna']
51-
5258
for lib in essential_libraries:
5359
try:
5460
lib_datas, lib_binaries, lib_hiddenimports = collect_all(lib)
@@ -58,28 +64,6 @@ for lib in essential_libraries:
5864
except Exception:
5965
pass
6066

61-
# For other libraries, only collect submodules (lighter weight)
62-
# This relies on PyInstaller's dependency analysis to include what's actually used
63-
for lib in other_libraries:
64-
try:
65-
submodules = collect_submodules(lib)
66-
all_hiddenimports.extend(submodules)
67-
# Only collect essential data files and binaries, not all submodules
68-
# This significantly reduces startup time
69-
try:
70-
lib_datas, lib_binaries, _ = collect_all(lib)
71-
all_datas.extend(lib_datas)
72-
all_binaries.extend(lib_binaries)
73-
except Exception:
74-
# If collect_all fails, try collect_data_files for essential data only
75-
try:
76-
lib_datas = collect_data_files(lib)
77-
all_datas.extend(lib_datas)
78-
except Exception:
79-
pass
80-
except Exception:
81-
pass
82-
8367
# Project-specific packages that need their submodules collected
8468
# Only list top-level packages - collect_submodules will recursively collect all submodules
8569
TOP_LEVEL_PACKAGES = [

0 commit comments

Comments
 (0)