MCPcopy Create free account
hub / github.com/dmlc/xgboost / download

Function download

tests/python/test_model_compatibility.py:127–138  ·  view source on GitHub ↗

Download the model files from S3.

(path: str)

Source from the content-addressed store, hash-verified

125
126
127def download(path: str) -> None:
128 """Download the model files from S3."""
129 zip_path, _ = urllib.request.urlretrieve(
130 "https://xgboost-ci-jenkins-artifacts.s3-us-west-2"
131 + ".amazonaws.com/xgboost_model_compatibility_tests-3.0.2.zip"
132 )
133 sha = "49d4d4db667a73590099dad9dca4f078532df05c5ea6e035ad4fa09596b1905a"
134 with open(zip_path, "rb") as fd:
135 digest = hashlib.file_digest(fd, "sha256")
136 assert digest.hexdigest() == sha
137 with zipfile.ZipFile(zip_path, "r") as z:
138 z.extractall(path)
139
140
141@pytest.mark.skipif(**tm.no_sklearn())

Callers 1

test_model_compatibilityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected