Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang committed Jan 4, 2024
1 parent dc39934 commit 0ffecc7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/python-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
defaults:
run:
working-directory: ./python

jobs:
ci:
name: CI Python
Expand All @@ -40,5 +40,3 @@ jobs:
- name: Run tests
run: |
tox run -e test-openai

Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def default_tracer_provider() -> trace_sdk.TracerProvider:
N = 3 # iteration i = 0 results in intentional BadRequestError
HAIKU = "Write a haiku."
HAIKU_TOKENS = [8144, 264, 6520, 39342, 13]
RESUME = "Write a resume."
RESUME_TOKENS = [8144, 264, 6520, 39342, 13]
RESUME = "Write a résumé."
RESUME_TOKENS = [8144, 264, 9517, 1264, 978, 13]
CHAT_KWARGS = {
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": HAIKU}],
Expand Down Expand Up @@ -206,4 +206,3 @@ def tasks(n, task, **kwargs):
mark = "✅" if _EXPECTED_SPAN_COUNT == actual else "❌"
print(f"\n{mark} expected {_EXPECTED_SPAN_COUNT}; actual {actual};")
assert _EXPECTED_SPAN_COUNT == actual
sleep(1) # (if applicable) let the old exporter finish sending traces
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from contextlib import suppress
from importlib.metadata import version
from itertools import chain
from time import sleep

from opentelemetry import trace as trace_api
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
Expand Down Expand Up @@ -52,8 +51,8 @@ def default_tracer_provider() -> trace_sdk.TracerProvider:
N = 3 # iteration i = 0 results in intentional BadRequestError
HAIKU = "Write a haiku."
HAIKU_TOKENS = [8144, 264, 6520, 39342, 13]
RESUME = "Write a resume."
RESUME_TOKENS = [8144, 264, 6520, 39342, 13]
RESUME = "Write a résumé."
RESUME_TOKENS = [8144, 264, 9517, 1264, 978, 13]
CHAT_KWARGS = {
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": HAIKU}],
Expand Down Expand Up @@ -204,4 +203,3 @@ async def main(*tasks):
mark = "✅" if _EXPECTED_SPAN_COUNT == actual else "❌"
print(f"\n{mark} expected {_EXPECTED_SPAN_COUNT}; actual {actual};")
assert _EXPECTED_SPAN_COUNT == actual
sleep(1) # (if applicable) let the old exporter finish sending traces
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import logging
from contextlib import suppress
from itertools import chain
from time import sleep

from opentelemetry import trace as trace_api
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
Expand Down Expand Up @@ -139,4 +138,3 @@ async def main(*tasks):
mark = "✅" if _EXPECTED_SPAN_COUNT == actual else "❌"
print(f"\n{mark} expected {_EXPECTED_SPAN_COUNT}; actual {actual};")
assert _EXPECTED_SPAN_COUNT == actual
sleep(1) # (if applicable) let the old exporter finish sending traces
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from contextlib import suppress
from importlib.metadata import version
from itertools import chain
from time import sleep

from opentelemetry import trace as trace_api
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
Expand Down Expand Up @@ -192,4 +191,3 @@ async def main(*tasks):
mark = "✅" if _EXPECTED_SPAN_COUNT == actual else "❌"
print(f"\n{mark} expected {_EXPECTED_SPAN_COUNT}; actual {actual};")
assert _EXPECTED_SPAN_COUNT == actual
sleep(1) # (if applicable) let the old exporter finish sending traces

0 comments on commit 0ffecc7

Please sign in to comment.