Developer tools for compute.studio.
Project description
Compute Studio Kit
cs-kit
tests your model's functions against the Compute Studio criteria. If your functions pass the cs-kit
tests, then you can be reasonably sure that the functions will work on compute.studio.
Compute Studio Kit also provides a helper command for retrieving your Compute Studio API token.
Install cs-kit
pip install cs-kit
Set up the cs-config
directory
$ csk-init
$ tree cs-config/
cs-config/
├── cs_config
│ ├── functions.py
│ ├── __init__.py
│ └── tests
│ ├── __init__.py
│ └── test_functions.py
├── install.sh
└── setup.py
Write your functions in cs-config/cs_config/functions.py
# Write or import your Compute Studio functions here.
def get_version():
pass
def get_inputs(meta_param_dict):
pass
def validate_inputs(meta_param_dict, adjustment, errors_warnings):
pass
def run_model(meta_param_dict, adjustment):
pass
Test your functions in cs-config/cs_config/tests/test_functions.py
from cs_kit import CoreTestFunctions
from cs_config import functions
class TestFunctions1(CoreTestFunctions):
get_version = functions.get_version
get_inputs = functions.get_inputs
validate_inputs = functions.validate_inputs
run_model = functions.run_model
ok_adjustment={"matchup": {"pitcher": [{"value": "Max Scherzer"}]}}
bad_adjustment={"matchup": {"pitcher": [{"value": "Not a pitcher"}]}}
Run your cs-config tests
py.test cs-config
Write your installation instructions in cs-config/install.sh
conda install your-project
Get your Compute Studio API token
$ csk-token --username myuser --password mypass
Token: your-token-here
Run the compute-studio-kit tests
py.test cs_kit -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cs-kit-1.16.5.tar.gz
(13.0 kB
view details)
Built Distribution
cs_kit-1.16.5-py3-none-any.whl
(16.0 kB
view details)
File details
Details for the file cs-kit-1.16.5.tar.gz
.
File metadata
- Download URL: cs-kit-1.16.5.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adf9113a0465bd28736667a2bb9786b1bd4efb7ce7667ba570093d53695c2b3c |
|
MD5 | da367f6a08e5ed64e4802554b376bd00 |
|
BLAKE2b-256 | cb2aebbd48afd47cce37c4bf6957ae39178661a4798ff76275ffaa1bdea8ee61 |
File details
Details for the file cs_kit-1.16.5-py3-none-any.whl
.
File metadata
- Download URL: cs_kit-1.16.5-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7403f658d90089dec1ce1096d384578933053d92507c08c07beee4affc4587f |
|
MD5 | 25e071efdc9e478d1e8b9dbf661ad100 |
|
BLAKE2b-256 | 0b00ed8a8edb01f3206fc3a9568690425d576feb5f67b57da0b36931fbc94d20 |