Conversation
Contributor
Author
slundberg
suggested changes
Nov 28, 2022
Contributor
slundberg
left a comment
There was a problem hiding this comment.
looked very quickly and just had one issue to flag on the local model.
adatest/_topic_model.py
Outdated
| # we are in a highly overparametrized situation, so we use a linear SVC to get "max-margin" based generalization | ||
| self.model = CVModel() | ||
| self.model.fit(embeddings, labels) | ||
| self.model = ConstantModel(1.0) |
Contributor
There was a problem hiding this comment.
Why is this switched? it seems like it will disable all topic learning :)
Contributor
Author
There was a problem hiding this comment.
Glad you found this, I was getting errors there for some reason so I made that change to temporarily unblock my work. I shouldn't have checked it in though. I'll revert it and double check everything still works.
Contributor
Author
There was a problem hiding this comment.
@slundberg Reverted and tested again with no issues. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworks the way that Adatest's front end handles data caching and refreshes stale data.
Description of work
Implementation details
One slightly strange thing I had to do was figure out how to make our class-based components work with React's hooks, which can only work with function components. This was necessary because hooks have become the new standard for React libraries like Redux, and the new Redux Toolkit removes a lot of boilerplate previously required for Redux.
The general idea is to wrap a class component with a function component which is able to use hooks and pass on anything needed as props to the class component. In our case, the function components fetch data from the Redux store and pass it on as props for the class components, which allowed me to reuse almost all the logic inside the original class components.
The main files for Redux are
store.tsandTestTreeSlice.ts.Known issues
Things are mostly working, but there are still some bugs to fix. Work still in progress: