Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the parse_run_traces to include last 4 letters of run_id #1880

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vidit-Ostwal
Copy link
Contributor

#1871
Changed the parse_run_traces function, to include the last 4 letter of the run_id of the trace, result of which is a unique key for every call.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 25, 2025
@Vidit-Ostwal
Copy link
Contributor Author

Hi @jjmachan, can you help me with this one, all the unit test have failed because of the PR #1879

@Vidit-Ostwal
Copy link
Contributor Author

The code changed was small
From this

def validate_samples(self, samples: t.List[Sample]) -> t.List[Sample]:
    """Validates that all samples are of the same type."""
    if len(samples) == 0:
        return samples

    first_sample_type = type(self.samples[0])
    if not all(isinstance(sample, first_sample_type) for sample in self.samples):
        raise ValueError("All samples must be of the same type")

    return samples

to this


def validate_samples(self, samples: t.List[Sample]) -> t.List[Sample]:
    """Validates that all samples are of the same type."""
    if len(samples) == 0:
        return samples

    first_sample_type = type(samples[0])
    for i, sample in enumerate(samples):
        if not isinstance(sample, first_sample_type):
            raise ValueError(f"Sample at index {i} is of type {type(sample)}, expected {first_sample_type}")

    return samples

which does not change much of the functionality of comparing classes while iterating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants