MCPcopy
hub / github.com/NVIDIA-NeMo/Speech / ais_binary

Function ais_binary

nemo/utils/data_utils.py:141–157  ·  view source on GitHub ↗

Return location of `ais` binary if available.

()

Source from the content-addressed store, hash-verified

139
140@lru_cache(maxsize=1)
141def ais_binary() -> str:
142 """Return location of `ais` binary if available."""
143 path = shutil.which('ais')
144
145 if path is not None:
146 logging.debug('Found AIS binary at %s', path)
147 return path
148
149 # Double-check if it exists at the default path
150 default_path = '/usr/local/bin/ais'
151 if os.path.isfile(default_path):
152 logging.info('ais available at the default path: %s', default_path, mode=LogMode.ONCE)
153 return default_path
154 logging.warning(
155 f'AIS binary not found with `which ais` and at the default path {default_path}.', mode=LogMode.ONCE
156 )
157 return None
158
159
160def datastore_path_to_local_path(store_path: str) -> str:

Callers 2

test_ais_binaryMethod · 0.90

Calls 3

debugMethod · 0.80
infoMethod · 0.80
warningMethod · 0.80

Tested by 1

test_ais_binaryMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…