Skip to content

Commit ed1f796

Browse files
authored
Added torch to known packages (#1896)
1 parent 820eb92 commit ed1f796

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/databricks/labs/ucx/source_code/known.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@
575575
}
576576
]
577577
},
578+
"mpmath": {
579+
"mpmath": []
580+
},
578581
"multidict": {
579582
"multidict": []
580583
},
@@ -588,6 +591,9 @@
588591
"mypy-extensions": {
589592
"mypy_extensions": []
590593
},
594+
"networkx": {
595+
"networkx": []
596+
},
591597
"numpy": {
592598
"numpy": []
593599
},
@@ -1846,6 +1852,10 @@
18461852
"sqlparse": {
18471853
"sqlparse": []
18481854
},
1855+
"sympy": {
1856+
"isympy": [],
1857+
"sympy": []
1858+
},
18491859
"threadpoolctl": {
18501860
"threadpoolctl": []
18511861
},
@@ -1858,6 +1868,10 @@
18581868
"tomlkit": {
18591869
"tomlkit": []
18601870
},
1871+
"torch": {
1872+
"functorch": [],
1873+
"torch": []
1874+
},
18611875
"tqdm": {
18621876
"tqdm": []
18631877
},

src/databricks/labs/ucx/source_code/known.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ def _analyze_dist_info(cls, dist_info_folder, known_distributions, library_root)
135135
continue
136136
if module_path.name in {'__main__.py', '__version__.py', '__about__.py'}:
137137
continue
138-
cls._analyze_file(known_distributions, library_root, dist_info, module_path)
138+
try:
139+
cls._analyze_file(known_distributions, library_root, dist_info, module_path)
140+
except RecursionError:
141+
logger.error(f"Recursion error in {module_path}")
142+
continue
139143

140144
@classmethod
141145
def _analyze_file(cls, known_distributions, library_root, dist_info, module_path):

0 commit comments

Comments
 (0)