(rollout_id: str, attempt_id: str, reward: float, sequence_id: int)
| 111 | |
| 112 | |
| 113 | def make_reward_span(rollout_id: str, attempt_id: str, reward: float, sequence_id: int) -> Span: |
| 114 | hex_id = f"{sequence_id:032x}" |
| 115 | span_hex = f"{sequence_id:016x}" |
| 116 | return Span( |
| 117 | rollout_id=rollout_id, |
| 118 | attempt_id=attempt_id, |
| 119 | sequence_id=sequence_id, |
| 120 | trace_id=hex_id, |
| 121 | span_id=span_hex, |
| 122 | parent_id=None, |
| 123 | name=AGL_ANNOTATION, |
| 124 | status=TraceStatus(status_code="OK"), |
| 125 | attributes={"reward": reward}, |
| 126 | events=[], |
| 127 | links=[], |
| 128 | start_time=None, |
| 129 | end_time=None, |
| 130 | context=SpanContext(trace_id=hex_id, span_id=span_hex, is_remote=False, trace_state={}), |
| 131 | parent=None, |
| 132 | resource=SpanResource(attributes={}, schema_url=""), |
| 133 | ) |
| 134 | |
| 135 | |
| 136 | def test_batch_iter_over_dataset_returns_full_dataset(monkeypatch: pytest.MonkeyPatch) -> None: |
no test coverage detected