Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use environment variable to set trainer #1821

Closed
jacquesqiao opened this issue Apr 20, 2017 · 1 comment
Closed

use environment variable to set trainer #1821

jacquesqiao opened this issue Apr 20, 2017 · 1 comment

Comments

@jacquesqiao
Copy link
Member

currently we use

paddle.init(xx1=yy1, xx2=yy2)

to init paddle, thus we need to change trianier python code if we want to change from local training to cluster training.

local init

paddle.init(use_gpu=False, trainer_count=1)

cluster training

# cluster init
paddle.init(
            use_gpu=False,
            trainer_count=1,
            port=7164,
            ports_num=1,
            ports_num_for_sparse=1,
            num_gradient_servers=1)

so we need to change this to config with environment variable,like:

export USE_GPU=True
export TRAINER_COUNT=1
...
python train.py
@jacquesqiao jacquesqiao changed the title use environment variable to set trainer config use environment variable to set trainer Apr 20, 2017
@typhoonzero
Copy link
Contributor

I think this is resolve by #2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants