Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Conversation

@courtneypacheco
Copy link
Contributor

Resolves #75

To ensure the exception message gets printed, we need to either define an __init__ function in the custom TaxonomyReadingException class OR add pass.

I opted for the latter approach and added unit tests to confirm the exception message gets printed/returned.

Copy link

@nimbinatus nimbinatus left a comment

Choose a reason for hiding this comment

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

LGTM; thank you!

@courtneypacheco courtneypacheco force-pushed the fix-taxonomy-exception-class branch from f8c9ba3 to c0c1348 Compare December 18, 2024 18:10
@nathan-weinberg
Copy link
Member

@instructlab/schema-maintainers once this is merged please cut a 0.4.2 so we can unblock the XL E2E CI job

Add `pass` to ensure that the message shows and and we get what we expect. Update unit tests to confirm.

Signed-off-by: Courtney Pacheco <6019922+courtneypacheco@users.noreply.github.com>
@courtneypacheco courtneypacheco force-pushed the fix-taxonomy-exception-class branch from c0c1348 to b49c6ef Compare December 18, 2024 18:28
@bjhargrave bjhargrave merged commit d8f3de5 into instructlab:main Dec 18, 2024
12 checks passed
@bjhargrave
Copy link
Contributor

please cut a 0.4.2

Released: https://pypi.org/project/instructlab-schema/0.4.2/

@reidliu41
Copy link
Contributor

hi @courtneypacheco seems still cannot fix the failed reading from text, e.g.
$ head /xx/instructlab/taxonomy/compositional_skills/engineering/qna.yaml

version: 2
task_description: 'Teach the model who is testlin.'
created_by: testliu
seed_examples:xx      # <<<<<<<<<<<<<<<
  - question: Who is Test Lin?
 
$ ilab taxonomy diff
compositional_skills/engineering/qna.yaml
Reading taxonomy failed with the following error:  # not display

it might still need to pass the message e.g.

   437	        except Exception as e:
   438	            raise TaxonomyReadingException(f"{e}") from e

$ ilab taxonomy diff
compositional_skills/engineering/qna.yaml
Reading taxonomy failed with the following error: while scanning a simple key
  in "<unicode string>", line 4, column 1:
    seed_examples:xx
    ^
could not find expected ':'
  in "<unicode string>", line 5, column 13:
      - question: Who is Test Lin?
                ^

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: TaxonomyReadingException exception message doesn't print

5 participants