Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeffkinnison
Copy link
Contributor

The LLM encoder in ECD needs to share large parts of the code base with the LLM model type, but branching currently inspects configs for model type only. This adds a utility that detects LLM model type or the usage of LLM encoder in text features for ECD models (LLM encoder is not currently valid for GBM). This can be used as a replacement for expressions like if config.model_type =="llm":.

@github-actions
Copy link

github-actions bot commented Jan 9, 2024

Unit Test Results

  6 files  ±0    6 suites  ±0   14m 18s ⏱️ +9s
12 tests ±0    9 ✔️ ±0    3 💤 ±0  0 ±0 
60 runs  ±0  42 ✔️ ±0  18 💤 ±0  0 ±0 

Results for commit cb5b01b. ± Comparison against base commit 6a878bc.

♻️ This comment has been updated with latest results.

expectation: The expected result
request: pytest `request` fixture
"""
config = request.getfixturevalue(config)
Copy link
Contributor

Choose a reason for hiding this comment

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

@jeffkinnison Just curious - is there a reason you decided to create all of the tests as individual (and nested) fixtures as opposed to just creating each of them directly as parameterized tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was mostly for readability on my part, though it does also allow us to reuse the configs for both the dict and object cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it! Thanks for the changes with making them module scoped. I think that because they're relatively light weight fixtures, this is okay to do and shouldn't slow things down or cause memory related issues.

Copy link
Contributor

@arnavgarg1 arnavgarg1 Jan 9, 2024

Choose a reason for hiding this comment

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

Last callout is that because some of the fixtures are dependent on each other, I think it may prevent pytest from parallelizing some of the tests. Again, it seems okay in this case given that the test itself is mostly an in place config or dict check and nothing too heavy, so each of the tests should run quickly.

Copy link
Contributor

@arnavgarg1 arnavgarg1 left a comment

Choose a reason for hiding this comment

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

Thanks for the utility function and comprehensive testing!

@jeffkinnison jeffkinnison merged commit 4cf7017 into master Jan 9, 2024
@jeffkinnison jeffkinnison deleted the llm-schema-detection branch January 9, 2024 19:19
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