Commit ·
4bde5b4
1
Parent(s): 2276c14
Add runtime dependency installation for scipy and pandas
Browse files
script.py
CHANGED
|
@@ -5,6 +5,18 @@ Pipeline: raw sample -> point fusion -> priority sample 2048 -> model -> post-pr
|
|
| 5 |
import os
|
| 6 |
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from pathlib import Path
|
| 9 |
from tqdm import tqdm
|
| 10 |
import json
|
|
|
|
| 5 |
import os
|
| 6 |
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
|
| 7 |
|
| 8 |
+
import subprocess
|
| 9 |
+
import sys
|
| 10 |
+
|
| 11 |
+
def install_if_missing(package):
|
| 12 |
+
try:
|
| 13 |
+
__import__(package.split("==")[0])
|
| 14 |
+
except ImportError:
|
| 15 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
| 16 |
+
|
| 17 |
+
install_if_missing("scipy")
|
| 18 |
+
install_if_missing("pandas")
|
| 19 |
+
|
| 20 |
from pathlib import Path
|
| 21 |
from tqdm import tqdm
|
| 22 |
import json
|