mostlyai-qa 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. mostlyai/__init__.py +13 -0
  2. mostlyai/qa/__init__.py +25 -0
  3. mostlyai/qa/accuracy.py +1305 -0
  4. mostlyai/qa/assets/__init__.py +44 -0
  5. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/1_Pooling/config.json +10 -0
  6. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/README.md +178 -0
  7. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/config.json +26 -0
  8. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/config_sentence_transformers.json +10 -0
  9. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/model.safetensors +0 -0
  10. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/modules.json +20 -0
  11. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/sentence_bert_config.json +4 -0
  12. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/special_tokens_map.json +37 -0
  13. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/tokenizer.json +30686 -0
  14. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/tokenizer_config.json +64 -0
  15. mostlyai/qa/assets/embedders/sentence-transformers/all-MiniLM-L6-v2/vocab.txt +30522 -0
  16. mostlyai/qa/assets/html/bootstrap-5.3.3.bundle.min.js +7 -0
  17. mostlyai/qa/assets/html/bootstrap-5.3.3.min.css +6 -0
  18. mostlyai/qa/assets/html/explainer.svg +9 -0
  19. mostlyai/qa/assets/html/head.html +301 -0
  20. mostlyai/qa/assets/html/info.svg +4 -0
  21. mostlyai/qa/assets/html/plotly-2.12.1.min.js +65 -0
  22. mostlyai/qa/assets/html/report_early_exit.html +26 -0
  23. mostlyai/qa/assets/html/report_template.html +425 -0
  24. mostlyai/qa/assets/tokenizers/transformers/gpt2/merges.txt +50001 -0
  25. mostlyai/qa/assets/tokenizers/transformers/gpt2/special_tokens_map.json +23 -0
  26. mostlyai/qa/assets/tokenizers/transformers/gpt2/tokenizer_config.json +22 -0
  27. mostlyai/qa/assets/tokenizers/transformers/gpt2/vocab.json +50259 -0
  28. mostlyai/qa/common.py +119 -0
  29. mostlyai/qa/distances.py +125 -0
  30. mostlyai/qa/filesystem.py +289 -0
  31. mostlyai/qa/html_report.py +155 -0
  32. mostlyai/qa/report.py +578 -0
  33. mostlyai/qa/report_from_statistics.py +251 -0
  34. mostlyai/qa/sampling.py +290 -0
  35. mostlyai/qa/similarity.py +264 -0
  36. mostlyai_qa-1.0.0.dist-info/LICENSE +201 -0
  37. mostlyai_qa-1.0.0.dist-info/METADATA +185 -0
  38. mostlyai_qa-1.0.0.dist-info/RECORD +39 -0
  39. mostlyai_qa-1.0.0.dist-info/WHEEL +4 -0
mostlyai/__init__.py ADDED
@@ -0,0 +1,13 @@
1
+ # Copyright 2024 MOSTLY AI
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
@@ -0,0 +1,25 @@
1
+ # Copyright 2024 MOSTLY AI
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import os
16
+
17
+ import pandas as pd
18
+
19
+ from mostlyai.qa.report import report
20
+ from mostlyai.qa.report_from_statistics import report_from_statistics
21
+
22
+ __all__ = ["report", "report_from_statistics"]
23
+
24
+ os.environ["TOKENIZERS_PARALLELISM"] = "false"
25
+ pd.set_option("future.no_silent_downcasting", True)