Hub API
You can interact with the ArgHub using the Hub API.
1 |
|
Methods
load_model(model, verbose=True)
Load a model from the hub. If the model cannot be found, a NonExistentHubItemError
is thrown. If the model package is corrupted, an InvalidMetadataError
is thrown.
-
model
- a model slug -
verbose
- toggle verbosity (bool)
1 2 3 4 |
|
load_dataset(dataset, train_val_test_split=None, verbose=True)
Load a dataset from the hub with a given train-validation-test split. If the dataset cannot be found, a NonExistentHubItemError
is thrown.
If the split is provided, returns tuple of (training set, validation set, testing set, dataset root directory). Otherwise, returns tuple of (data, dataset root directory).
-
dataset
- a dataset slug -
train_val_test_split
- a triple denoting the train-validation-test ratio (e.g. (70, 10, 20))
1 2 3 4 |
|
empty_cache()
Empties the hub's cache. This removes any ArgHub models saved locally.
1 2 3 |
|
package_model(model, save_dir='', model_name='model')
Packages a model so that it can be uploaded to ArgHub.
model
- the model wrapped in the relevantargflow.Model
save_dir
- directory to save the packaged modelmodel_name
- name of the model
1 2 3 4 5 6 7 8 9 10 |
|