sutro 0.1.31__py3-none-any.whl → 0.1.33__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sutro/cli.py +2 -1
- sutro/sdk.py +2 -2
- sutro-0.1.33.dist-info/METADATA +176 -0
- sutro-0.1.33.dist-info/RECORD +8 -0
- sutro-0.1.31.dist-info/METADATA +0 -26
- sutro-0.1.31.dist-info/RECORD +0 -8
- {sutro-0.1.31.dist-info → sutro-0.1.33.dist-info}/WHEEL +0 -0
- {sutro-0.1.31.dist-info → sutro-0.1.33.dist-info}/entry_points.txt +0 -0
- {sutro-0.1.31.dist-info → sutro-0.1.33.dist-info}/licenses/LICENSE +0 -0
sutro/cli.py
CHANGED
|
@@ -246,7 +246,8 @@ def results(
|
|
|
246
246
|
job_results = sdk.get_job_results(
|
|
247
247
|
job_id, include_inputs, include_cumulative_logprobs
|
|
248
248
|
)
|
|
249
|
-
if
|
|
249
|
+
if job_results is None or len(job_results) == 0:
|
|
250
|
+
print(Fore.YELLOW + "No results found for job " + job_id + "." + Style.RESET_ALL)
|
|
250
251
|
return
|
|
251
252
|
|
|
252
253
|
df = pl.DataFrame(job_results)
|
sutro/sdk.py
CHANGED
|
@@ -846,7 +846,7 @@ class Sutro:
|
|
|
846
846
|
spinner.write(
|
|
847
847
|
to_colored_text("✔ Job status retrieved!", state="success")
|
|
848
848
|
)
|
|
849
|
-
return response_data
|
|
849
|
+
return response_data
|
|
850
850
|
except requests.HTTPError as e:
|
|
851
851
|
spinner.write(
|
|
852
852
|
to_colored_text(
|
|
@@ -983,7 +983,7 @@ class Sutro:
|
|
|
983
983
|
results_df = results_df.drop(
|
|
984
984
|
[output_column, "output_column_json_decoded"]
|
|
985
985
|
)
|
|
986
|
-
except
|
|
986
|
+
except Exception as e:
|
|
987
987
|
# if the first row cannot be json decoded, do nothing
|
|
988
988
|
pass
|
|
989
989
|
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sutro
|
|
3
|
+
Version: 0.1.33
|
|
4
|
+
Summary: Sutro Python SDK
|
|
5
|
+
Project-URL: Homepage, https://sutro.sh
|
|
6
|
+
Project-URL: Documentation, https://docs.sutro.sh
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Requires-Dist: click==8.1.7
|
|
11
|
+
Requires-Dist: colorama==0.4.4
|
|
12
|
+
Requires-Dist: numpy==2.1.1
|
|
13
|
+
Requires-Dist: pandas==2.2.3
|
|
14
|
+
Requires-Dist: polars==1.8.2
|
|
15
|
+
Requires-Dist: pyarrow==21.0.0
|
|
16
|
+
Requires-Dist: pydantic==2.11.4
|
|
17
|
+
Requires-Dist: requests==2.32.3
|
|
18
|
+
Requires-Dist: tqdm==4.67.1
|
|
19
|
+
Requires-Dist: yaspin==3.1.0
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: ruff==0.13.1; extra == 'dev'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+

|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
Sutro makes it easy to analyze and generate unstructured data using LLMs, from quick experiments to billion token jobs.
|
|
29
|
+
|
|
30
|
+
Whether you're generating synthetic data, running model evals, structuring unstructured data, classifying data, or generating embeddings - *batch inference is faster, cheaper, and easier* with Sutro.
|
|
31
|
+
|
|
32
|
+
Visit [sutro.sh](https://sutro.sh) to learn more and request access to the cloud beta.
|
|
33
|
+
|
|
34
|
+
## 🚀 Quickstart
|
|
35
|
+
|
|
36
|
+
Install:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
[uv] pip install sutro
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Authenticate:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
sutro login
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Run your first job:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import sutro as so
|
|
52
|
+
import polars as pl
|
|
53
|
+
from pydantic import BaseModel
|
|
54
|
+
|
|
55
|
+
# Load your data
|
|
56
|
+
df = pl.DataFrame({
|
|
57
|
+
"review": [
|
|
58
|
+
"The battery life is terrible.",
|
|
59
|
+
"Great camera and build quality!",
|
|
60
|
+
"Too expensive for what it offers."
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
# Add a system prompt (optional)
|
|
65
|
+
system_prompt = "Classify the sentiment of the review as positive, neutral, or negative."
|
|
66
|
+
|
|
67
|
+
# Define an output schema (optional)
|
|
68
|
+
class Sentiment(BaseModel):
|
|
69
|
+
sentiment: str
|
|
70
|
+
|
|
71
|
+
# Run a prototyping (p0) job
|
|
72
|
+
df = so.infer(
|
|
73
|
+
df,
|
|
74
|
+
column="review",
|
|
75
|
+
model="qwen-3-32b",
|
|
76
|
+
output_schema=Sentiment
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
print(df)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Will produce a result like:
|
|
83
|
+
|
|
84
|
+

|
|
85
|
+
|
|
86
|
+
### Scaling up:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
# load a larger dataset
|
|
90
|
+
df = pl.read_parquet('hf://datasets/sutro/synthetic-product-reviews-20k/results.parquet')
|
|
91
|
+
|
|
92
|
+
# Run a production (p1) job
|
|
93
|
+
job_id = so.infer(
|
|
94
|
+
df,
|
|
95
|
+
column="review_text",
|
|
96
|
+
model="qwen-3-32b",
|
|
97
|
+
output_schema=Sentiment,
|
|
98
|
+
job_priority=1 # <-- one line of code for near-limitless scale
|
|
99
|
+
)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
You can track live progress of your job, view results, and share with your team from the Sutro web app:
|
|
103
|
+
|
|
104
|
+

|
|
105
|
+
|
|
106
|
+
## What is Sutro?
|
|
107
|
+
|
|
108
|
+
Sutro is a **serverless, high-throughput batch inference service for LLM workloads**. With just a few lines of Python, you can quickly run batch inference jobs using open-source foundation models—at scale, with strong cost/time guarantees, and without worrying about infrastructure.
|
|
109
|
+
|
|
110
|
+
Think of Sutro as **online analytical processing (OLAP) for AI**: you submit queries over unstructured data (documents, emails, product reviews, etc.), and Sutro handles the heavy lifting of job execution - from intelligent batching to cloud orchestration to inference framework and hardware optimizations. You just bring your data, and Sutro handles the rest.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## 📚 Documentation & Examples
|
|
114
|
+
|
|
115
|
+
- [Documentation](https://docs.sutro.sh/)
|
|
116
|
+
- Example Guides:
|
|
117
|
+
- [Synthetic Data Zero to Hero](https://docs.sutro.sh/examples/synthetic-data-zero-to-hero)
|
|
118
|
+
- [Synthetic Data for Privacy Preservation](https://docs.sutro.sh/examples/synthetic-data-privacy)
|
|
119
|
+
- [Large Scale Embedding Generation with Qwen3 0.6B](https://docs.sutro.sh/examples/large-scale-embeddings)
|
|
120
|
+
- More coming soon...
|
|
121
|
+
|
|
122
|
+
## ✨ Features
|
|
123
|
+
|
|
124
|
+
- **⚡ Run experiments faster**
|
|
125
|
+
Small scale jobs complete in minutes, large scale jobs run within 1 hour - more than 20x faster than competing cloud services.
|
|
126
|
+
|
|
127
|
+
- **📈 Seamless scaling**
|
|
128
|
+
Use the same interface to run jobs with a few tokens, or billions at a time.
|
|
129
|
+
|
|
130
|
+
- **💰 Decreased Costs and Transparent Pricing**
|
|
131
|
+
Up to 10x cheaper than alternative inference services. Use dry run mode to estimate costs before running large jobs.
|
|
132
|
+
|
|
133
|
+
- **🐍 Pythonic DataFrame and file integrations**
|
|
134
|
+
Submit and receive results directly as Pandas/Polars DataFrames, or upload CSV/Parquet files.
|
|
135
|
+
|
|
136
|
+
- **🏗️ Zero infrastructure setup**
|
|
137
|
+
No need to manage GPUs, tune inference frameworks, or orchestrate parallelization. Just data in, results out.
|
|
138
|
+
|
|
139
|
+
- **📊 Real-time observability dashboard**
|
|
140
|
+
Use the Sutro web app to monitor your jobs in real-time and see results as they are generated, tag jobs for easier tracking, and share results with your team.
|
|
141
|
+
|
|
142
|
+
- **🔒 Built with security in mind**
|
|
143
|
+
Custom data retention options, and bring-your-own s3-compatible storage options available.
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## 🧑💻 Typical Use Cases
|
|
147
|
+
|
|
148
|
+
- **Synthetic data generation**: Create millions of product reviews, conversations, or paraphrases for pre-training or distillation.
|
|
149
|
+
- **Model evals**: Easily run LLM benchmarks on a scheduled basis to detect model regressions or performance degradation.
|
|
150
|
+
- **Unstructured data analytics**: Run analytical workloads over unstructured data (e.g. customer reviews, product descriptions, emails, etc.).
|
|
151
|
+
- **Semantic tagging**: Add boolean/numeric/closed-set tags to messy data (e.g. LinkedIn bios, company descriptions).
|
|
152
|
+
- **Structured Extraction**: Pull structured fields out of unstructured documents at scale.
|
|
153
|
+
- **Classification**: Apply consistent labels across large datasets (spam, sentiment, topic, compliance risk).
|
|
154
|
+
- **Embedding generation**: Generate and store embeddings for downstream search/analytics.
|
|
155
|
+
|
|
156
|
+
## 🔌 Integrations
|
|
157
|
+
|
|
158
|
+
- **DataFrames**: Pandas, Polars
|
|
159
|
+
- **Files**: CSV, Parquet
|
|
160
|
+
- **Storage**: S3-Compatible Object Stores (e.g. R2, S3, GCS, etc.)
|
|
161
|
+
|
|
162
|
+
## 📦 Hosting Options
|
|
163
|
+
|
|
164
|
+
- **Cloud**: Run Sutro on our secure, multi-tenant cloud.
|
|
165
|
+
- **Isolated Deployments**: Bring your own storage, models, or cloud resources.
|
|
166
|
+
- **Local and Self-Hosted**: Coming soon!
|
|
167
|
+
|
|
168
|
+
See our [pricing page](https://sutro.sh/pricing) for more details.
|
|
169
|
+
|
|
170
|
+
## 🤝 Contributing
|
|
171
|
+
|
|
172
|
+
We welcome contributions! Please reach out to us at [team@sutro.sh](mailto:team@sutro.sh) to get involved.
|
|
173
|
+
|
|
174
|
+
## 📄 License
|
|
175
|
+
|
|
176
|
+
Apache 2.0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
sutro/__init__.py,sha256=yUiVwcZ8QamSqDdRHgzoANyTZ-x3cPzlt2Fs5OllR_w,402
|
|
2
|
+
sutro/cli.py,sha256=_FU8PwP4dMzXXg5ldxCXP3kaZvQtOKdA8Kzjc34xmQ0,13727
|
|
3
|
+
sutro/sdk.py,sha256=DOvAQuL_5RiXwTfQC3FnNiE3x9DZBugEhDJ8r494NKo,56980
|
|
4
|
+
sutro-0.1.33.dist-info/METADATA,sha256=rvf-ZGByzYtE8ArzXDvx49TCUCtJxXAEVpJpBjtJfYk,6206
|
|
5
|
+
sutro-0.1.33.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
+
sutro-0.1.33.dist-info/entry_points.txt,sha256=eXvr4dvMV4UmZgR0zmrY8KOmNpo64cJkhNDywiadRFM,40
|
|
7
|
+
sutro-0.1.33.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
8
|
+
sutro-0.1.33.dist-info/RECORD,,
|
sutro-0.1.31.dist-info/METADATA
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: sutro
|
|
3
|
-
Version: 0.1.31
|
|
4
|
-
Summary: Sutro Python SDK
|
|
5
|
-
Project-URL: Homepage, https://sutro.sh
|
|
6
|
-
Project-URL: Documentation, https://docs.sutro.sh
|
|
7
|
-
License-Expression: Apache-2.0
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
Requires-Python: >=3.10
|
|
10
|
-
Requires-Dist: click==8.1.7
|
|
11
|
-
Requires-Dist: colorama==0.4.4
|
|
12
|
-
Requires-Dist: numpy==2.1.1
|
|
13
|
-
Requires-Dist: pandas==2.2.3
|
|
14
|
-
Requires-Dist: polars==1.8.2
|
|
15
|
-
Requires-Dist: pyarrow==21.0.0
|
|
16
|
-
Requires-Dist: pydantic==2.11.4
|
|
17
|
-
Requires-Dist: requests==2.32.3
|
|
18
|
-
Requires-Dist: tqdm==4.67.1
|
|
19
|
-
Requires-Dist: yaspin==3.1.0
|
|
20
|
-
Provides-Extra: dev
|
|
21
|
-
Requires-Dist: ruff==0.13.1; extra == 'dev'
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
23
|
-
|
|
24
|
-
# sutro-client
|
|
25
|
-
|
|
26
|
-
The official Python client for Sutro. See [docs.sutro.sh](https://docs.sutro.sh/) for more information.
|
sutro-0.1.31.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
sutro/__init__.py,sha256=yUiVwcZ8QamSqDdRHgzoANyTZ-x3cPzlt2Fs5OllR_w,402
|
|
2
|
-
sutro/cli.py,sha256=YzwIdpHUcG6GEc1IofRFD5rdxAZpgXy3OWH0MqehryA,13608
|
|
3
|
-
sutro/sdk.py,sha256=UoDGXsknj8S6aLn6d4GrtCFqhzqdlbqvcmOFG-hkr44,57008
|
|
4
|
-
sutro-0.1.31.dist-info/METADATA,sha256=9_2xTAwhE0_6USQFVyqy6CQIAs_W6Xc20QFtyHp2-gM,764
|
|
5
|
-
sutro-0.1.31.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
-
sutro-0.1.31.dist-info/entry_points.txt,sha256=eXvr4dvMV4UmZgR0zmrY8KOmNpo64cJkhNDywiadRFM,40
|
|
7
|
-
sutro-0.1.31.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
8
|
-
sutro-0.1.31.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|