rstudio/cloudml

'list' object has no attribute 'get' when using cloudml_train R package cloudml

Closed this issue · 3 comments

Hi,

I have been trying to follow the guide on https://tensorflow.rstudio.com/tools/cloudml/articles/getting_started.html but get the error message below when running cloudml_train('a_test_script'). I have tried this on three systems (windows and ubuntu) now and always get same error that " 'list' object has no attribute 'get'". Is the guide still up to date?


> cloudml_train('example.R')
Submitting training job to CloudML...
Error: ERROR: gcloud invocation failed [exit status 1]

[command]
/home/gustav/google-cloud-sdk/bin/gcloud --account gxxxxxjoh@gmail.com --project immuno-001 ml-engine jobs submit training cloudml_2019_08_28_162253023 --job-dir=gs://immuno-001/r-cloudml/staging --package-path=cloudml-model --module-name=cloudml-model.cloudml.deploy --runtime-version=1.9 --region=us-central1 --config=cloudml-model/cloudml.yml -- Rscript

[output]


[errmsg]
WARNING: The `gcloud ml-engine` commands have been renamed and will soon be removed. Please use `gcloud ai-platform` instead.
ERROR: gcloud crashed (AttributeError): 'list' object has no attribute 'get'

*Some diagnosis below*

Trace:
gcloud_main.py:187
 gcloud_cli.Execute()
calliope/cli.py:1009
 self._HandleAllErrors(exc, command_path_string, specified_arg_names)
calliope/cli.py:1042
 exceptions.HandleError(exc, command_path_string, self.__known_error_handler)
calliope/exceptions.py:524
 core_exceptions.reraise(exc)
core/exceptions.py:144
 six.reraise(type(exc_value), exc_value, tb)
calliope/cli.py:983
 resources = calliope_command.Run(cli=self, args=args)
calliope/backend.py:784
 resources = command_instance.Run(args)
surface/ai_platform/jobs/submit/training.py:86
 args, self._SUPPORT_TPU_TF_VERSION))
command_lib/ml_engine/jobs_util.py:204
 tier = data.get('trainingInput', {}).get('scaleTier', None)
AttributeError: 'list' object has no attribute 'get'


Installation information:

Google Cloud SDK [260.0.0]

Platform: [Linux, x86_64] ('Linux', 'gustav-desktop', '4.15.0-58-generic', '#64-Ubuntu SMP Tue Aug 6 11:12:XX UTC 2019', 'x86_64', 'x86_64')
Locale: ('en_US', 'UTF-8')
Python Version: [2.7.15+ (default, Nov 27 2018, 23:36:35)  [GCC 7.3.0]]
Python Location: [/usr/bin/python2]
Site Packages: [Disabled]

Installation Root: [${HOME}/google-cloud-sdk]
Installed Components:
  core: [2019.08.23]
  gsutil: [4.42]
  bq: [2.0.47]
System PATH: [${HOME}/bin/phantomjs/bin:${HOME}/bin/bwa-0.7.17:/gome/${USER}/bin/clustal-omega-1.2.4:${HOME}/ensembl-vep:${HOME}/bin::/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${HOME}/ensembl-vep:${HOME}/bin::/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${HOME}/bin/phantomjs/bin:${HOME}/.local/bin:${HOME}/bin:${HOME}/bin/phantomjs/bin:${HOME}/bin/bwa-0.7.17:/gome/${USER}/bin/clustal-omega-1.2.4:${HOME}/ensembl-vep:${HOME}/bin::/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${HOME}/ensembl-vep:${HOME}/bin::/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${HOME}/bin/phantomjs/bin:${HOME}/.local/bin:${HOME}/bin:${HOME}/google-cloud-sdk/bin:${HOME}/bin/phantomjs/bin:${HOME}/bin/bwa-0.7.17:/gome/${USER}/bin/clustal-omega-1.2.4:${HOME}/ensembl-vep:${HOME}/bin::/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${HOME}/ensembl-vep:${HOME}/bin::/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home:bin/msys-ssh-1000-18:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home:bin/msys-ssh-1000-18:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin]
Python PATH: [${HOME}/google-cloud-sdk/lib/third_party:${HOME}/google-cloud-sdk/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload]
Cloud SDK on PATH: [False]
Kubectl on PATH: [False]

Installation Properties: [${HOME}/google-cloud-sdk/properties]
User Config Directory: [${CLOUDSDK_CONFIG}]
Active Configuration Name: [default]
Active Configuration Path: [${CLOUDSDK_CONFIG}/configurations/config_default]

Account: [g..h@g..m]
Project: [i..1]

Current Properties:
  [core]
    project: [i..1]
    account: [g..h@g..m]
    disable_usage_reporting: [False]

Logs Directory: [${CLOUDSDK_CONFIG}/logs]
Last Log File: [${CLOUDSDK_CONFIG}/logs/2019.08.28/18.22.55.865784.log]

git: [git version 2.17.1]
ssh: [OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017]

@gustavjoh workaround, revert to a previous version of the Google Cloud SDK, the following worked for me:

gcloud components update --version 245.0.0

Let's leave this issue open since we need to figure out what is breaking the cloudml package.

@gustavjoh Could you try installing remotes::install_github("rstudio/cloudml#198") and try again?

@dfalbel Sorry for my late response, but yes installing from remotes::install_github("#198") fixed the issue! Thank you!