Guides
Log In
Guides

BYOM BERT CLI

import_model.main()

Parse arguments and run import model.

import_model.run_import(url: str, model_type: str, model_name: str, sequence_length: int = 256, on_disk: bool = True, tokenizer: bool = True)

Import BERT model using NuPIC Training Server. See supported models:
https://docs.numenta.com/docs/bring-your-own-model-copy.

Example:

python -m nupic.client.import_model
    –-model_type $MODEL_TYPE
    –-model_name $MODEL_NAME
    –-sequence_length $SEQ_LEN
    –-url $SERVER_URL
    -–tokenizer
    -–on_disk
  • Parameters:
    • url (str) – URL of the API server.
    • model_type (str) – Model type (huggingface, pytorch, etc)
    • model_name (str) – Model name
    • sequence_length (int , optional) – Model’s sequence length, defaults to 256
    • on_disk (bool , optional) – Whether to store the model on disk, defaults to False
    • tokenizer (bool , optional) – Whether to import the tokenizer, defaults to True