MCPcopy
hub / github.com/deezer/spleeter / checksum

Method checksum

spleeter/model/provider/github.py:93–122  ·  view source on GitHub ↗

Downloads and returns reference checksum for the given model name. Parameters: name (str): Name of the model to get checksum for. Returns: str: Checksum of the required model. Raises: ValueError:

(self, name: str)

Source from the content-addressed store, hash-verified

91 )
92
93 def checksum(self, name: str) -> str:
94 """
95 Downloads and returns reference checksum for the given model name.
96
97 Parameters:
98 name (str):
99 Name of the model to get checksum for.
100 Returns:
101 str:
102 Checksum of the required model.
103
104 Raises:
105 ValueError:
106 If the given model name is not indexed.
107 """
108 url: str = "/".join(
109 (
110 self._host,
111 self._repository,
112 self.RELEASE_PATH,
113 self._release,
114 self.CHECKSUM_INDEX,
115 )
116 )
117 response: httpx.Response = httpx.get(url)
118 response.raise_for_status()
119 index: Dict = response.json()
120 if name not in index:
121 raise ValueError(f"No checksum for model {name}")
122 return index[name]
123
124 def download(self, name: str, path: str) -> None:
125 """

Callers 2

downloadMethod · 0.95
test_checksumFunction · 0.80

Calls 2

joinMethod · 0.80
getMethod · 0.45

Tested by 1

test_checksumFunction · 0.64