-
-
Notifications
You must be signed in to change notification settings - Fork 379
[GSK-1509][GSK-1990] Add up/download tests for model, dataset and callable #1535
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
Conversation
GSK-1509 Add integration tests for WebSocket communication
|
GSK-1990 Add pydantic config (ie extra = forbid) to all dtos
To avoid any silent typo or error between server and worker, and also client and server, pydantic object should be using some configuration. |
| @dataclass | ||
| class DatasetMeta: | ||
| name: Optional[str] | ||
| target: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be target: Optional[str] = None ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Andrey, thanks very much for the review!
The Optional[str] without default value means that we have to provide it in constructor, but it could be None:
>>> from giskard.core.core import DatasetMeta
>>> DatasetMeta()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: DatasetMeta.__init__() missing 6 required positional arguments: 'name', 'column_types', 'column_dtypes', 'number_of_rows', 'category_features', and 'target'
while having the default value means that we do not have to provide it:
>>> from giskard.core.core import DatasetMeta
>>> DatasetMeta()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: DatasetMeta.__init__() missing 5 required positional arguments: 'name', 'column_types', 'column_dtypes', 'number_of_rows', and 'category_features'
In the DatasetMeta case, all of the information should have been provided by the Dataset class, but the target could be None now with LLM model.
|
Kudos, SonarCloud Quality Gate passed! |
andreybavt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, I tested on MozartBiographer.ipynb and it worked
* Add unit test for echo action in `listener.py` * Add a test to ensure the registered actors * Move echo actor test into `test_websocket_actor` * Add mocked ML worker for ML worker info generation * Add test for `getInfo` actor * Fix `None` when installed packages not required * Add test for `stopWorker` actor * Add test for `get_catalog` actor * Fix pdm lint due to codestyle * Add `runModel` actor for internal worker * Add unit tests for model running on dataframe * Use utils to save model and dataset in tests * Add unit tests for `explain`, `explainText` actors * Fix type in parameters for model inputs * Fix WebSocket dataframe arguments creation * Make `GiskardClient` nullable in WebSocket params * Add a unit test to data processing without func * Add workaround and use empty list * Create utils to get the cache path * Add tests for slice and transformation func upload Using a mock client and check local cache * Unify the constants of slice, transformation func * Unify unit tests for callable function uploading * Unit tests for savable func download (no project) * Add similar tests for callable download in project * Improve loading from module in unit tests * Improve URL gen in downloading tests * Add util to save callables under home cache * Move meta info for callables fixup to `utils.py` * Add single-function test case for data process * Fix missing dataset mock data fixup util * Simplify data processing actor tests * Add tests for dataset downloading * Add tests for model downloading * Add project cache guard for testing * Add temp cache guard for websocket actor tests * Add test for external worker runModel action * Add test for runModelForDataFrame actor in external worker * Add external worker tests for explaination actors * Add external worker dataset processing test * Clean up * Rename tests for callables downloading * Fixup missing fields in mock dataset meta info * Fix internal worker log artifact local * Remove unused posixpath * Fix tests using mock dataset * Fix and improve dataset util * Add tests for run adhoc tests w/o debug * Separate tests * Add tests for running test suites * Fix meta info loading in internal ML worker * Remove auto-created `version` from mandatory fields * Remove `generateTestSuite` actor * Migrate artifact downloading tests with new utils * Add more utils to test artifact download * Add test for loading from local in internal worker * Remove imports for `generateTestSuite` * Improve local artifact logging * Remove changes already done in #1535 * Remove unused Path from pathlib * Sync `utils.py` from #1535 * Add tests for abnormal execution path * Add tests for invalid push kind in push feature * Add tests for push without call-to-action * Add tests for contribution push with CTA * Add tests for perturbation push with CTA * Add tests for borderline push with CTA * Add tests for overconfidence push with CTA save example * Add comments for test related CTA in push feature `CREATE_TEST`, `ADD_TEST_TO_CATALOG` * Fix test for ad-hoc running with no name dataset * Clean cache before each push feature test * Remove tests for INVALID push kind * Fix typo in saving perturbation from push --------- Co-authored-by: Hartorn <[email protected]>








Description
targetfield inDatasetMetaInfoin GSK-1990Related Issue
[GSK-1990]
[GSK-1509]
Type of Change
Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.make codestyle.