Skip to content

Commit 2de42ae

Browse files
authored
TFX 0.22.2 Patch Release (#2632)
* Update RELEASE.md * Update version.py * Update metadata.py
1 parent 745e5ac commit 2de42ae

File tree

3 files changed

+36
-17
lines changed

3 files changed

+36
-17
lines changed

RELEASE.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
# Version 0.22.1
1+
# Version 0.22.2
22

33
## Major Features and Improvements
44

5+
* N/A
6+
57
## Bug fixes and other changes
6-
* Depends on 'tensorflowjs>=2.0.1.post1,<3' for `[all]` dependency.
7-
* Fixed the name of the usage telemetry when tfx templates are used.
8-
* Depends on `tensorflow-data-validation>=0.22.2,<0.23.0`.
9-
* Depends on `tensorflow-model-analysis>=0.22.2,<0.23.0`.
10-
* Depends on `tfx-bsl>=0.22.1,<0.23.0`.
11-
* Depends on `ml-metadata>=0.22.1,<0.23.0`.
8+
9+
* Reuse Examples artifact type introduced in TFX 0.23 to allow older release jobs running together with TFX 0.23+ release.
10+
11+
### Deprecations
12+
13+
* N/A
1214

1315
## Breaking changes
14-
N/A
16+
17+
* N/A
1518

1619
### For pipeline authors
17-
N/A
20+
21+
* N/A
1822

1923
### For component authors
20-
N/A
24+
25+
* N/A
2126

2227
## Documentation updates
23-
N/A
2428

25-
## Deprecations
26-
N/A
29+
* N/A

tfx/orchestration/metadata.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,27 @@ def store(self) -> metadata_store.MetadataStore:
178178
def _prepare_artifact_type(
179179
self, artifact_type: metadata_store_pb2.ArtifactType
180180
) -> metadata_store_pb2.ArtifactType:
181+
"""Prepares artifact type."""
181182
if artifact_type.id:
182183
return artifact_type
183-
type_id = self.store.put_artifact_type(
184-
artifact_type=artifact_type, can_add_fields=True)
185-
artifact_type.id = type_id
184+
try:
185+
type_id = self.store.put_artifact_type(
186+
artifact_type=artifact_type, can_add_fields=True)
187+
artifact_type.id = type_id
188+
# The patch fix to cherry pick into 0.21 and 0.22 release for working
189+
# together with 0.23+ releases with the same MLMD instance. In 0.23, there
190+
# is an Examples type change which adds additional properties, while the
191+
# older release Examples type failed to be registered, as it contains less
192+
# fields.
193+
# Note in 0.23+ release, mlmd.errors.AlreadyExistsError is used.
194+
except tf.errors.AlreadyExistsError:
195+
if artifact_type.name == 'Examples':
196+
stored_type = self.store.get_artifact_type(artifact_type.name)
197+
artifact_type.id = stored_type.id
198+
absl.logging.warning('Reusing a type registered by newer release.')
199+
else:
200+
raise
201+
186202
return artifact_type
187203

188204
def update_artifact_state(self, artifact: metadata_store_pb2.Artifact,

tfx/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
"""Contains the version string of TFX."""
1616

1717
# Note that setup.py uses this version.
18-
__version__ = '0.22.1'
18+
__version__ = '0.22.2'

0 commit comments

Comments
 (0)