jedick commited on
Commit
f395a83
·
1 Parent(s): 8d79272

Rename Logfire spans

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -39,7 +39,7 @@ def fetch_current_revision(title: str, context=None):
39
  return _fetch_current_revision(title)
40
 
41
 
42
- @logfire.instrument("Step 1: Fetch current revision")
43
  def _fetch_current_revision(title: str):
44
  """
45
  Fetch current revision of a Wikipedia article and return its introduction.
@@ -93,7 +93,7 @@ def fetch_previous_revision(
93
  return _fetch_previous_revision(title, number, units, new_revision)
94
 
95
 
96
- @logfire.instrument("Step 2: Fetch previous revision")
97
  def _fetch_previous_revision(title: str, number: int, units: str, new_revision: str):
98
  """
99
  Fetch previous revision of a Wikipedia article and return its introduction.
@@ -199,7 +199,7 @@ def run_heuristic_classifier(old_revision: str, new_revision: str, context=None)
199
  return _run_heuristic_classifier(old_revision, new_revision)
200
 
201
 
202
- @logfire.instrument("Step 3a: Run heuristic classifier")
203
  def _run_heuristic_classifier(old_revision: str, new_revision: str):
204
  return run_classifier(old_revision, new_revision, prompt_style="heuristic")
205
 
@@ -209,7 +209,7 @@ def run_fewshot_classifier(old_revision: str, new_revision: str, context=None):
209
  return _run_fewshot_classifier(old_revision, new_revision)
210
 
211
 
212
- @logfire.instrument("Step 3b: Run few-shot classifier")
213
  def _run_fewshot_classifier(old_revision: str, new_revision: str):
214
  return run_classifier(old_revision, new_revision, prompt_style="few-shot")
215
 
@@ -261,7 +261,7 @@ def run_judge(
261
  )
262
 
263
 
264
- @logfire.instrument("Step 4: Run judge")
265
  def _run_judge(
266
  old_revision: str,
267
  new_revision: str,
 
39
  return _fetch_current_revision(title)
40
 
41
 
42
+ @logfire.instrument("Fetch current revision")
43
  def _fetch_current_revision(title: str):
44
  """
45
  Fetch current revision of a Wikipedia article and return its introduction.
 
93
  return _fetch_previous_revision(title, number, units, new_revision)
94
 
95
 
96
+ @logfire.instrument("Fetch previous revision")
97
  def _fetch_previous_revision(title: str, number: int, units: str, new_revision: str):
98
  """
99
  Fetch previous revision of a Wikipedia article and return its introduction.
 
199
  return _run_heuristic_classifier(old_revision, new_revision)
200
 
201
 
202
+ @logfire.instrument("Run heuristic classifier")
203
  def _run_heuristic_classifier(old_revision: str, new_revision: str):
204
  return run_classifier(old_revision, new_revision, prompt_style="heuristic")
205
 
 
209
  return _run_fewshot_classifier(old_revision, new_revision)
210
 
211
 
212
+ @logfire.instrument("Run few-shot classifier")
213
  def _run_fewshot_classifier(old_revision: str, new_revision: str):
214
  return run_classifier(old_revision, new_revision, prompt_style="few-shot")
215
 
 
261
  )
262
 
263
 
264
+ @logfire.instrument("Run judge")
265
  def _run_judge(
266
  old_revision: str,
267
  new_revision: str,