MCPcopy Create free account
hub / github.com/modelscope/FunASR / check_for_update

Function check_for_update

funasr/utils/version_checker.py:22–42  ·  view source on GitHub ↗

Check for update. Args: disable: TODO.

(disable=False)

Source from the content-addressed store, hash-verified

20
21
22def check_for_update(disable=False):
23 """Check for update.
24
25 Args:
26 disable: TODO.
27 """
28 current_version = version.parse(__version__)
29 print(f"funasr version: {current_version}.")
30 if disable:
31 return
32
33 print(
34 "Check update of funasr, and it would cost few times. You may disable it by set `disable_update=True` in AutoModel"
35 )
36 pypi_version = get_pypi_version("funasr")
37
38 if current_version < pypi_version:
39 print(f"New version is available: {pypi_version}.")
40 print('Please use the command "pip install -U funasr" to upgrade.')
41 else:
42 print(f"You are using the latest version of funasr-{current_version}")

Callers 1

__init__Method · 0.90

Calls 2

get_pypi_versionFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…