CLI for various CogStack ModelServe operations
Usage:
$ cms [OPTIONS] COMMAND [ARGS]...Options:
--model-type [medcat_snomed|medcat_umls|medcat_icd10|medcat_opcs4|medcat_deid|anoncat|transformers_deid|huggingface_ner|huggingface_llm]--host TEXT--port TEXT--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.
Commands:
serve: This serves various CogStack NLP modelstrain: This pretrains or fine-tunes various...register: This pushes a pretrained NLP model to the...export-model-apis: This generates a model-specific API...build: This builds an OCI-compliant image to...export-openapi-spec: This generates an API document for all...stream: This groups various stream operationspackage: This groups various package operationsmcp: Run the MCP server for accessing CMS...
This serves various CogStack NLP models
Usage:
$ cms serve [OPTIONS]Options:
--model-type [medcat_snomed|medcat_umls|medcat_icd10|medcat_opcs4|medcat_deid|anoncat|transformers_deid|huggingface_ner|huggingface_llm]: The type of the model to serve [required]--model-path TEXT: Either the file path to the local model package or the URL to the remote one--mlflow-model-uri models:/MODEL_NAME/ENV: The URI of the MLflow model to serve--host TEXT: The hostname of the server [default: 127.0.0.1]--port TEXT: The port of the server [default: 8000]--model-name TEXT: The string representation of the model name--streamable / --no-streamable: Serve the streamable endpoints only [default: no-streamable]--device [default|cpu|cuda|mps]: The device to serve the model on [default: default]--llm-engine [CMS|vLLM]: The engine to use for text generation [default: CMS]--load-in-4bit / --no-load-in-4bit: Load the model in 4-bit precision, used by 'huggingface_llm' models [default: no-load-in-4bit]--load-in-8bit / --no-load-in-8bit: Load the model in 8-bit precision, used by 'huggingface_llm' models [default: no-load-in-8bit]--debug / --no-debug: Run in the debug mode--help: Show this message and exit.
This pretrains or fine-tunes various CogStack NLP models
Usage:
$ cms train [OPTIONS]Options:
--model-type [medcat_snomed|medcat_umls|medcat_icd10|medcat_opcs4|medcat_deid|anoncat|transformers_deid|huggingface_ner|huggingface_llm]: The type of the model to train [required]--base-model-path TEXT: The file path to the base model package to be trained on--mlflow-model-uri models:/MODEL_NAME/ENV: The URI of the MLflow model to train--training-type [supervised|unsupervised|meta_supervised]: The type of training [required]--data-file-path TEXT: The path to the training asset file [required]--epochs INTEGER: The number of training epochs [default: 1]--log-frequency INTEGER: The number of processed documents or epochs after which training metrics will be logged [default: 1]--hyperparameters TEXT: The overriding hyperparameters serialised as JSON string [default: {}]--description TEXT: The description of the training or change logs--model-name TEXT: The string representation of the model name--device [default|cpu|cuda|mps]: The device to train the model on [default: default]--load-in-4bit / --no-load-in-4bit: Load the model in 4-bit precision, used by 'huggingface_llm' models [default: no-load-in-4bit]--load-in-8bit / --no-load-in-8bit: Load the model in 8-bit precision, used by 'huggingface_llm' models [default: no-load-in-8bit]--debug / --no-debug: Run in the debug mode--help: Show this message and exit.
This pushes a pretrained NLP model to the CogStack ModelServe registry
Usage:
$ cms register [OPTIONS]Options:
--model-type [medcat_snomed|medcat_umls|medcat_icd10|medcat_opcs4|medcat_deid|anoncat|transformers_deid|huggingface_ner|huggingface_llm]: The type of the model to register [required]--model-path TEXT: The file path to the model package [required]--model-name TEXT: The string representation of the registered model [required]--training-type [supervised|unsupervised|meta_supervised]: The type of training the model went through--model-config TEXT: The string representation of a JSON object--model-metrics TEXT: The string representation of a JSON array--model-tags TEXT: The string representation of a JSON object--debug / --no-debug: Run in the debug mode--help: Show this message and exit.
This generates a model-specific API document for enabled endpoints
Usage:
$ cms export-model-apis [OPTIONS]Options:
--model-type [medcat_snomed|medcat_umls|medcat_icd10|medcat_opcs4|medcat_deid|anoncat|transformers_deid|huggingface_ner|huggingface_llm]: The type of the model to serve [required]--add-training-apis / --no-add-training-apis: Add training APIs to the doc [default: no-add-training-apis]--add-evaluation-apis / --no-add-evaluation-apis: Add evaluation APIs to the doc [default: no-add-evaluation-apis]--add-previews-apis / --no-add-previews-apis: Add preview APIs to the doc [default: no-add-previews-apis]--add-user-authentication / --no-add-user-authentication: Add user authentication APIs to the doc [default: no-add-user-authentication]--exclude-unsupervised-training / --no-exclude-unsupervised-training: Exclude the unsupervised training API [default: no-exclude-unsupervised-training]--exclude-metacat-training / --no-exclude-metacat-training: Exclude the metacat training API [default: no-exclude-metacat-training]--model-name TEXT: The string representation of the model name--help: Show this message and exit.
This builds an OCI-compliant image to containerise CMS
Usage:
$ cms build [OPTIONS]Options:
--dockerfile-path TEXT: The path to the Dockerfile [required]--context-dir TEXT: The directory containing the set of files accessible to the build [required]--model-name TEXT: The string representation of the model name [default: CMS model]--user-id INTEGER: The ID for the non-root user [default: 1000]--group-id INTEGER: The group ID for the non-root user [default: 1000]--http-proxy TEXT: The string representation of the HTTP proxy--https-proxy TEXT: The string representation of the HTTPS proxy--no-proxy TEXT: The string representation of addresses by-passing proxies [default: localhost,127.0.0.1]--version-tag TEXT: The version tag of the built image [default: latest]--backend [docker build|docker buildx build]: The backend used for building the image [default: docker build]--help: Show this message and exit.
This generates an API document for all endpoints defined in CMS
Usage:
$ cms export-openapi-spec [OPTIONS]Options:
--api-title TEXT: The string representation of the API title [default: CogStack Model Serve APIs]--help: Show this message and exit.
This groups various stream operations
Usage:
$ cms stream [OPTIONS] COMMAND [ARGS]...Options:
--help: Show this message and exit.
Commands:
json-lines: This gets NER entities as a JSON Lines streamchat: This gets NER entities by chatting with...
This gets NER entities as a JSON Lines stream
Usage:
$ cms stream json-lines [OPTIONS]Options:
--jsonl-file-path TEXT: The path to the JSON Lines file [required]--base-url TEXT: The CMS base url [default: http://127.0.0.1:8000]--timeout-in-secs INTEGER: The max time to wait before disconnection [default: 0]--debug / --no-debug: Run in the debug mode--help: Show this message and exit.
This gets NER entities by chatting with the model
Usage:
$ cms stream chat [OPTIONS]Options:
--base-url TEXT: The CMS base url [default: ws://127.0.0.1:8000]--debug / --no-debug: Run in the debug mode--help: Show this message and exit.
This groups various package operations
Usage:
$ cms package [OPTIONS] COMMAND [ARGS]...Options:
--help: Show this message and exit.
Commands:
hf-model: This packages a remotely hosted or locally...hf-dataset: This packages a remotely hosted or locally...
This packages a remotely hosted or locally cached Hugging Face model into a model package
Usage:
$ cms package hf-model [OPTIONS]Options:
--hf-repo-id TEXT: The repository ID of the model to download from Hugging Face Hub, e.g., 'google-bert/bert-base-cased'--hf-repo-revision TEXT: The revision of the model to download from Hugging Face Hub--cached-model-dir TEXT: The path to the cached model directory, will only be used if --hf-repo-id is not provided--output-model-package TEXT: The path where the model package will be saved, minus any format-specific extension, e.g., './model_packages/bert-base-cased'--archive-format [zip|gztar]: The archive format of the model package, e.g., 'zip' or 'gztar' [default: zip]--remove-cached / --no-remove-cached: Whether to remove the downloaded cache after the model package is saved [default: no-remove-cached]--help: Show this message and exit.
This packages a remotely hosted or locally cached Hugging Face dataset into a dataset package
Usage:
$ cms package hf-dataset [OPTIONS]Options:
--hf-dataset-id TEXT: The repository ID of the dataset to download from Hugging Face Hub, e.g., 'stanfordnlp/imdb'--hf-dataset-revision TEXT: The revision of the dataset to download from Hugging Face Hub--cached-dataset-dir TEXT: The path to the cached dataset directory, will only be used if --hf-dataset-id is not provided--output-dataset-package TEXT: The path where the dataset package will be saved, minus any format-specific extension, e.g., './dataset_packages/imdb'--archive-format [zip|gztar]: The archive format of the dataset package, e.g., 'zip' or 'gztar' [default: zip]--remove-cached / --no-remove-cached: Whether to remove the downloaded cache after the dataset package is saved [default: no-remove-cached]--trust-remote-code / --no-trust-remote-code: Whether to trust and use the remote script of the dataset [default: no-trust-remote-code]--help: Show this message and exit.
Run the MCP server for accessing CMS capabilities
Usage:
$ cms mcp [OPTIONS] COMMAND [ARGS]...Options:
--help: Show this message and exit.
Commands:
run: Run the MCP server for accessing CMS...
Run the MCP server for accessing CMS capabilities
Usage:
$ cms mcp run [OPTIONS]Options:
--host TEXT: The hostname of the MCP server [default: 127.0.0.1]--port INTEGER: The port of the MCP server [default: 8080]--transport TEXT: The transport type (either 'stdio', 'sse' or 'http') [default: http]--cms-base-url TEXT: The base URL of the CMS API [default: http://localhost:8000]--cms-api-key TEXT: The API key for authenticating with the CMS API--mcp-api-keys TEXT: Comma-separated API keys for authenticating MCP clients--cms-mcp-oauth-enabled / --no-cms-mcp-oauth-enabled: Whether to enable OAuth2 authentication for MCP clients--github-client-id TEXT: The GitHub OAuth2 client ID--github-client-secret TEXT: The GitHub OAuth2 client secret--google-client-id TEXT: The Google OAuth2 client ID--google-client-secret TEXT: The Google OAuth2 client secret--debug / --no-debug: Run in debug mode--help: Show this message and exit.