I have a very simple trainer that follows the sample directory structure:
/dist
__init__.py
setup.py
/trainer
__init__.py
task.py
Under the /dist directory, runs fine locally:
$ gcloud ml-engine local train
--package-path=trainer
--module-name=trainer.task
Now, when trying to deploy it, under the /dist directory and this command:
$ gcloud ml-engine jobs submit training testA
--package-path=trainer
--module-name=trainer.task
--staging-bucket=$JOB_DIR
--region us-central1
It gives me an error "No moduled name trainer"
INFO 2017-04-13 12:28:35 -0700 master-replica-0 Installing collected packages: pyyaml, scipy, scikit-learn, trainer
INFO 2017-04-13 12:28:38 -0700 master-replica-0 Successfully installed pyyaml-3.12 scikit-learn-0.18.1 scipy-0.18.1 trainer-0.1
INFO 2017-04-13 12:28:38 -0700 master-replica-0 Running command: python -m trainer.task
ERROR 2017-04-13 12:28:38 -0700 master-replica-0 /usr/bin/python: No module named trainer
EDIT: here is the content of setup.py
from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = [
'pyyaml',
'scipy==0.18.1',
'scikit-learn'
]
setup(
name='trainer',
version='0.1',
install_requires=REQUIRED_PACKAGES,
include_package_data=True,
description='Classifier test'
)
What am I doing wrong?
Thanks,
M