Skip to content

Commit

Permalink
add hooks for R binding in SFN (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonge27 committed Sep 2, 2020
1 parent 2c93c79 commit 2d44333
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion metaflow/plugins/aws/step_functions/step_functions.py
Expand Up @@ -13,6 +13,7 @@
from metaflow.util import compress_list, dict_to_cli_options, to_pascalcase
from metaflow.metaflow_config import SFN_IAM_ROLE, \
EVENTS_SFN_ACCESS_IAM_ROLE, SFN_DYNAMO_DB_TABLE
from metaflow import R

from .step_functions_client import StepFunctionsClient
from .event_bridge_client import EventBridgeClient
Expand Down Expand Up @@ -606,7 +607,11 @@ def _step_cli(self,

script_name = os.path.basename(sys.argv[0])
executable = self.environment.executable(node.name)
entrypoint = [executable, script_name]

if R.use_r():
entrypoint = [R.entrypoint()]
else:
entrypoint = [executable, script_name]

# Use AWS Batch job identifier as the globally unique task identifier.
task_id = '${AWS_BATCH_JOB_ID}'
Expand Down

0 comments on commit 2d44333

Please sign in to comment.