{"id":20113142,"url":"https://github.com/cloudacademy/ml-engine-intro","last_synced_at":"2025-10-04T01:49:46.264Z","repository":{"id":77791629,"uuid":"96361778","full_name":"cloudacademy/ml-engine-intro","owner":"cloudacademy","description":null,"archived":false,"fork":false,"pushed_at":"2018-11-16T18:14:51.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-06T11:35:33.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudacademy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-05T21:15:06.000Z","updated_at":"2018-11-16T18:14:52.000Z","dependencies_parsed_at":"2023-04-30T04:36:16.010Z","dependency_job_id":null,"html_url":"https://github.com/cloudacademy/ml-engine-intro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloudacademy/ml-engine-intro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fml-engine-intro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fml-engine-intro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fml-engine-intro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fml-engine-intro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudacademy","download_url":"https://codeload.github.com/cloudacademy/ml-engine-intro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fml-engine-intro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254473,"owners_count":25956598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:23:25.366Z","updated_at":"2025-10-04T01:49:46.251Z","avatar_url":"https://github.com/cloudacademy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## This repository is outdated and has been replaced by https://github.com/cloudacademy/mlengine-intro.\n\n### TensorFlow\nTensorFlow website: https://www.tensorflow.org  \nHigh-level API (tf.contrib.learn) tutorial: https://www.tensorflow.org/get_started/tflearn  \nTensorFlow installation: https://www.tensorflow.org/install  \n\n```\nsudo -H pip install tensorflow\n```\n\nAdd to iris.py:  \n```\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\ntf.logging.set_verbosity(tf.logging.ERROR)\nimport shutil\nshutil.rmtree('/tmp/iris_model', ignore_errors=True)\n```\n\n```\npython iris.py  \n```\n\n### Training a Model with ML Engine\nGoogle Cloud SDK installation: https://cloud.google.com/sdk  \n\n```\nmkdir trainer  \nmv iris.py trainer  \ntouch trainer/__init__.py  \ngcloud ml-engine local train --module-name trainer.iris --package-path trainer  \n```\n\n```\nBUCKET=gs://[ProjectID]-ml  # Replace [ProjectID] with your Google Cloud Project ID  \nREGION=[Region]  # Replace [Region] with a Google Cloud Platform region, such as us-central1  \n```\n```\ngcloud ml-engine jobs submit training job1 \\\n    --module-name trainer.iris \\\n    --package-path trainer \\\n    --staging-bucket $BUCKET \\\n    --region $REGION\n```\n\n### Feature Engineering\nTensorFlow Linear Model Tutorial: https://www.tensorflow.org/tutorials/wide  \n\n```\nsudo -H pip install pandas  \n```\n\n```\npython wide_n_deep_tutorial.py --model_type=wide  \n```\n\n### A Wide and Deep Model\n```\npython wide_n_deep_tutorial.py --model_type=deep  \n```\n\n### Distributed Training on ML Engine\nSample code: https://github.com/GoogleCloudPlatform/cloudml-samples/archive/master.zip\n```\ncd Downloads/cloudml-samples-master/census/estimator\nls trainer\n```\nHyperparameter Tuning: https://cloud.google.com/ml-engine/docs/concepts/hyperparameter-tuning-overview  \n\n```\ngsutil cp -r gs://cloudml-public/census/data $BUCKET  \nTRAIN_DATA=$BUCKET/data/adult.data.csv  \nEVAL_DATA=$BUCKET/data/adult.test.csv  \nJOB=census1  \n```\n```\ngcloud ml-engine jobs submit training $JOB \\\n    --job-dir $BUCKET/$JOB \\\n    --runtime-version 1.2 \\\n    --module-name trainer.task \\\n    --package-path trainer \\\n    --region $REGION \\\n    --scale-tier STANDARD_1 \\\n    -- \\\n    --train-files $TRAIN_DATA \\\n    --eval-files $EVAL_DATA \\\n    --train-steps 1000\n```\n\n### Deploying a Model on ML Engine\n```\ngcloud ml-engine models create census --regions=$REGION  \ngsutil ls -r $BUCKET/census1/export  \n```\n```\n# Note: Replace [Path-to-model] below with your Cloud Storage path\ngcloud ml-engine versions create v1 \\\n    --model census \\\n    --origin [Path-to-model] \\\n```\n```\n    --runtime-version 1.2\n```\n```\ngcloud ml-engine predict \\\n    --model census \\\n    --version v1 \\\n    --json-instances \\\n    ../test.json\n```\n\n### Conclusion\nCloud Machine Learning Engine documentation: https://cloud.google.com/ml-engine/docs  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudacademy%2Fml-engine-intro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudacademy%2Fml-engine-intro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudacademy%2Fml-engine-intro/lists"}