Download the model files from S3.
(path: str)
| 125 | |
| 126 | |
| 127 | def 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()) |
no outgoing calls
no test coverage detected