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

Replace pickle with safer alternatives #13067

Open
wants to merge 6 commits into
base: 3.6.x
Choose a base branch
from

Conversation

tabergma
Copy link
Contributor

@tabergma tabergma commented Dec 20, 2024

Proposed changes:
Replace pickle and joblib with safer alternatives, e.g. json, safetensors, and skops, for
serializing components.

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

sanchariGr and others added 4 commits February 9, 2024 16:33
Update slack release notification step
* use json.dump and json.load in count_vectors_featurizer and lexical_syntactic_featurizer instead of pickle

* update load and persist in sklearn intent classifier

* update persist and load in dietclassifier

* update load and persist in sklearn intent classifier

* use json.dump and json.load in tracker featurizers

* update persist and load of TEDPolicy

* updated unexpected intent policy persist and load of model utilities.

* save and load fake features

* rename patterns.pkl to patterns.json

* update poetry.lock

* ruff formatting

* move skops import

* add comments

* clean up save_features and load_features

* WIP: update model data saving and loading

* add tests for save and load features

* update tests for test_tracker_featurizer

* update tests for test_tracker_featurizer

* WIP: serialization of feature arrays.

* update serialization and deserialization for feature array

* remove not needed tests/utils/tensorflow/test_model_data_storage.py

* start writing tests for feature array

* update feature array tests

* update tests

* fix linting

* add changelog

* add new dependencies to .github/dependabot.yml

* fix some tests

* fix loading and saving of unexpected intent ted policy

* fix linting issue

* fix converting of features in cvf and lsf

* fix lint issues

* convert vocab in cvf

* fix linting

* update crf entity extractor

* fix to_dict of crf_token

* addressed type issues

* ruff formatting

* fix typing and lint issues

* remove cloudpickle dependency

* update logistic_regression_classifier and remove joblib as dependency

* update formatting of pyproject.toml

* next try: update formatting of pyproject.toml

* update logging

* update poetry.lock

* refactor loading of lexical_syntactic_featurizer

* rename FeatureMetadata.type -> FeatureMetadata.data_type

* clean up tests test_features.py and test_crf_entity_extractor.py

* update test_feature_array.py

* check for type when loading tracker featurizer.

* update changelog

* fix line too long

* move import of skops

* Prepared release of version 3.10.9.dev1 (#1496)

* prepared release of version 3.10.9.dev1

* update minimum model version

* Check for 'step_id' and 'active_flow' keys in the metadata when adding 'ActionExecuted' event to flows paths stack.

* fix parsing of commands

* improve logging

* formatting

* add changelog

* fix parse commands for multi step

* [ATO-2985] - Windows model loading test (#1537)

* Add test for model loading on windows

* Improve the error message logged when handling the user message

* Add a changelog

* Fix Code Quality - line too long

* Rasa-sdk-update (#1546)

* all rasa-sdk micro updates

* update poetry lock

* update rasa-sdk in lock file

* Remove trailing white sapce

* Prepared release of version 3.10.11 (#1570)

* prepared release of version 3.10.11

* add comments again in pyproject.toml

* update poetry.lock

* revert changes in github workflows

* undo changes in pyproject.toml

* update changelog

* revert changes in github workflows

* update poetry.lock

* update poetry.lock
@tabergma tabergma requested review from a team as code owners December 20, 2024 11:55
@tabergma tabergma requested review from rasa-aadlv and removed request for a team December 20, 2024 11:55
Copy link
Contributor

🚀 A preview of the docs have been deployed at the following URL: https://13067--rasahq-docs-rasa-v2.netlify.app/docs/rasa

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.

2 participants