Commit 3a9cbc7
authored
fix: restore BatchTransformInput.destination attribute in v3 (aws#5865)
In v3, BatchTransformInput.__init__ assigns self.s3_output.s3_uri =
destination, but s3_output is never created on the class or its
MonitoringInput parent (it only exists on the unrelated MonitoringOutput
class). Constructing a BatchTransformInput therefore raises
AttributeError: 'BatchTransformInput' object has no attribute 's3_output'
before the user can use it in any monitoring schedule call.
Reproducer:
from sagemaker.core.model_monitor import (
BatchTransformInput, MonitoringDatasetFormat
)
BatchTransformInput(
data_captured_destination_s3_uri="s3://bucket/captured",
destination="/opt/ml/processing/input",
dataset_format=MonitoringDatasetFormat.csv(header=False),
)
This restores the v2.244.x behavior of storing destination as a plain
attribute and reading it back in _to_request_dict for the LocalPath
field. Also unskips and expands TestBatchTransformInput unit tests that
were marked xfail with "BatchTransformInput has initialization issues
in the source code".1 parent 8a755c5 commit 3a9cbc7
2 files changed
Lines changed: 78 additions & 4 deletions
File tree
- sagemaker-core
- src/sagemaker/core/model_monitor
- tests/unit
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4174 | 4174 | | |
4175 | 4175 | | |
4176 | 4176 | | |
4177 | | - | |
| 4177 | + | |
4178 | 4178 | | |
4179 | 4179 | | |
4180 | 4180 | | |
| |||
4193 | 4193 | | |
4194 | 4194 | | |
4195 | 4195 | | |
4196 | | - | |
| 4196 | + | |
4197 | 4197 | | |
4198 | 4198 | | |
4199 | 4199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
145 | 219 | | |
146 | 220 | | |
147 | 221 | | |
| |||
0 commit comments