AnandInguva commented on code in PR #29564:
URL: https://github.com/apache/beam/pull/29564#discussion_r1420836285


##########
sdks/python/apache_beam/ml/transforms/utils.py:
##########
@@ -28,8 +30,13 @@ class ArtifactsFetcher():
   to the TFTProcessHandlers in MLTransform.
   """
   def __init__(self, artifact_location):
-    self.artifact_location = artifact_location
-    self.transform_output = tft.TFTransformOutput(self.artifact_location)
+    files = os.listdir(artifact_location)
+    files.remove(base._ATTRIBUTE_FILE_NAME)
+    if len(files) > 1:
+      raise NotImplementedError(
+          'Multiple files in artifact location not supported yet.')

Review Comment:
   The current implementation of this class allows users to manually retrieve 
artifacts. However, it introduces a problem when a single job with identical 
artifact locations runs 
`MLTransform().with_transform(tft_operation).with_transform(embeddings)`. This 
leads to the creation of sub-directories within the specified artifact 
location(which the behavior you were referring to). Unfortunately, 
`ArtifactsFetcher` lacks the capability of figuring out between these 
directories, making it difficult to determine which artifacts to retrieve. 
Therefore, a more robust solution is necessary to address this issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to