faculty-models
faculty-models is a tool to help you use models from the model registry in Faculty Platform.
Installation
faculty-models comes preinstalled in Python environments available in Faculty platform. To use it externally, install it from PyPI with pip:
pip install faculty-models
If you’ve not already done so on the computer you’re using, you’ll also need to generate and store CLI credentials for the Platform. You can do this with the Faculty CLI.
Usage
The model registry in Faculty Platform includes a feature that helps you generate the snippets you need. It will help you get the project and model IDs you need to use faculty-models.
If your model is in the MLmodel format (likely because you used MLflow to store it), you can load it directly back into Python with:
import faculty_models
model = faculty_models.load_mlmodel(
project_id="998328c3-23df-4225-a3ee-0a53d1409fbd",
model_id="c998fca9-e093-47ea-9896-8f75db695b91"
)
Otherwise, you can use the following to download the contents of the model to the local filesystem. download returns the path of the downloaded model files:
import faculty_models
path = faculty_models.download(
project_id="998328c3-23df-4225-a3ee-0a53d1409fbd",
model_id="c998fca9-e093-47ea-9896-8f75db695b91"
)
The above examples always download the latest version of a model. To get a specific verion, pass the version number when calling either function:
import faculty_models
model = faculty_models.load_mlmodel(
project_id="998328c3-23df-4225-a3ee-0a53d1409fbd",
model_id="c998fca9-e093-47ea-9896-8f75db695b91",
version=4
)
If you only wish to download part of the model, or if you wish to load an MLmodel that is in a subdirectory of the model, pass the path argument to either function:
import faculty_models
model = faculty_models.load_mlmodel(
project_id="998328c3-23df-4225-a3ee-0a53d1409fbd",
model_id="c998fca9-e093-47ea-9896-8f75db695b91",
path="sub/path"
)
Metadata
Release files for faculty-models 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| faculty-models-0.2.0.tar.gz | 8.6 kB | Without provenance | Details for faculty-models-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| faculty_models-0.2.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for faculty_models-0.2.0-py2.py3-none-any.whl |
Total release size: 16.2 kB
Release files / faculty-models-0.2.0.tar.gz
| Download URL | faculty-models-0.2.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0393fb4d8c714bf504d8852d68c03d43f4a51292be543d65dbca50e3ea29133a
|
|
BLAKE2b-256 checksum How to use checksums |
e51100b18024d4011bf95174bda332f9dae207c518e2313b2fe7739c308c4d46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / faculty_models-0.2.0-py2.py3-none-any.whl
| Download URL | faculty_models-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e7bbe8d605372b90bfc7fb811769ed1cdace953b5fd9eee1b14d0989112de854
|
|
BLAKE2b-256 checksum How to use checksums |
02372b0bb38fd8cd68cd826436b15a59fc8012dc571d84c148046e66010a87b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Security for faculty-models 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.