dat1-cli
A command line interface for the dat1 platform.
Installation
pip install dat1-cli
Usage
Initialize with your API key:
dat1 login
To initialize a new model project, run in the root directory of your project:
dat1 init
This will create a dat1.yaml file in the root directory of your project. This file contains the configuration for your model:
model_name: <your model name>
exclude:
- '**/.git/**'
- '**/.idea/**'
- '*.md'
- '*.jpg'
- .dat1.yaml
Exclude uses glob patterns to exclude files from being uploaded to the platform.
To upload your model to the platform:
dat1 deploy
A good starting point for your model is using the example model.
Otherwise, the platform expects a handler.py file in the root directory of your project that contains a FastAPI app with two endpoints: GET / for healthchecks and POST /infer for inference.
An example handler is shown below:
from fastapi import Request, FastAPI
from vllm import LLM, SamplingParams
import os
llm = LLM(model=os.path.expanduser('./'), load_format="safetensors", enforce_eager=True)
app = FastAPI()
@app.get("/")
async def root():
return "OK"
@app.post("/infer")
async def infer(request: Request):
request = await request.json()
prompts = request["prompt"]
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
outputs = llm.generate(prompts, sampling_params)
return { "response" : outputs[0].outputs[0].text }
Launching Locally
Pre-requisites
- Docker
- CUDA-compatible GPU
- NVIDIA Container Toolkit
To launch your model locally, run:
dat1 serve
License
MIT
Metadata
Release files for dat1-cli 0.1.2
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 |
|---|---|---|---|---|
| dat1_cli-0.1.2.tar.gz | 6.3 kB | With provenance | Details for dat1_cli-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dat1_cli-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for dat1_cli-0.1.2-py3-none-any.whl |
Total release size: 13.0 kB
Release files / dat1_cli-0.1.2.tar.gz
| Download URL | dat1_cli-0.1.2.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63271abf881bd79504a1706d8ea9a46e906ac43457b3c672ba16b2136d4c77e2
|
|
BLAKE2b-256 checksum How to use checksums |
6f5cb8d4b88b9bb0985e4884fb5cfc683f9e5ac0f671b125d18cea973322db8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 8, 2024.
Transparency logRelease files / dat1_cli-0.1.2-py3-none-any.whl
| Download URL | dat1_cli-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85529127f52123ac5ef23b771d7590d57006a24d80cae2ab5263fbf8407f68d8
|
|
BLAKE2b-256 checksum How to use checksums |
dd2ba5957200c3137435743e0e81fccab363f5d597ce7294b4a797234d4645ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 8, 2024.
Transparency logSecurity for dat1-cli 0.1.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dat1_cli-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 8, 2024.
Transparency logA 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.