|
1 | 1 | # Release History |
2 | 2 |
|
3 | | -## 1.7.5 |
| 3 | +## 1.8.0 |
| 4 | + |
| 5 | +### Bug Fixes |
| 6 | + |
| 7 | +- Modeling: Fix a bug in some metrics that allowed an unsupported version of numpy to be installed |
| 8 | + automatically in the stored procedure, resulting in a numpy error on execution |
| 9 | +- Registry: Fix a bug that leads to incorrect `Model is does not have _is_inference_api` error message when assigning |
| 10 | + a supported model as a property of a CustomModel. |
| 11 | +- Registry: Fix a bug that inference is not working when models with more than 500 input features |
| 12 | + are deployed to SPCS. |
| 13 | + |
| 14 | +### Behavior Change |
| 15 | + |
| 16 | +- Registry: With FeatureGroupSpec support, auto inferred model signature for `transformers.Pipeline` models have been |
| 17 | + updated, including: |
| 18 | + - Signature for fill-mask task has been changed from |
| 19 | + |
| 20 | + ```python |
| 21 | + ModelSignature( |
| 22 | + inputs=[ |
| 23 | + FeatureSpec(name="inputs", dtype=DataType.STRING), |
| 24 | + ], |
| 25 | + outputs=[ |
| 26 | + FeatureSpec(name="outputs", dtype=DataType.STRING), |
| 27 | + ], |
| 28 | + ) |
| 29 | + ``` |
| 30 | + |
| 31 | + to |
| 32 | + |
| 33 | + ```python |
| 34 | + ModelSignature( |
| 35 | + inputs=[ |
| 36 | + FeatureSpec(name="inputs", dtype=DataType.STRING), |
| 37 | + ], |
| 38 | + outputs=[ |
| 39 | + FeatureGroupSpec( |
| 40 | + name="outputs", |
| 41 | + specs=[ |
| 42 | + FeatureSpec(name="sequence", dtype=DataType.STRING), |
| 43 | + FeatureSpec(name="score", dtype=DataType.DOUBLE), |
| 44 | + FeatureSpec(name="token", dtype=DataType.INT64), |
| 45 | + FeatureSpec(name="token_str", dtype=DataType.STRING), |
| 46 | + ], |
| 47 | + shape=(-1,), |
| 48 | + ), |
| 49 | + ], |
| 50 | + ) |
| 51 | + ``` |
| 52 | + |
| 53 | + - Signature for token-classification task has been changed from |
| 54 | + |
| 55 | + ```python |
| 56 | + ModelSignature( |
| 57 | + inputs=[ |
| 58 | + FeatureSpec(name="inputs", dtype=DataType.STRING), |
| 59 | + ], |
| 60 | + outputs=[ |
| 61 | + FeatureSpec(name="outputs", dtype=DataType.STRING), |
| 62 | + ], |
| 63 | + ) |
| 64 | + ``` |
| 65 | + |
| 66 | + to |
| 67 | + |
| 68 | + ```python |
| 69 | + ModelSignature( |
| 70 | + inputs=[FeatureSpec(name="inputs", dtype=DataType.STRING)], |
| 71 | + outputs=[ |
| 72 | + FeatureGroupSpec( |
| 73 | + name="outputs", |
| 74 | + specs=[ |
| 75 | + FeatureSpec(name="word", dtype=DataType.STRING), |
| 76 | + FeatureSpec(name="score", dtype=DataType.DOUBLE), |
| 77 | + FeatureSpec(name="entity", dtype=DataType.STRING), |
| 78 | + FeatureSpec(name="index", dtype=DataType.INT64), |
| 79 | + FeatureSpec(name="start", dtype=DataType.INT64), |
| 80 | + FeatureSpec(name="end", dtype=DataType.INT64), |
| 81 | + ], |
| 82 | + shape=(-1,), |
| 83 | + ), |
| 84 | + ], |
| 85 | + ) |
| 86 | + ``` |
| 87 | + |
| 88 | + - Signature for question-answering task when top_k is larger than 1 has been changed from |
| 89 | + |
| 90 | + ```python |
| 91 | + ModelSignature( |
| 92 | + inputs=[ |
| 93 | + FeatureSpec(name="question", dtype=DataType.STRING), |
| 94 | + FeatureSpec(name="context", dtype=DataType.STRING), |
| 95 | + ], |
| 96 | + outputs=[ |
| 97 | + FeatureSpec(name="outputs", dtype=DataType.STRING), |
| 98 | + ], |
| 99 | + ) |
| 100 | + ``` |
| 101 | + |
| 102 | + to |
| 103 | + |
| 104 | + ```python |
| 105 | + ModelSignature( |
| 106 | + inputs=[ |
| 107 | + FeatureSpec(name="question", dtype=DataType.STRING), |
| 108 | + FeatureSpec(name="context", dtype=DataType.STRING), |
| 109 | + ], |
| 110 | + outputs=[ |
| 111 | + FeatureGroupSpec( |
| 112 | + name="answers", |
| 113 | + specs=[ |
| 114 | + FeatureSpec(name="score", dtype=DataType.DOUBLE), |
| 115 | + FeatureSpec(name="start", dtype=DataType.INT64), |
| 116 | + FeatureSpec(name="end", dtype=DataType.INT64), |
| 117 | + FeatureSpec(name="answer", dtype=DataType.STRING), |
| 118 | + ], |
| 119 | + shape=(-1,), |
| 120 | + ), |
| 121 | + ], |
| 122 | + ) |
| 123 | + ``` |
| 124 | + |
| 125 | + - Signature for text-classification task when top_k is `None` has been changed from |
| 126 | + |
| 127 | + ```python |
| 128 | + ModelSignature( |
| 129 | + inputs=[ |
| 130 | + FeatureSpec(name="text", dtype=DataType.STRING), |
| 131 | + FeatureSpec(name="text_pair", dtype=DataType.STRING), |
| 132 | + ], |
| 133 | + outputs=[ |
| 134 | + FeatureSpec(name="label", dtype=DataType.STRING), |
| 135 | + FeatureSpec(name="score", dtype=DataType.DOUBLE), |
| 136 | + ], |
| 137 | + ) |
| 138 | + ``` |
| 139 | + |
| 140 | + to |
| 141 | + |
| 142 | + ```python |
| 143 | + ModelSignature( |
| 144 | + inputs=[ |
| 145 | + FeatureSpec(name="text", dtype=DataType.STRING), |
| 146 | + ], |
| 147 | + outputs=[ |
| 148 | + FeatureSpec(name="label", dtype=DataType.STRING), |
| 149 | + FeatureSpec(name="score", dtype=DataType.DOUBLE), |
| 150 | + ], |
| 151 | + ) |
| 152 | + ``` |
| 153 | + |
| 154 | + - Signature for text-classification task when top_k is not `None` has been changed from |
| 155 | + |
| 156 | + ```python |
| 157 | + ModelSignature( |
| 158 | + inputs=[ |
| 159 | + FeatureSpec(name="text", dtype=DataType.STRING), |
| 160 | + FeatureSpec(name="text_pair", dtype=DataType.STRING), |
| 161 | + ], |
| 162 | + outputs=[ |
| 163 | + FeatureSpec(name="outputs", dtype=DataType.STRING), |
| 164 | + ], |
| 165 | + ) |
| 166 | + ``` |
| 167 | + |
| 168 | + to |
| 169 | + |
| 170 | + ```python |
| 171 | + ModelSignature( |
| 172 | + inputs=[ |
| 173 | + FeatureSpec(name="text", dtype=DataType.STRING), |
| 174 | + ], |
| 175 | + outputs=[ |
| 176 | + FeatureGroupSpec( |
| 177 | + name="labels", |
| 178 | + specs=[ |
| 179 | + FeatureSpec(name="label", dtype=DataType.STRING), |
| 180 | + FeatureSpec(name="score", dtype=DataType.DOUBLE), |
| 181 | + ], |
| 182 | + shape=(-1,), |
| 183 | + ), |
| 184 | + ], |
| 185 | + ) |
| 186 | + ``` |
| 187 | + |
| 188 | + - Signature for text-generation task has been changed from |
| 189 | + |
| 190 | + ```python |
| 191 | + ModelSignature( |
| 192 | + inputs=[FeatureSpec(name="inputs", dtype=DataType.STRING)], |
| 193 | + outputs=[ |
| 194 | + FeatureSpec(name="outputs", dtype=DataType.STRING), |
| 195 | + ], |
| 196 | + ) |
| 197 | + ``` |
| 198 | + |
| 199 | + to |
| 200 | + |
| 201 | + ```python |
| 202 | + ModelSignature( |
| 203 | + inputs=[ |
| 204 | + FeatureGroupSpec( |
| 205 | + name="inputs", |
| 206 | + specs=[ |
| 207 | + FeatureSpec(name="role", dtype=DataType.STRING), |
| 208 | + FeatureSpec(name="content", dtype=DataType.STRING), |
| 209 | + ], |
| 210 | + shape=(-1,), |
| 211 | + ), |
| 212 | + ], |
| 213 | + outputs=[ |
| 214 | + FeatureGroupSpec( |
| 215 | + name="outputs", |
| 216 | + specs=[ |
| 217 | + FeatureSpec(name="generated_text", dtype=DataType.STRING), |
| 218 | + ], |
| 219 | + shape=(-1,), |
| 220 | + ) |
| 221 | + ], |
| 222 | + ) |
| 223 | + ``` |
| 224 | + |
| 225 | +- Registry: PyTorch and TensorFlow models now expect a single tensor input/output by default when logging to Model |
| 226 | + Registry. To use multiple tensors (previous behavior), set `options={"multiple_inputs": True}`. |
| 227 | + |
| 228 | + Example with single tensor input: |
| 229 | + |
| 230 | + ```python |
| 231 | + import torch |
| 232 | + |
| 233 | + class TorchModel(torch.nn.Module): |
| 234 | + def __init__(self, n_input: int, n_hidden: int, n_out: int, dtype: torch.dtype = torch.float32) -> None: |
| 235 | + super().__init__() |
| 236 | + self.model = torch.nn.Sequential( |
| 237 | + torch.nn.Linear(n_input, n_hidden, dtype=dtype), |
| 238 | + torch.nn.ReLU(), |
| 239 | + torch.nn.Linear(n_hidden, n_out, dtype=dtype), |
| 240 | + torch.nn.Sigmoid(), |
| 241 | + ) |
| 242 | + |
| 243 | + def forward(self, tensor: torch.Tensor) -> torch.Tensor: |
| 244 | + return cast(torch.Tensor, self.model(tensor)) |
| 245 | + |
| 246 | + # Sample usage: |
| 247 | + data_x = torch.rand(size=(batch_size, n_input)) |
| 248 | + |
| 249 | + # Log model with single tensor |
| 250 | + reg.log_model( |
| 251 | + model=model, |
| 252 | + ..., |
| 253 | + sample_input_data=data_x |
| 254 | + ) |
| 255 | + |
| 256 | + # Run inference with single tensor |
| 257 | + mv.run(data_x) |
| 258 | + ``` |
| 259 | + |
| 260 | + For multiple tensor inputs/outputs, use: |
| 261 | + |
| 262 | + ```python |
| 263 | + reg.log_model( |
| 264 | + model=model, |
| 265 | + ..., |
| 266 | + sample_input_data=[data_x_1, data_x_2], |
| 267 | + options={"multiple_inputs": True} |
| 268 | + ) |
| 269 | + ``` |
| 270 | + |
| 271 | +- Registry: Default `enable_explainability` to False when the model can be deployed to Snowpark Container Services. |
| 272 | + |
| 273 | +### New Features |
| 274 | + |
| 275 | +- Registry: Added support to single `torch.Tensor`, `tensorflow.Tensor` and `tensorflow.Variable` as input or output |
| 276 | + data. |
| 277 | +- Registry: Support [`xgboost.DMatrix`](https://xgboost.readthedocs.io/en/stable/python/python_api.html#xgboost.DMatrix) |
| 278 | + datatype for XGBoost models. |
| 279 | + |
| 280 | +## 1.7.5 (03-06-2025) |
4 | 281 |
|
5 | 282 | - Support Python 3.12. |
6 | | -- Explainability: Support native and snowml sklearn pipeline |
| 283 | +- Explainability: Support native and snowflake.ml.modeling sklearn pipeline |
7 | 284 |
|
8 | 285 | ### Bug Fixes |
9 | 286 |
|
|
20 | 297 | `ValueError(f"{self.entrypoint} must be a subpath of {self.source}")` |
21 | 298 | - ML Job (PrPr): Fixed a bug in Ray cluster startup config which caused certain Runtime APIs to fail |
22 | 299 |
|
23 | | -### Behavior Change |
24 | | - |
25 | 300 | ### New Features |
26 | 301 |
|
27 | 302 | - Registry: Added support for handling Hugging Face model configurations with auto-mapping functionality. |
|
0 commit comments