2017-01-31 13 views
1

Wenn in Cloud Shell der Beispielcode von this posting by Google's Slaven Bilac ausgeführt wird, tritt ein Fehler auf.Fehler Umschulung mit Google Cloud ml Beispielcode

[email protected]:~/google-cloud-ml/samples/flowers$ ./sample.sh 
Your active configuration is: [cloudshell-270] 


Using job id: flowers_chuck_20170130_212715 

# Takes about 30 mins to preprocess everything. We serialize the two 
# preprocess.py synchronous calls just for shell scripting ease; you could use 
# --runner DataflowPipelineRunner to run them asynchronously. Typically, 
# the total worker time is higher when running on Cloud instead of your local 
# machine due to increased network traffic and the use of more cost efficient 
# CPU's. Check progress here: https://console.cloud.google.com/dataflow 
python trainer/preprocess.py \ 
    --input_dict "$DICT_FILE" \ 
    --input_path "gs://cloud-ml-data/img/flower_photos/eval_set.csv" \ 
    --output_path "${GCS_PATH}/preproc/eval" \ 
    --cloud 
WARNING:root:Couldn't find python-snappy so the implementation of _TFRecordUtil._masked_crc32c is not as fast as it could be. 
WARNING:root:BlockingDataflowPipelineRunner is deprecated, use BlockingDataflowRunner instead. 
WARNING:root:BlockingDataflowRunner is deprecated, use DataflowRunner instead. 
Traceback (most recent call last): 
    File "trainer/preprocess.py", line 446, in <module> 
main(sys.argv[1:]) 

    File "trainer/preprocess.py", line 442, in main 
run(arg_dict) 
    File "trainer/preprocess.py", line 361, in run 
p = beam.Pipeline(options=pipeline_options) 
    File "/home/chuck/.local/lib/python2.7/site-packages/apache_beam/pipeline.py", line 131, in __init__ 
    'Pipeline has validations errors: \n' + '\n'.join(errors)) 
ValueError: Pipeline has validations errors: 
Missing GCS path option: temp_location. 

Wie kann man die Datei (en) aus GoogleCloudPlatform/cloudml-samples/flowers ändern, dies zu vermeiden?

Antwort

0

Haben Sie versucht, die CloudShell setup script zu laufen? Es hilft, einige der Versionen zu verwalten, die hier die Kernfrage zu sein scheint:

curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/setup_cloud_shell.sh | bash 
+0

Ja, tat ich, ohne Erfolg. Dann erstellte ich ein völlig neues Google Cloud-Konto (mit einem neuen Rechnungskonto, einem neuen Projekt usw.) und führte das CloudShell-Setup-Skript und die anderen Schritte zur Einrichtung der Umgebung aus (über Ihren Link). aber habe denselben Fehler mit diesem Konto. Danke für Ihre Antwort, @JoshGC, haben Sie bitte einen anderen Vorschlag? –

+0

Du hast Recht Chuck. Lassen Sie mich genauer hinsehen – JoshGC

+0

Workaround: Fügen Sie in Zeile 420 in trainer/preprocess.py dem Wörterbuch default_values ​​einen Schlüssel temp_location hinzu: 'temp_location': os.path.join (os.path.dirname (parsed_args.output_path) 'staging'), –

1

Chuck,

es scheint, dass das Problem, das Sie sehen, in dem Versionskonflikt zurückzuführen ist. Einfach fix ist staging_location mit temp_location in default_values ​​dic innen preprocess.py zu ersetzen:

default_values = { 
    'project': 
     get_cloud_project(), 
    # **here** 
    'temp_location': 
     os.path.join(os.path.dirname(parsed_args.output_path), 'temp'), 
    'runner': 
     'DataflowRunner', 
    'extra_package': 
     Default.CML_PACKAGE, 
    'save_main_session': 
     True, 
} 

Wir werden die Probe kurz, dies zu reflektieren updaten.

+0

Wenn ich Ihre obige Problemumgehung verwendet habe, habe ich genau den gleichen Fehler wie zuvor erhalten. Wenn ich Ihre obige Abhilfe verwendet und auch geändert Linie 402 bis parser.add_argument ( ‚--temp_location‘, type = str, helfen = ‚Pfad zum Staffelungsort.‘), Scheint ich zu arbeiten. Mein Job wartet auf den Start; Sobald es fertig ist, werde ich diese Fragen beantworten, danke. –

+0

Der Job ist fehlgeschlagen. Der Trainer wurde gebaut und erfolgreich installiert. Aber es gab einen Fehler sofort nach "Gestarteten Server mit Ziel: grpc: // localhost: 2222". Also ich denke, dass meine Änderung an Ihrem Workaround falsch war. Slaven, hast du irgendwelche Vorschläge? –

Verwandte Themen