Skip to content

Commit

Permalink
Revert "fix: validate required configuration for Batch (#1483)" (#1486)
Browse files Browse the repository at this point in the history
This reverts commit b889f6a.
  • Loading branch information
savingoyal authored Jul 17, 2023
1 parent 70cbae9 commit 222860c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions metaflow/plugins/aws/batch/batch_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class BatchDecorator(StepDecorator):
"gpu": None,
"memory": None,
"image": None,
"queue": BATCH_JOB_QUEUE, # Will be replaced with an available queue if not provided.
"iam_role": ECS_S3_ACCESS_IAM_ROLE, # Required
"queue": BATCH_JOB_QUEUE,
"iam_role": ECS_S3_ACCESS_IAM_ROLE,
"execution_role": ECS_FARGATE_EXECUTION_ROLE,
"shared_memory": None,
"max_swap": None,
Expand Down Expand Up @@ -149,13 +149,6 @@ def step_init(self, flow, graph, step, decos, environment, flow_datastore, logge
if flow_datastore.TYPE != "s3":
raise BatchException("The *@batch* decorator requires --datastore=s3.")

# Require iam_role
if self.attributes["iam_role"] is None:
# TODO: Unify messaging on various configuration options.
raise BatchException(
"The *@batch* decorator requires an IAM Role that allows AWS Batch job to communicate with Amazon S3 datastore.\n"
'You can specify it either with @batch(iam_role="role-name") or by setting METAFLOW_ECS_S3_ACCESS_IAM_ROLE in your configuration.'
)
# Set internal state.
self.logger = logger
self.environment = environment
Expand Down

0 comments on commit 222860c

Please sign in to comment.