2017-03-27 4 views
1

안녕하세요 저는 분산 훈련을 위해 견적 도구 + 실험 수업을 사용하려고 할 때 휘두르는 상황이 있습니다. 여기 tensorflow 분산 학습/견적 도구 + 실험 프레임 워크

는 예제 : https://gist.github.com/protoget/2cf2b530bc300f209473374cf02ad829

이 TF 공식 튜토리얼

  1. DNNClassifier를 사용하는 간단한 경우는
  2. 실험 프레임 워크
  3. 1 작업자 상이한와 같은 호스트 1 개 PS 포트. 내가 작업자 작업을 시작할 때

    W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. 
    W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 
    W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 
    W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 
    I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:200] Initialize GrpcChannelCache for job ps -> {0 -> localhost:9000} 
    I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:200] Initialize GrpcChannelCache for job worker -> {0 -> 127.0.0.1:9001} 
    I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:221] Started server with target: grpc://localhost:9000 
    

    2), 작업이 자동으로 종료, 전혀 로그를 남기지 않고 :

무슨 일 나는 PS 작업을 시작할 때, 그것은 좋아 보인다)

1 .

열정적으로 도움을 구합니다.

답변

1

나는 같은 문제를 가지고 나는 마침내 해결책을 얻을.

문제는 Environment.CLOUDconfig._environment

config = {"cluster": {'ps':  ['127.0.0.1:9000'], 
         'worker': ['127.0.0.1:9001']}} 

if args.type == "worker": 
    config["task"] = {'type': 'worker', 'index': 0} 
else: 
    config["task"] = {'type': 'ps', 'index': 0} 

os.environ['TF_CONFIG'] = json.dumps(config) 

config = run_config.RunConfig() 

config._environment = run_config.Environment.CLOUD 

설정 config._environment입니다.

그럼 당신은 교육 시스템을 배포 할 수 있습니다. 내가 추측 일부 내부 tensorflow 코드에, 나는이에 대한 SO 이미에 질문을 열었습니다 인해

나는 그것이 내가 같은 문제가 :)

1

당신이 행복한 희망, 그건 : TensorFlow: minimalist program fails on distributed mode. https://github.com/tensorflow/tensorflow/issues/8796 :

는 또한 끌어 오기 요청을 열었다.

이 문제를 해결하기 위해 두 가지 옵션이 있습니다. 이것이 당신의 ClusterSpec 가진 암시 local 환경으로 인해, 당신은 다른 (중 google 또는 cloud)를 설정 시도해 볼 수도 있습니다,하지만 난 당신의 일의 나머지 부분은 영향을받지 않습니다 말씀 드릴 수 없습니다. 그래서 코드를 한 눈에 보았고 로컬 모드로 직접 수정 해 보았습니다.

당신은 더 정확하게 그 게시물에 실패하는 이유에 대한 설명을 볼 수 있습니다

, 사실은 구글 (tensorflow/contrib/learn/python/learn/experiment.py에서) 지금까지 내가 무슨 짓을 내가 그들의 소스 코드를 패치 꽤 침묵했다입니다 :

# Start the server, if needed. It's important to start the server before 
# we (optionally) sleep for the case where no device_filters are set. 
# Otherwise, the servers will wait to connect to each other before starting 
# to train. We might as well start as soon as we can. 
config = self._estimator.config 
if (config.environment != run_config.Environment.LOCAL and 
    config.environment != run_config.Environment.GOOGLE and 
    config.cluster_spec and config.master): 
self._start_server() 

(이 부분은 당신이 당신의 클러스터 사양에 전혀 설정하지 않는 경우 당신입니다 로컬 모드에서 시작 서버를 방지, 그래서 당신은 단순히 config.environment != run_config.Environment.LOCAL and을 언급해야하며, 그 작동합니다).

관련 문제