{"id":18930190,"url":"https://github.com/nheidloff/hyperparameter-optimization-ibm-watson-studio","last_synced_at":"2026-05-14T22:38:46.690Z","repository":{"id":88375086,"uuid":"138697690","full_name":"nheidloff/hyperparameter-optimization-ibm-watson-studio","owner":"nheidloff","description":"Hyperparameter Optimization with IBM Watson Studio","archived":false,"fork":false,"pushed_at":"2018-06-26T07:55:33.000Z","size":1187,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T19:30:13.570Z","etag":null,"topics":["ai","dl","hpo","ibm","ibmwatson","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nheidloff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-06-26T07:00:50.000Z","updated_at":"2019-04-25T17:06:14.000Z","dependencies_parsed_at":"2024-03-30T16:01:19.047Z","dependency_job_id":null,"html_url":"https://github.com/nheidloff/hyperparameter-optimization-ibm-watson-studio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nheidloff%2Fhyperparameter-optimization-ibm-watson-studio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nheidloff%2Fhyperparameter-optimization-ibm-watson-studio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nheidloff%2Fhyperparameter-optimization-ibm-watson-studio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nheidloff%2Fhyperparameter-optimization-ibm-watson-studio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nheidloff","download_url":"https://codeload.github.com/nheidloff/hyperparameter-optimization-ibm-watson-studio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927825,"owners_count":19719835,"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","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":["ai","dl","hpo","ibm","ibmwatson","tensorflow"],"created_at":"2024-11-08T11:36:53.935Z","updated_at":"2026-03-16T19:30:16.711Z","avatar_url":"https://github.com/nheidloff.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyperparameter Optimization with IBM Watson Studio\n\nThis project includes sample code how to train a model with [TensorFlow](https://www.tensorflow.org/) and the [Deep Learning service](https://www.ibm.com/blogs/watson/2018/03/deep-learning-service-ibm-makes-advanced-ai-accessible-users-everywhere/) within Watson Studio. The sample shows how to use hyperparameter optimization (HPO) in experiments to easily find the best quality model.\n\nAs a starting point [TensorFlow For Poets](https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0) is used to classify images of flowers via transfer learning. Via HPO the number of training steps is optimized.\n\nThis is a screenshot of IBM Watson Studio with a training definition and one hyperparamter 'how_many_training_steps' with values between 100 and 2000.\n\n![alt text](screenshots/trainingdef-small.png \"Screenshot\")\n\n\n## Prerequisites \n\nGet a free [IBM Cloud](https://ibm.biz/nheidloff) lite account (no time restriction, no credit card required).\n\nCreate an instance of the [Machine Learning](https://console.bluemix.net/catalog/services/machine-learning) service. From the credentials get the user name, password and the instance id.\n\nInstall the IBM Cloud CLI with the machine learning plugin and set environment variables by following these [instructions](https://datascience.ibm.com/docs/content/analyze-data/ml_dlaas_environment.html).\n\nCreate an instance of the [Cloud Object Storage\n](https://console.bluemix.net/catalog/services/cloud-object-storage) service and create HMAC credentials by following these [instructions](https://datascience.ibm.com/docs/content/analyze-data/ml_dlaas_object_store.html). Make sure to use 'Writer' or 'Manager' access and note the aws_access_key_id and aws_secret_access_key for a later step.\n\nInstall and configure the AWS CLI by following these [instructions](https://console.bluemix.net/docs/services/cloud-object-storage/cli/aws-cli.html#use-the-aws-cli).\n\n\n## Training of the Model\n\nClone this repo:\n\n```bash\n$ git clone https://github.com/nheidloff/hyperparameter-optimization-ibm-watson-studio.git\n```\n\nCreate two buckets (use unique names):\n\n```bash\n$ aws --endpoint-url=http://s3-api.dal-us-geo.objectstorage.softlayer.net --profile ibm_cos s3 mb s3://nh-flowers-input\n$ aws --endpoint-url=http://s3-api.dal-us-geo.objectstorage.softlayer.net --profile ibm_cos s3 mb s3://nh-flowers-output\n```\n\nDownload and extract Mobilenet and the images:\n\n```bash\n$ cd hyperparameter-optimization-ibm-watson-studio/data\n$ wget http://download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_0.25_224.tgz\n$ tar xvzf mobilenet_v1_0.25_224.tgz \n$ curl http://download.tensorflow.org/example_images/flower_photos.tgz \\\n    | tar xz -C tf_files\n```\n\nUpload bucket with MobileNet and data (use your unique bucket name):\n\n```bash\n$ cd xxx/hyperparameter-optimization-ibm-watson-studio/data\n$ aws --endpoint-url=http://s3-api.dal-us-geo.objectstorage.softlayer.net --profile ibm_cos s3 cp . s3://nh-flowers-input/ --recursive \n```\n\nDefine the experiment, the training definition and the hyperparamter:\n\nOpen [IBM Watson Studio](https://dataplatform.ibm.com/) and create a new project (choose the 'Complete' option).\n\nFrom the 'Assests' tab create a new experiment as done in this [screenshot](screenshots/experiment.png).\n\nCreate a training definition as done in this [screenshot](screenshots/trainingdef.png). You can copy and paste the command from [tf-train.yaml](model/tf-train.yaml).\n\nDefine the hyperparameter 'how_many_training_steps' as done in this [screenshot](screenshots/hyperparameter.png). \n\nRun the experiment with the training runs.\n\nDownload the saved models, the logs and the [results](screenshots/result.png).\n\n```bash\n$ cd xxx/hyperparameter-optimization-ibm-watson-studio/output\n$ aws --endpoint-url=http://s3-api.dal-us-geo.objectstorage.softlayer.net --profile ibm_cos s3 sync s3://nh-flowers-output .\n```\n\n## Next Steps\n\nTo learn more about HPO check out the [documentation](https://dataplatform.ibm.com/docs/content/analyze-data/ml_dlaas_hpo.html?audience=wdp\u0026context=analytics). As alternative to the web interface, experiments can also be used from Python notebooks and via CLIs.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnheidloff%2Fhyperparameter-optimization-ibm-watson-studio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnheidloff%2Fhyperparameter-optimization-ibm-watson-studio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnheidloff%2Fhyperparameter-optimization-ibm-watson-studio/lists"}