{"id":15014792,"url":"https://github.com/hyperdashio/hyperdash-sdk-py","last_synced_at":"2025-08-21T00:32:03.194Z","repository":{"id":55338598,"uuid":"93969677","full_name":"hyperdashio/hyperdash-sdk-py","owner":"hyperdashio","description":"Official Python SDK for Hyperdash","archived":false,"fork":false,"pushed_at":"2021-10-05T08:49:22.000Z","size":532,"stargazers_count":198,"open_issues_count":32,"forks_count":24,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-07T23:38:42.520Z","etag":null,"topics":["ai","ipython","jupyter-notebook","keras","machine-learning","pytorch","sdk"],"latest_commit_sha":null,"homepage":"https://hyperdash.io","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/hyperdashio.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}},"created_at":"2017-06-10T22:53:43.000Z","updated_at":"2024-12-28T19:04:19.000Z","dependencies_parsed_at":"2022-08-14T21:30:37.645Z","dependency_job_id":null,"html_url":"https://github.com/hyperdashio/hyperdash-sdk-py","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hyperdashio/hyperdash-sdk-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdashio%2Fhyperdash-sdk-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdashio%2Fhyperdash-sdk-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdashio%2Fhyperdash-sdk-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdashio%2Fhyperdash-sdk-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperdashio","download_url":"https://codeload.github.com/hyperdashio/hyperdash-sdk-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperdashio%2Fhyperdash-sdk-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271409446,"owners_count":24754715,"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-08-20T02:00:09.606Z","response_time":69,"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":["ai","ipython","jupyter-notebook","keras","machine-learning","pytorch","sdk"],"created_at":"2024-09-24T19:46:05.840Z","updated_at":"2025-08-21T00:32:02.803Z","avatar_url":"https://github.com/hyperdashio.png","language":"Python","readme":"# Hyperdash Python SDK\n[![CircleCI](https://circleci.com/gh/hyperdashio/hyperdash-sdk-py/tree/master.svg?style=svg)](https://circleci.com/gh/hyperdashio/hyperdash-sdk-py/tree/master)\n\n[Hyperdash](https://hyperdash.io) is a machine learning monitoring library capable of running alongside Tensorflow, Scikit-Learn, and other modeling libraries. It was developed with a focus on enabling fast knowledge gain.\n\nUse Hyperdash if you're looking for cloud-based model monitoring that:\n\n* Is fast and easy-to-use with scripts and Jupyter.\n* Tracks your hyperparameters across different model experiments.\n* Graphs performance metrics (loss, reward, etc.) in real-time.\n* Can be viewed remotely on [__web__](https://hyperdash.io/dashboard), [__iOS__](https://itunes.apple.com/us/app/hyperdash-machine-learning-monitoring/id1257582233), and [__Android__](https://play.google.com/store/apps/details?id=com.hyperdash) without self-hosting (e.g. Tensorboard).\n* Saves your experiment's print output (standard out / error) as a local log file.\n* Notifies you when a long-running experiment has finished.\n\nHyperdash is compatible with: **Python 2.7-3.6**\n\n## Installation\n*Foreword: We care deeply about making Hyperdash fast and easy to install  on Linux, Mac, and Windows. If you find a snag along the way, please let us know at support@hyperdash.io!*\n\nInstall Hyperdash in terminal from [pip](https://packaging.python.org/tutorials/installing-packages/#requirements-for-installing-packages). Installing within a python virtual environment such as [virtualenv](https://github.com/pypa/virtualenv) is recommended. If you are having trouble installing via pip, a virtual environment will usually fix the problem.\n```bash\n$ pip install --upgrade pip \u0026\u0026 pip install hyperdash\n```\nBy installing via pip, you can call hyperdash from the command line via both `hyperdash` and `hd`.\n```bash\n# Login if you have an account\n$ hyperdash login\n\n# Or signup free with an email\n$ hd signup\n```\nAfter `login` or `signup`, an API key is saved to your local machine for automatic authorization. If you'd rather manage your API key manually, then review the \"API Key Storage\" section below.\n\nYou're ready to use Hyperdash! Make sure Hyperdash works by running:\n```\n$ hd demo\n```\n\n# Learn Hyperdash in 60 seconds\n## Pure logging \nIf all you need is logging and notifications, simply prefix **any** terminal command:\n```bash\nhd run -n \"Hotdog CNN\" python hotdog.py\n```\nOr use pipe:\n```bash\n./catsdogs.sh | hd pipe -n \"Hotdog CNN\"\n```\nIn Jupyter:\n\n\u003cimg width=\"300\" alt=\"screen shot 2017-09-24 at 7 27 37 pm\" src=\"https://user-images.githubusercontent.com/1892071/30790069-835da34c-a15e-11e7-954f-9b90ca5634f0.png\"\u003e\n\n\n## Experiment instrumentation\nIf you are interested in tracking **hyperparameters** and **performance metrics**, you'll want to use the **Experiment** api. Experiment objects are created with a model name, then auto-started and auto-incremented. By default, Experiment will record print logs. Here is an example of a simple Scikit Learn classifier instrumented:\n```python\n# digits.py\nfrom sklearn import svm, datasets\nfrom hyperdash import Experiment\n\n# Preprocess data\ndigits = datasets.load_digits()\ntest_cases = 50\nX_train, y_train = digits.data[:-test_cases], digits.target[:-test_cases]\nX_test, y_test = digits.data[-test_cases:], digits.target[-test_cases:]\n\n# Create an experiment with a model name, then autostart\nexp = Experiment(\"Digits Classifier\")\n# Record the value of hyperparameter gamma for this experiment\ngamma = exp.param(\"gamma\", 0.1)\n# Param can record any basic type (Number, Boolean, String)\n\nclassifer = svm.SVC(gamma=gamma)\nclassifer.fit(X_train, y_train)\n\n# Record a numerical performance metric\nexp.metric(\"accuracy\", classifer.score(X_test, y_test))\n\n# Cleanup and mark that the experiment successfully completed\nexp.end()\n```\nHyperparameters and metrics are pretty printed for your logs and reference:\n```\n{ gamma     : 0.001 }\n| accuracy  : 1.000 |\nExperiment \"digits-classifier_2017-09-20t18-50-55-258215\" complete.\nLogs are available locally at: /Users/username/.hyperdash/logs/digits-classifier/digits-classifier_2017-09-20t18-50-55-258215.log\n```\nYou can also disable logging by setting `capture_io` to false:\n```python\nexp = Experiment(\"Digits Classifier\", capture_io=False)\n```\n## You've learned Hyperdash!\nVisualize your experiments in the Hyperdash [__web__](https://hyperdash.io/dashboard), [__iOS__](https://itunes.apple.com/us/app/hyperdash-machine-learning-monitoring/id1257582233), and [__Android__](https://play.google.com/store/apps/details?id=com.hyperdash) apps.\n________________\n\n# More information\n- Jupyter/IPython tips\n- Decorator Experiment API\n- API key management\n\n## IPython/Jupyter Notebook\n\n\u003cimg width=\"700\" alt=\"Hyperdash in Jupyter\" src=\"https://user-images.githubusercontent.com/1892071/30736813-1a7fcb7e-9f39-11e7-812b-f1b77ee33dab.png\"\u003e\n \nNote: by default all print statements will be redirected to the cell that creates the experiment object due to capturing Jupyter's stdio. Use `exp = Experiment(\"model name\", capture_io=False)` for normal printing, but no logging.\n\nThe SDK currently doesn't support mid-experiment parameter redeclaration. Remember to `end()` your experiment before redeclaring `exp`.\n\n## Decorator experiment API\nIf your experiment is wrapped in a function, the decorator API saves you the trouble of having to remember to write `exp.end()`. The exact argument `exp` must be passed into the wrapped function to get access to the Experiment object.\n```python\nfrom hyperdash import monitor\n\n@monitor(\"dogs vs. cats\")\ndef train_dogs_vs_cats(exp): # Get Experiment object as argument to function.\n  lr = exp.param(\"learning rate\", 0.005)\n  model = Model(lr)\n  model.fit()\n  exp.metric(model.accuracy())\n```\n## API Keys\n### Storage\n\nIf you signed up through the CLI, then your API key is already installed in hyperdash.json file in the home directory of your user.\n\nYou can alternatively override this API key with a hyperdash.json file in your local directory (so you can have different API keys for different projects) or with the HYPERDASH_API_KEY environment variable.\n\nFinally, the monitor function accepts an api_key_getter argument that if passed in will be called everytime we need to retrieve your API key. Example:\n\n```python\n# test_script.py\n\nfrom hyperdash import monitor\n\n# This function can do anything you want, as long as it returns a Hyperdash API key as a string\ndef get_api_key():\n  return \"super_secret_api_key\"\n\n@monitor(\"dogs vs. cats\", api_key_getter=get_api_key)\ndef train_dogs_vs_cats():\n  print(\"Epoch 1, accuracy: 50%\")\n  time.sleep(2)\n  print(\"Epoch 2, accuracy: 75%\")\n  time.sleep(2)\n  print(\"Epoch 3, accuracy: 100%\")\n```\n\nKeep in mind that we will call your function on a regular basis while the job is running (currently about once every 5 minutes) so that we can support API key rotation for long-running jobs.\n\n### API Key Rotation\n\nThe Hyperdash library will try and load up your API key about once every 5 minutes. Generally speaking this isn't something you need to think about, but in the rare case that you need to rotate an API key without stopping a long-running job, you can just change the HYPERDASH_API_KEY environment variable or hyperdash.json file and the SDK will automatically pickup the new key within a few minutes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperdashio%2Fhyperdash-sdk-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperdashio%2Fhyperdash-sdk-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperdashio%2Fhyperdash-sdk-py/lists"}