@@ -21,43 +21,6 @@ def _get_paths_from_binaries(binaries, root_dir=""):
2121 return paths
2222
2323
24- def check_for_binaries ():
25- folder_path = os .sep .join (__file__ .split (os .sep )[:- 3 ])
26- binaries_path = os .path .join (folder_path , "binaries.json" )
27- available_configs_path = os .path .join (folder_path , "available_configs.json" )
28- initial = True
29- if os .path .exists (binaries_path ):
30- binaries_dict = json .load (open (binaries_path ))
31- available_configs = json .load (open (available_configs_path ))
32- binaries_paths = _get_paths_from_binaries (binaries_dict , folder_path )
33- # verify if all binaries are available
34- for path in binaries_paths :
35- if not os .path .exists (path ):
36- if initial :
37- config_str = "\n " .join (
38- [
39- f"{ module } : { ', ' .join (configs )} "
40- for module , configs in available_configs .items ()
41- ]
42- )
43- logging .warning (
44- "\t Some binaries seem to be missing in your system. This could "
45- "be either because we don't have compatible binaries for your "
46- "system or that newer binaries were available. In the latter "
47- "case, calling ivy.utils.cleanup_and_fetch_binaries() should "
48- "fetch the binaries binaries. Feel free to create an issue on "
49- "https://github.com/ivy-llc/ivy.git in "
50- "case of the former\n "
51- )
52- logging .warning (
53- "\n Following are the supported configurations"
54- f" :\n { config_str } \n "
55- )
56- initial = False
57- if not initial :
58- print ()
59-
60-
6124def cleanup_and_fetch_binaries (clean = True ):
6225 folder_path = os .sep .join (__file__ .split (os .sep )[:- 3 ])
6326 binaries_path = os .path .join (folder_path , "binaries.json" )
0 commit comments