18 releases

✓ Uses Rust 2018 edition

new 0.4.0-alpha.4 Oct 9, 2019
0.2.0 Aug 7, 2019
0.1.4 Oct 18, 2018
0.0.8 Jul 25, 2017
0.0.2 Nov 25, 2016
Download history 91/week @ 2019-06-25 26/week @ 2019-07-02 65/week @ 2019-07-09 13/week @ 2019-07-16 13/week @ 2019-07-30 32/week @ 2019-08-06 2/week @ 2019-08-13 28/week @ 2019-08-20 31/week @ 2019-08-27 99/week @ 2019-09-03 64/week @ 2019-09-10 301/week @ 2019-09-17 137/week @ 2019-09-24 85/week @ 2019-10-01

284 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

99KB
2K SLoC

A unofficial, incomplete bigml client for Rust

Documentation

An interface to the BigML machine learning API, written in Rust. We use this at Faraday, so it's pretty reliable for what it does. But it omits many features that we don't need to access from Rust. In particular, we focus first on supporting WhizzML scripts, and many other parts of the API are much less complete.

What works:

  • Fetching information about many different kinds of resources.
  • Creating a few kinds of resources.
  • Updating selected properties of a few kinds of resources.
  • Uploading sources that are small enough to fit in memory.
  • Executing scripts and getting the output values.

It's pretty easy to add new types and fields. See src/resources for existing examples. We will happily accept PRs adding new resource types!


lib.rs:

An unofficial Rust client for BigML's REST API.

BigML is an commercial machine-learning service. This unofficial library allows you to talk to BigML from Rust.

We focus on passing data to BigML and running WhizzML scripts, though it's pretty easy to add support for new resource types and resource fields. See our GitHub repository for more information.

use bigml::{Client, resource::{execution, Id, Script}};
use futures::{FutureExt, TryFutureExt};
use std::{path::Path, str::FromStr};
use tokio::prelude::*;

# fn main() -> bigml::Result<()> {
#
let username = "username";
let api_key = "api_key";
let path = Path::new("sample.csv");
let script_id: Id<Script> = Id::from_str("script/123abc")?;

// Create a BigML client.
let client = bigml::Client::new(username, api_key)?;

// Create a source.
let source = client.create_source_from_path_and_wait(path)
  .boxed()
  .compat()
  .wait()?;
println!("{:?}", source);

// Execute the script.
let mut args = execution::Args::default();
args.set_script(script_id);
args.add_input("source-id", &source.resource)?;
args.add_output("my-output");
let execution = client.create_and_wait(&args)
  .boxed()
  .compat()
  .wait()?;
println!("{:?}", execution);
#
#   Ok(())
# }

For more information, see the BigML API and our example code.

Dependencies

~16MB
~385K SLoC