-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added model persistence section to docs
- Loading branch information
1 parent
3e885d2
commit bfa9bc9
Showing
7 changed files
with
87 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,14 @@ | |
"email": "[email protected]", | ||
"homepage": "https://andrewdalpino.com", | ||
"role": "Lead Engineer" | ||
}, | ||
{ | ||
"name": "Core Team", | ||
"homepage": "https://github.com/orgs/RubixML/teams/core" | ||
}, | ||
{ | ||
"name": "Contributors", | ||
"homepage": "https://github.com/RubixML/RubixML/graphs/contributors" | ||
} | ||
], | ||
"require": { | ||
|
@@ -72,6 +80,10 @@ | |
"preferred-install": "dist", | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
"support": { | ||
"email": "[email protected]", | ||
"issues": "https://github.com/RubixML/RubixML/issues", | ||
"source": "https://github.com/RubixML/RubixML", | ||
"docs": "https://docs.rubixml.com/en/latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Model Persistence | ||
Model persistence refers to the capability of an estimator to be trained and used to make predictions in processes other the current running process. Imagine that you trained a classifier to categorize comment posts and now you want to deploy it to a server to perform real-time inference on your website. Or, say you just finished training a model that took the whole day and you want to save it for later. Rubix ML allows you to handle both of these scenarios using [Persisters](./persiters/api.md) and [Persistable](persistable.md) objects. | ||
|
||
### Persisters | ||
Persisters are objects whose responsibility is to save and load model data to and from storage. For example, the [Filesystem](./persisters/filesystem.md) serializes and reconstitutes a persistable model from a location on a filesystem such as a local hard disk or network attached storage. | ||
|
||
**Example** | ||
|
||
```php | ||
use Rubix\ML\Persisters\Filesystem; | ||
|
||
$persister = new Filesystem('example.model'); | ||
|
||
$estimator = $persister->load(); | ||
|
||
// Do something | ||
|
||
$persister->save($estimator); | ||
``` | ||
|
||
### Serialization | ||
Very often a model will need to be serialized, or packaged into a discrete chunk of data, before it can be persisted. The same is true for loading a model which is serialization in reverse. Rubix ML is compatible with a number of portable serialization formats including the Native PHP format as well as the Igbinary format. By knowing the format, you can easily transport models between systems. | ||
|
||
### The Persistent Model Meta-estimator | ||
The [Persistent Model](persistent-model.md) meta-estimator is a model wrapper that uses the persistence subsystem under the hood. It provides `save()` and `load()` methods for the persistable learner that it wraps. | ||
|
||
**Example** | ||
|
||
```php | ||
use Rubix\ML\PersistentModel; | ||
use Rubix\ML\Persisters\Filesystem; | ||
|
||
$estimator = PersistentModel::load(new Filesystem('example.model')); | ||
|
||
// Do something | ||
|
||
$estimator->save(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
# System Architecture | ||
The Rubix architecture is defined by a few key abstractions and their corresponding types and interfaces. | ||
The high level API is designed around a few key abstractions and their corresponding types and interfaces. In addition, Rubix ML employs various mid and low level subsystems that power many of the learners. This layered architecture allows for power and flexibility while keeping the public interface simple and straighforward. | ||
|
||
![Rubix ML System Architecture](https://raw.githubusercontent.com/RubixML/RubixML/master/docs/img/rubix-ml-system-architecture.svg?sanitize=true) | ||
### General Architecture | ||
From the perspective of data flowing in and out of a machine learning system, there are a number of components that the user *may* interact with. These include [Dataset](./datasets/api.md) objects, [Transformers](./transformers/api.md), [Estimators](estimator.md), and Meta-estimators. Starting from the top, the illustration below shows the path of data from input features to prediction within Rubix ML. | ||
|
||
![Rubix ML System Architecture](https://raw.githubusercontent.com/RubixML/RubixML/master/docs/img/rubix-ml-system-architecture.svg?sanitize=true) | ||
|
||
### Subsystems | ||
Under the hood, Rubix ML utilizes a number of modular subsystems that are highly optimized for their purpose such as the graph, neural net, SVM, and tensor processing subsystems. Some mid and low level subsystems run as optional PHP extensions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters