Crate bigml[−][src]
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 std::{path::Path, str::FromStr}; 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)?; 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)?; println!("{:?}", execution);
For more information, see the BigML API and our example code.
Re-exports
pub use wait::WaitOptions; |
Modules
resource |
Resource types manipulated by the BigML API. |
wait |
Utilities for waiting, timeouts and error retries. |
Macros
try_with_permanent_failure |
Try |
try_with_temporary_failure |
Try |
Structs
Client |
A client connection to BigML. |
ProgressOptions |
Options specifying how to report progress. |
Enums
Error |
A BigML-related error. |
Type Definitions
ProgressCallback |
A callback which we be callled every time we have a new |
Result |
A custom |