Skip to content

Commit

Permalink
don't support slurm, snowpark, nvidia (Netflix#1988)
Browse files Browse the repository at this point in the history
* don't support slurm, snowpark, nvidia

* only for argo
  • Loading branch information
madhur-ob authored Aug 22, 2024
1 parent da1f568 commit 20dce26
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions metaflow/plugins/argo/argo_workflows_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@

VALID_NAME = re.compile(r"^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$")

unsupported_decorators = {
"snowpark": "Step *%s* is marked for execution on Snowpark with Argo Workflows which isn't currently supported.",
"slurm": "Step *%s* is marked for execution on Slurm with Argo Workflows which isn't currently supported.",
"nvidia": "Step *%s* is marked for execution on Nvidia with Argo Workflows which isn't currently supported.",
}


class IncorrectProductionToken(MetaflowException):
headline = "Incorrect production token"
Expand Down Expand Up @@ -211,6 +217,11 @@ def create(
deployer_attribute_file=None,
enable_error_msg_capture=False,
):
for node in obj.graph:
for decorator, error_message in unsupported_decorators.items():
if any([d.name == decorator for d in node.decorators]):
raise MetaflowException(error_message % node.name)

validate_tags(tags)

if deployer_attribute_file:
Expand Down

0 comments on commit 20dce26

Please sign in to comment.