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: This class is for the users to manually look up artifacts. Since we introduce creating sub-directories in a user specified artifact location, if the user has 2 jobs with `MLTransform().with_transform(tft_operation).with_transform(embeddings)` that have the same artifact location, there would be two sub-directories created by `MLTransform`. By using ArtifactsFetcher, we don't know which artifact location to read and we will need a better solution for that. -- 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]
