GithubHelp home page GithubHelp logo

hyperdash-sdk-r's Introduction

Hyperdash R SDK

The Hyperdash R SDK is the official SDK for Hyperdash.io. Once installed, the SDK automatically monitors your machine learning jobs.

Installation

install.packages("devtools")
library("devtools")
devtools::install_github("hyperdashio/hyperdash-sdk-r")

Usage

The Hyperdash SDK requires a valid API key in order to function. The easiest way to obtain one is to install our Python SDK pip install --upgrade pip && pip install hyperdash and then run hyperdash login (if you already have an account) and hyperdash signup (if you don't), either of which will automatically install one for you.

If you'd rather manage your API key manually, then review the "API Key Storage" section below.

Monitoring an R function

Import the Hyperdash library

library(hyperdash)

and then simply pass any R function to the Monitor function, along with the name of the job as you'd like it to be recorded in Hyperdash.

Note: The provided function must accept an argument called hd.client which will be passed into the function and exposes various Hyperdash functionality. For example, if you want to print something, but also have it available in your Hyperdash logs, you can call

hd.client$print("Your log message here")

instead of the usual

print("Your log message here)
Monitor(function(hd.client) {
  hd.client$print("Begining machine learning...")
  Sys.sleep(2)
  hd.client$print("25% complete...")
  Sys.sleep(2)
  hd.client$print("50% complete...")
  Sys.sleep(2)
  hd.client$print("75% complete...")
  Sys.sleep(2)
  hd.client$print("100% complete...")
  Sys.sleep(2)
  hd.client$print("Done!")
}, "My test hyperdash job")

API key storage

The Hyperdash R SDK will always search for your API key in ~/.hyperdash/hyperdash.json and it expects a JSON file with the following format:

{
  "api_key": "YOUR_API_KEY_HERE
}

Development

Clone the repo and make changes!

If any of the changes you make require the documentation to be updated, open an R repl in the hyperdash directory and run the following commands:

library(devtools)
library(roxygen2)
document()

Note you may need to install those dependencies by running the following commands:

install.packages("devtools")
install.packages("roxygen2")

hyperdash-sdk-r's People

Contributors

richardartoul avatar

Watchers

Spence avatar James Cloos avatar

hyperdash-sdk-r's Issues

Internal message queue

Implement an internal message queue where messages are stored. This would allow us to implement retries when the network has trouble + it would allow us to buffer messages when the write volume is high.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.