Skip to content

Commit 62b452b

Browse files
committed
ruff format
1 parent 7bfe319 commit 62b452b

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

examples/example.py

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@
4040

4141
# Unique record ID
4242
config_builder.add_column(
43-
name="record_id",
44-
column_type="sampler",
45-
sampler_type="uuid",
46-
params={"short_form": True, "uppercase": True}
43+
name="record_id", column_type="sampler", sampler_type="uuid", params={"short_form": True, "uppercase": True}
4744
)
4845

4946
# ESI level (balanced sampling)
@@ -121,9 +118,7 @@
121118
SamplerColumnConfig(
122119
name="writing_style",
123120
sampler_type="category",
124-
params=CategorySamplerParams(
125-
values=["Draft", "Adequate", "Polished"]
126-
),
121+
params=CategorySamplerParams(values=["Draft", "Adequate", "Polished"]),
127122
)
128123
)
129124

@@ -159,8 +154,8 @@
159154
"4": "Note is well-aligned, with only minor details that might be slightly inconsistent.",
160155
"3": "Note is generally consistent, but some key clinical indicators are missing or don't fully match the ESI level.",
161156
"2": "Note shows significant inconsistency between the clinical details and the assigned ESI level.",
162-
"1": "Note is clinically incoherent and does not reflect the assigned ESI level or scenario at all."
163-
}
157+
"1": "Note is clinically incoherent and does not reflect the assigned ESI level or scenario at all.",
158+
},
164159
)
165160

166161
# Rubric: ESI level complexity (reduced to 3 levels: Simple, Moderate, Complex)
@@ -170,8 +165,8 @@
170165
options={
171166
"Complex": "Note contains subtle or conflicting information, requiring clinical reasoning to distinguish between ESI levels.",
172167
"Moderate": "Note requires some clinical inference; indicators are present but not always immediately obvious.",
173-
"Simple": "Note uses clear, direct, or textbook indicators that make the ESI level obvious."
174-
}
168+
"Simple": "Note uses clear, direct, or textbook indicators that make the ESI level obvious.",
169+
},
175170
)
176171

177172
jsonl_entry_template = {
@@ -183,22 +178,17 @@
183178
f" The possible levels are: {', '.join([repr(level) for level in ESI_LEVELS])}."
184179
" Carefully analyze the clinical details in the triage note, focusing on patient acuity, resource needs, and risk of rapid deterioration."
185180
" Respond with only the selected ESI level description, exactly matching one of the listed possibilities. Do not provide extra text or explanation."
186-
)
181+
),
187182
},
188183
{
189184
"role": "user",
190185
"content": (
191186
"Triage Note: {{ content }}\n"
192187
"Classify the ESI level for this note based on the provided definitions."
193-
" Respond in JSON format only: { \"esi_level_description\": \"...\" }"
194-
)
195-
},
196-
{
197-
"role": "assistant",
198-
"content": (
199-
'{ "esi_level_description": "{{ esi_level_description }}" }'
200-
)
188+
' Respond in JSON format only: { "esi_level_description": "..." }'
189+
),
201190
},
191+
{"role": "assistant", "content": ('{ "esi_level_description": "{{ esi_level_description }}" }')},
202192
],
203193
}
204194

@@ -213,5 +203,7 @@
213203
)
214204
)
215205

216-
dd = DataDesigner(artifact_path="./artifacts", blob_storage_path="/Users/amanoel/Data/nemotron-personas-datasets_v0.0.6")
217-
preview = dd.preview(config_builder, num_records=10)
206+
dd = DataDesigner(
207+
artifact_path="./artifacts", blob_storage_path="/Users/amanoel/Data/nemotron-personas-datasets_v0.0.6"
208+
)
209+
preview = dd.preview(config_builder, num_records=10)

0 commit comments

Comments
 (0)