Skip to content

a11 for checkers#46599

Merged
tarekziade merged 1 commit into
mainfrom
tarekziade-a11-checkers
Jun 12, 2026
Merged

a11 for checkers#46599
tarekziade merged 1 commit into
mainfrom
tarekziade-a11-checkers

Conversation

@tarekziade

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds OTEL traces for checkers

@tarekziade tarekziade requested a review from ydshieh June 12, 2026 12:04
@github-actions

Copy link
Copy Markdown
Contributor

CI Dashboard: View test results in Grafana

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Comment thread utils/checkers.py
Comment on lines +76 to +95
class _NullTrace:
"""No-op with the same shape as transformersci.otel.instrument's Run/Step."""

def run(self, *args, **kwargs):
return self

def step(self, *args, **kwargs):
return self

def __enter__(self):
return self

def __exit__(self, *exc):
return False

def set_exit_code(self, returncode):
pass


_tracer = _otel if _otel is not None else _NullTrace()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the usual pytest one, do we need or already use similar _NullTrace?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for pytest it's internal to the pytest-opentelemetry plugin so it's not surfaced in our tests at all

@tarekziade tarekziade added this pull request to the merge queue Jun 12, 2026
Merged via the queue into main with commit cd67dbf Jun 12, 2026
42 checks passed
@tarekziade tarekziade deleted the tarekziade-a11-checkers branch June 12, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants