{"record":{"id":"11583676b7527ea0","repo":"apache/beam","slug":"artifact-locations-are-currently-supported-for-only","errorCode":null,"errorMessage":"Artifact locations are currently supported for only available for local paths and GCS paths. Got: %s","messagePattern":"Artifact locations are currently supported for only available for local paths and GCS paths\\. Got: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/ml/transforms/base.py","lineNumber":537,"sourceCode":"    \"\"\"\n    raise NotImplementedError\n\n\nclass _JsonPickleTransformAttributeManager(_TransformAttributeManager):\n  \"\"\"\n  Use Jsonpickle to save and load the attributes. Here the attributes refer\n  to the list of PTransforms that are used to process the data.\n\n  jsonpickle is used to serialize the PTransforms and save it to a json file and\n  is compatible across python versions.\n  \"\"\"\n  @staticmethod\n  def _is_remote_path(path):\n    is_gcs = path.find('gs://') != -1\n    # TODO:https://github.com/apache/beam/issues/29356\n    #  Add support for other remote paths.\n    if not is_gcs and path.find('://') != -1:\n      raise RuntimeError(\n          \"Artifact locations are currently supported for only available for \"\n          \"local paths and GCS paths. Got: %s\" % path)\n    return is_gcs\n\n  @staticmethod\n  def save_attributes(\n      ptransform_list,\n      artifact_location,\n      **kwargs,\n  ):\n    # if an artifact location is present, instead of overwriting the\n    # existing file, raise an error since the same artifact location\n    # can be used by multiple beam jobs and this could result in undesired\n    # behavior.\n    if FileSystems.exists(FileSystems.join(artifact_location,\n                                           _ATTRIBUTE_FILE_NAME)):\n      raise FileExistsError(\n          \"The artifact location %s already exists and contains %s. Please \"","sourceCodeStart":519,"sourceCodeEnd":555,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/ml/transforms/base.py#L519-L555","documentation":"MLTransform artifact locations only support local filesystem paths and GCS paths (gs://). _is_remote_path inspects the path for '://' and raises RuntimeError when any other URL scheme (s3://, http://, etc.) is detected, because the artifact-saving code only handles local and GCS paths (tracked by Beam issue 29356).","triggerScenarios":"Passing artifact_location like 's3://bucket/prefix', 'hdfs://...', 'az://...' or any non-GCS '://' URL to MLTransform(artifact_location=...) or the attribute manager save path.","commonSituations":"Reusing an S3 path from another pipeline's checkpoint config; assuming all Beam-supported filesystems work for MLTransform artifacts; copy-pasting blob storage URLs from AWS/Azure setups.","solutions":["Use a GCS path (gs://bucket/path) or a local directory path for artifact_location.","Download/upload artifacts to your other remote store yourself before/after the pipeline runs.","If you need another remote filesystem, extend the code per Beam issue 29356 or contribute support upstream."],"exampleFix":"// before\nMLTransform(artifact_location='s3://my-bucket/artifacts')\n// after\nMLTransform(artifact_location='gs://my-bucket/artifacts')","handlingStrategy":"validation","validationCode":"def validate_artifact_location(path):\n    scheme = path.split('://')[0] if '://' in path else None\n    if scheme and scheme not in ('gs',):\n        raise ValueError(f'Unsupported artifact scheme: {scheme}:// (only local or gs://)')","typeGuard":"def is_supported_artifact_path(path: str) -> bool:\n    return '://' not in path or path.startswith('gs://')","tryCatchPattern":"try:\n    run_mltransform(artifact_location=path)\nexcept RuntimeError as e:\n    if 'Artifact locations' in str(e):\n        path = to_gcs_or_local(path)","preventionTips":["Use gs:// or local paths only for MLTransform artifact_location.","Keep artifact locations in one storage tier (GCS) across environments.","Watch Beam issue 29356 for expanded remote path support."],"tags":["python","unsupported-path","artifact-location"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}