Skip to content

Conversation

@typhoonzero
Copy link
Collaborator

Job start command should not have command line arguments added by the hidden script. Use env instead.

@typhoonzero typhoonzero requested a review from gongweibao March 5, 2018 03:17
Copy link
Collaborator

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: how can the users print all env variables if not using the command line?


stdbuf -oL sh -c "${ENTRY} --ps_hosts=${ps_hosts} --trainer_hosts=${trainer_hosts} \
--task_index=${task_index}"
stdbuf -oL sh -c "${ENTRY}"
Copy link
Collaborator

@gongweibao gongweibao Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add task_index environment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PADDLE_INIT_TRAINER_ID does the job.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can the users print all env variables if not using the command line

using python os.envs

Copy link
Collaborator

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@typhoonzero typhoonzero merged commit 2d2c23c into PaddlePaddle:develop Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants