aait 2.2.7__tar.gz → 2.2.7.2__tar.gz
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.
- aait-2.2.7.2/PKG-INFO +28 -0
- aait-2.2.7.2/aait.egg-info/PKG-INFO +28 -0
- {aait-2.2.7 → aait-2.2.7.2}/aait.egg-info/SOURCES.txt +9 -26
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/answers.py +1 -1
- aait-2.2.7.2/orangecontrib/AAIT/llm/answers_llama.py +369 -0
- aait-2.2.7.2/orangecontrib/AAIT/utils/OperationSystem.py +94 -0
- aait-2.2.7.2/orangecontrib/AAIT/utils/aait_table_viewer.py +332 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/windows_utils.py +0 -1
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWAccumulator.py +2 -2
- aait-2.2.7.2/orangecontrib/AAIT/widgets/OWEdgeLLM.py +213 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWEndLoop.py +3 -5
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWExecuteScript.py +1 -1
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWFusionNM.py +1 -2
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWGenerateQuestions.py +13 -13
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWInputSelector.py +51 -0
- aait-2.2.7.2/orangecontrib/AAIT/widgets/OWOperationSystem.py +232 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWReranking.py +2 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWSelectRowsDynamic.py +32 -31
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWTrigger.py +0 -1
- aait-2.2.7.2/orangecontrib/AAIT/widgets/designer/ow_OperationSystem.ui +152 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui +21 -5
- aait-2.2.7.2/orangecontrib/AAIT/widgets/designer/owqueryllm.ui +349 -0
- aait-2.2.7.2/orangecontrib/AAIT/widgets/icons/operationSystem.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/setup.py +1 -1
- aait-2.2.7/PKG-INFO +0 -9
- aait-2.2.7/aait.egg-info/PKG-INFO +0 -9
- aait-2.2.7/orangecontrib/AAIT/audit_widget/SignalReceiver.py +0 -6
- aait-2.2.7/orangecontrib/AAIT/audit_widget/audit_widget.py +0 -85
- aait-2.2.7/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (2).TIF +0 -0
- aait-2.2.7/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (3).TIF +0 -0
- aait-2.2.7/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (4).TIF +0 -0
- aait-2.2.7/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0001.csv +0 -21
- aait-2.2.7/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0002.csv +0 -7
- aait-2.2.7/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0003.csv +0 -7
- aait-2.2.7/orangecontrib/AAIT/audit_widget/dynamic_results.py +0 -56
- aait-2.2.7/orangecontrib/AAIT/audit_widget/test_all_widgets.py +0 -117
- aait-2.2.7/orangecontrib/AAIT/audit_widget/test_server.py +0 -133
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_4all.py +0 -77
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_chunking.py +0 -49
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_edit_table.py +0 -32
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_mpnet_create_embeddings.py +0 -59
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_optimisation.py +0 -82
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_optimisationselection.py +0 -51
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_powfactory.py +0 -60
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_queryllm.py +0 -67
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_spacy_md_fr_lemmatizer.py +0 -107
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widget_traduction.py +0 -60
- aait-2.2.7/orangecontrib/AAIT/audit_widget/widgets_model.py +0 -120
- aait-2.2.7/orangecontrib/AAIT/encapsulation/__init__.py +0 -2
- aait-2.2.7/orangecontrib/AAIT/utils/CheckMetaData.py +0 -163
- aait-2.2.7/orangecontrib/AAIT/utils/check_data_in.py +0 -46
- aait-2.2.7/orangecontrib/AAIT/utils/tools/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/License.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/aait.egg-info/dependency_links.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/aait.egg-info/entry_points.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/aait.egg-info/namespace_packages.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/aait.egg-info/requires.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/aait.egg-info/top_level.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/fix_torch/fix_torch_dll_error.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/fix_torch/libomp140.x86_64.dll +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/MergeBaseLora.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/SERV_kill_workflow.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/SERV_requests.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/SERV_start_workflow.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/Tutorial_Finetuning.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/Tutorial_TestFinetuning.py +0 -0
- {aait-2.2.7/orangecontrib/AAIT/audit_widget → aait-2.2.7.2/orangecontrib/AAIT/llm}/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/chunking.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/embeddings.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/finetuning.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/functions_DatasetGeneration.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/functions_Finetuning.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/lemmes.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/lmstudio.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/main_DatasetGeneration.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/main_Finetuning.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/process_documents.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/prompt_management.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/quickpy.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/test.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/test_functions.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/llm/translations.py +0 -0
- {aait-2.2.7/orangecontrib/AAIT/llm → aait-2.2.7.2/orangecontrib/AAIT/optimiser}/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/optimiser/optuna_multi.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/MetManagement.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/SimpleDialogQt.py +0 -0
- {aait-2.2.7/orangecontrib/AAIT/optimiser → aait-2.2.7.2/orangecontrib/AAIT/utils}/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/aait_repo_file.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/base_widget.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/delta_local_shared_fodler.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/import_uic.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/initialize_from_ini.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/mac_utils.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/shared_functions.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/shared_variables.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/subprocess_management.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/thread_management.py +0 -0
- {aait-2.2.7/orangecontrib/AAIT/utils → aait-2.2.7.2/orangecontrib/AAIT/utils/tools}/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/tools/change_owcorpus.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/tools/concat_splitted_pypi.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/tools/first_time_check.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/utils/tools/owcorpus_ok.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWAAITResourcesManager.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWAddColumns.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWApplyRules.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWCN2rule_view.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWChunking.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWConcatRules.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWConverseLLM.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWCreateEmbeddings.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWDisplayMD.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWEditTable.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWEmptySwitch.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWExtraChunks.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWExtractTokens.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWFileMetadata.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWFileSyncChecker.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWFileWithPath.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWFindFilesFromDir.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWGenerateSynthesis.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWGenerateWord.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWKeywords.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWKeywordsDetection.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWLMStudio.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWLanguageDetection.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWLemmatizer.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWLoadDocuments.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_CE_MiniLML6.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Falcon.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_HelsinkiFrEn.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_MPNET.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Mistral.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Qwen.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Qwen1B5_Q6.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Qwen2_5_32B.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Qwen3B_Q4.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q4.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q6.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_Solar.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_SolarUncensored.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_EN.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_FR.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWOptimisation.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWOptimisationSelection.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWOptimisationSendScore.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWProcessDocumentsFromPath.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWQueryLLM.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWRandomData.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWSaveFilepathEntry.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWSelectColumnDynamique.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWSortAndSelect.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWStartLoop.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWTable2Corpus.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWTranslation.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/OWUnzipFolder.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/POW_Wfactory.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owMarkdown.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owaccumulator.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owaddcolumns.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owapplyrules.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owchunkanalysis.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owchunking.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owconcatrules.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owconversellm.ui +0 -0
- /aait-2.2.7/orangecontrib/AAIT/widgets/designer/owqueryllm.ui → /aait-2.2.7.2/orangecontrib/AAIT/widgets/designer/owedgellm.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owembeddings.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owemptyswitch.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owendloop.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owexecutescript.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owexecutescript_TEST.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owextrachunks.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owextracttokens.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owfilemetadata.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owfilesyncchecker.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owfilewithpath.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owfindfilesfromdir.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owfusion_nm.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owgenerate_word.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owgeneratequestions.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owgeneratesynthesis.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owkeyword.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owkeywordsdetection.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owlangdetect.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owlemmatizer.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owllm4all.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owloaddocuments.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owloadworkflow.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_ce_minilml6.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_falcon.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_en_fr.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_fr_en.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_mistral.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_mpnet.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_qwen.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_2.5_32b.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_1.5b_q6.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_3b_q4.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q4.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q6.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_qwencoder_7b.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_solar.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_solar_uncensored.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_en.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_fr.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/ownumberpointinrules.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owprocessdocuments.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owreranking.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owsavewithpath.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owselect_column_dynamic.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owselect_row_dynamic.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owsortandselect.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owstartloop.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owtable2corpus.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owtranslation.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owtrigger.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/designer/owunzipfolder.ui +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/CN2RuleViewer.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/MDViewer.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/Mistral.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/apply_rules.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/category.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/chunking_analysis.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/dark_green.txt +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/de.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/document_generator.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/documents.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/edge_llm.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/endloop.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/extra_chunks.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/in_or_out.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/input.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/languages.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/lm_studio.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/local_interf_img_multi_pull.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/local_interf_multi_pull.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/local_interf_pull.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/local_interf_push.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/local_interf_text_pull.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/logo_solar.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/logo_uncensoredsolar.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/logo_upload.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/models.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/optimisation.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/optimizer.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/output.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owCN2_intersect_rules.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owaccumulator.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owchunking.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owconversellm.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owedittable.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owembeddings.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owemptyswitch.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owenvinfo.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owexecutescript.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owextracttokens.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owfilemetadata.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owfilesfromdir.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owfilesyncchecker.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owfilewithpath.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owfusion_nm.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owgeneratequestions.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owgeneratesynthesis.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owkeywords.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owkeywordsdetection.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owlemmatizer.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owloaddocuments.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owmodel_ce_minilml6.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owmodel_falcon.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_fr_en.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owmodel_mpnet.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_en.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_fr.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owoptimisation.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owoptimisationselection.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owqueryllm.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owreranking.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owsavefilepathentry.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owselectcolumndynamique.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owsortandselect.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owtable2corpus.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owtranslation.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/owtrigger.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/processdocuments.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/qwen-color.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/select_dynamic_row.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/startloop.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/tools.png +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/widgetFactory.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/AAIT/widgets/icons/zip.svg +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/orangecontrib/__init__.py +0 -0
- {aait-2.2.7 → aait-2.2.7.2}/setup.cfg +0 -0
aait-2.2.7.2/PKG-INFO
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aait
|
|
3
|
+
Version: 2.2.7.2
|
|
4
|
+
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Orange community
|
|
7
|
+
Author-email:
|
|
8
|
+
Keywords: orange3 add-on
|
|
9
|
+
License-File: License.txt
|
|
10
|
+
Requires-Dist: torch
|
|
11
|
+
Requires-Dist: sentence-transformers==5.0.0
|
|
12
|
+
Requires-Dist: gpt4all[all]==2.8.2
|
|
13
|
+
Requires-Dist: sacremoses==0.1.1
|
|
14
|
+
Requires-Dist: transformers==4.51.3
|
|
15
|
+
Requires-Dist: sentencepiece==0.2.0
|
|
16
|
+
Requires-Dist: optuna
|
|
17
|
+
Requires-Dist: spacy==3.7.6
|
|
18
|
+
Requires-Dist: markdown
|
|
19
|
+
Requires-Dist: python-multipart
|
|
20
|
+
Requires-Dist: PyMuPDF==1.24.14
|
|
21
|
+
Requires-Dist: chonkie==0.4.1
|
|
22
|
+
Requires-Dist: GPUtil==1.4.0
|
|
23
|
+
Requires-Dist: unidecode==1.3.8
|
|
24
|
+
Requires-Dist: python-docx==1.1.2
|
|
25
|
+
Requires-Dist: psutil
|
|
26
|
+
Requires-Dist: thefuzz==0.22.1
|
|
27
|
+
Requires-Dist: beautifulsoup4==4.12.3
|
|
28
|
+
Requires-Dist: CATEGORIT
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aait
|
|
3
|
+
Version: 2.2.7.2
|
|
4
|
+
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Orange community
|
|
7
|
+
Author-email:
|
|
8
|
+
Keywords: orange3 add-on
|
|
9
|
+
License-File: License.txt
|
|
10
|
+
Requires-Dist: torch
|
|
11
|
+
Requires-Dist: sentence-transformers==5.0.0
|
|
12
|
+
Requires-Dist: gpt4all[all]==2.8.2
|
|
13
|
+
Requires-Dist: sacremoses==0.1.1
|
|
14
|
+
Requires-Dist: transformers==4.51.3
|
|
15
|
+
Requires-Dist: sentencepiece==0.2.0
|
|
16
|
+
Requires-Dist: optuna
|
|
17
|
+
Requires-Dist: spacy==3.7.6
|
|
18
|
+
Requires-Dist: markdown
|
|
19
|
+
Requires-Dist: python-multipart
|
|
20
|
+
Requires-Dist: PyMuPDF==1.24.14
|
|
21
|
+
Requires-Dist: chonkie==0.4.1
|
|
22
|
+
Requires-Dist: GPUtil==1.4.0
|
|
23
|
+
Requires-Dist: unidecode==1.3.8
|
|
24
|
+
Requires-Dist: python-docx==1.1.2
|
|
25
|
+
Requires-Dist: psutil
|
|
26
|
+
Requires-Dist: thefuzz==0.22.1
|
|
27
|
+
Requires-Dist: beautifulsoup4==4.12.3
|
|
28
|
+
Requires-Dist: CATEGORIT
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
License.txt
|
|
2
|
+
setup.cfg
|
|
2
3
|
setup.py
|
|
3
4
|
aait.egg-info/PKG-INFO
|
|
4
5
|
aait.egg-info/SOURCES.txt
|
|
@@ -9,30 +10,6 @@ aait.egg-info/requires.txt
|
|
|
9
10
|
aait.egg-info/top_level.txt
|
|
10
11
|
orangecontrib/__init__.py
|
|
11
12
|
orangecontrib/AAIT/__init__.py
|
|
12
|
-
orangecontrib/AAIT/audit_widget/SignalReceiver.py
|
|
13
|
-
orangecontrib/AAIT/audit_widget/__init__.py
|
|
14
|
-
orangecontrib/AAIT/audit_widget/audit_widget.py
|
|
15
|
-
orangecontrib/AAIT/audit_widget/dynamic_results.py
|
|
16
|
-
orangecontrib/AAIT/audit_widget/test_all_widgets.py
|
|
17
|
-
orangecontrib/AAIT/audit_widget/test_server.py
|
|
18
|
-
orangecontrib/AAIT/audit_widget/widget_4all.py
|
|
19
|
-
orangecontrib/AAIT/audit_widget/widget_chunking.py
|
|
20
|
-
orangecontrib/AAIT/audit_widget/widget_edit_table.py
|
|
21
|
-
orangecontrib/AAIT/audit_widget/widget_mpnet_create_embeddings.py
|
|
22
|
-
orangecontrib/AAIT/audit_widget/widget_optimisation.py
|
|
23
|
-
orangecontrib/AAIT/audit_widget/widget_optimisationselection.py
|
|
24
|
-
orangecontrib/AAIT/audit_widget/widget_powfactory.py
|
|
25
|
-
orangecontrib/AAIT/audit_widget/widget_queryllm.py
|
|
26
|
-
orangecontrib/AAIT/audit_widget/widget_spacy_md_fr_lemmatizer.py
|
|
27
|
-
orangecontrib/AAIT/audit_widget/widget_traduction.py
|
|
28
|
-
orangecontrib/AAIT/audit_widget/widgets_model.py
|
|
29
|
-
orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (2).TIF
|
|
30
|
-
orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (3).TIF
|
|
31
|
-
orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (4).TIF
|
|
32
|
-
orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0001.csv
|
|
33
|
-
orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0002.csv
|
|
34
|
-
orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0003.csv
|
|
35
|
-
orangecontrib/AAIT/encapsulation/__init__.py
|
|
36
13
|
orangecontrib/AAIT/fix_torch/fix_torch_dll_error.py
|
|
37
14
|
orangecontrib/AAIT/fix_torch/libomp140.x86_64.dll
|
|
38
15
|
orangecontrib/AAIT/llm/MergeBaseLora.py
|
|
@@ -43,6 +20,7 @@ orangecontrib/AAIT/llm/Tutorial_Finetuning.py
|
|
|
43
20
|
orangecontrib/AAIT/llm/Tutorial_TestFinetuning.py
|
|
44
21
|
orangecontrib/AAIT/llm/__init__.py
|
|
45
22
|
orangecontrib/AAIT/llm/answers.py
|
|
23
|
+
orangecontrib/AAIT/llm/answers_llama.py
|
|
46
24
|
orangecontrib/AAIT/llm/chunking.py
|
|
47
25
|
orangecontrib/AAIT/llm/embeddings.py
|
|
48
26
|
orangecontrib/AAIT/llm/finetuning.py
|
|
@@ -60,13 +38,13 @@ orangecontrib/AAIT/llm/test_functions.py
|
|
|
60
38
|
orangecontrib/AAIT/llm/translations.py
|
|
61
39
|
orangecontrib/AAIT/optimiser/__init__.py
|
|
62
40
|
orangecontrib/AAIT/optimiser/optuna_multi.py
|
|
63
|
-
orangecontrib/AAIT/utils/CheckMetaData.py
|
|
64
41
|
orangecontrib/AAIT/utils/MetManagement.py
|
|
42
|
+
orangecontrib/AAIT/utils/OperationSystem.py
|
|
65
43
|
orangecontrib/AAIT/utils/SimpleDialogQt.py
|
|
66
44
|
orangecontrib/AAIT/utils/__init__.py
|
|
67
45
|
orangecontrib/AAIT/utils/aait_repo_file.py
|
|
46
|
+
orangecontrib/AAIT/utils/aait_table_viewer.py
|
|
68
47
|
orangecontrib/AAIT/utils/base_widget.py
|
|
69
|
-
orangecontrib/AAIT/utils/check_data_in.py
|
|
70
48
|
orangecontrib/AAIT/utils/delta_local_shared_fodler.py
|
|
71
49
|
orangecontrib/AAIT/utils/import_uic.py
|
|
72
50
|
orangecontrib/AAIT/utils/initialize_from_ini.py
|
|
@@ -91,6 +69,7 @@ orangecontrib/AAIT/widgets/OWConcatRules.py
|
|
|
91
69
|
orangecontrib/AAIT/widgets/OWConverseLLM.py
|
|
92
70
|
orangecontrib/AAIT/widgets/OWCreateEmbeddings.py
|
|
93
71
|
orangecontrib/AAIT/widgets/OWDisplayMD.py
|
|
72
|
+
orangecontrib/AAIT/widgets/OWEdgeLLM.py
|
|
94
73
|
orangecontrib/AAIT/widgets/OWEditTable.py
|
|
95
74
|
orangecontrib/AAIT/widgets/OWEmptySwitch.py
|
|
96
75
|
orangecontrib/AAIT/widgets/OWEndLoop.py
|
|
@@ -128,6 +107,7 @@ orangecontrib/AAIT/widgets/OWModel_Solar.py
|
|
|
128
107
|
orangecontrib/AAIT/widgets/OWModel_SolarUncensored.py
|
|
129
108
|
orangecontrib/AAIT/widgets/OWModel_SpacyMD_EN.py
|
|
130
109
|
orangecontrib/AAIT/widgets/OWModel_SpacyMD_FR.py
|
|
110
|
+
orangecontrib/AAIT/widgets/OWOperationSystem.py
|
|
131
111
|
orangecontrib/AAIT/widgets/OWOptimisation.py
|
|
132
112
|
orangecontrib/AAIT/widgets/OWOptimisationSelection.py
|
|
133
113
|
orangecontrib/AAIT/widgets/OWOptimisationSendScore.py
|
|
@@ -147,6 +127,7 @@ orangecontrib/AAIT/widgets/OWUnzipFolder.py
|
|
|
147
127
|
orangecontrib/AAIT/widgets/POW_Wfactory.py
|
|
148
128
|
orangecontrib/AAIT/widgets/__init__.py
|
|
149
129
|
orangecontrib/AAIT/widgets/designer/owMarkdown.ui
|
|
130
|
+
orangecontrib/AAIT/widgets/designer/ow_OperationSystem.ui
|
|
150
131
|
orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui
|
|
151
132
|
orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui
|
|
152
133
|
orangecontrib/AAIT/widgets/designer/owaccumulator.ui
|
|
@@ -156,6 +137,7 @@ orangecontrib/AAIT/widgets/designer/owchunkanalysis.ui
|
|
|
156
137
|
orangecontrib/AAIT/widgets/designer/owchunking.ui
|
|
157
138
|
orangecontrib/AAIT/widgets/designer/owconcatrules.ui
|
|
158
139
|
orangecontrib/AAIT/widgets/designer/owconversellm.ui
|
|
140
|
+
orangecontrib/AAIT/widgets/designer/owedgellm.ui
|
|
159
141
|
orangecontrib/AAIT/widgets/designer/owembeddings.ui
|
|
160
142
|
orangecontrib/AAIT/widgets/designer/owemptyswitch.ui
|
|
161
143
|
orangecontrib/AAIT/widgets/designer/owendloop.ui
|
|
@@ -234,6 +216,7 @@ orangecontrib/AAIT/widgets/icons/logo_solar.svg
|
|
|
234
216
|
orangecontrib/AAIT/widgets/icons/logo_uncensoredsolar.svg
|
|
235
217
|
orangecontrib/AAIT/widgets/icons/logo_upload.png
|
|
236
218
|
orangecontrib/AAIT/widgets/icons/models.png
|
|
219
|
+
orangecontrib/AAIT/widgets/icons/operationSystem.png
|
|
237
220
|
orangecontrib/AAIT/widgets/icons/optimisation.png
|
|
238
221
|
orangecontrib/AAIT/widgets/icons/optimizer.png
|
|
239
222
|
orangecontrib/AAIT/widgets/icons/output.png
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import copy
|
|
2
|
+
import os
|
|
3
|
+
try:
|
|
4
|
+
import GPUtil #sometimes errors occurs on gpu testing
|
|
5
|
+
except:
|
|
6
|
+
pass
|
|
7
|
+
import psutil
|
|
8
|
+
import ntpath
|
|
9
|
+
import platform
|
|
10
|
+
from llama_cpp import Llama
|
|
11
|
+
from Orange.data import Domain, StringVariable, Table
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
15
|
+
from Orange.widgets.orangecontrib.AAIT.llm import prompt_management
|
|
16
|
+
from Orange.widgets.orangecontrib.AAIT.utils import MetManagement
|
|
17
|
+
else:
|
|
18
|
+
from orangecontrib.AAIT.llm import prompt_management
|
|
19
|
+
from orangecontrib.AAIT.utils import MetManagement
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def check_gpu(model_path, argself):
|
|
23
|
+
"""
|
|
24
|
+
Checks if the GPU has enough VRAM to load a model.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
model_path (str): Path to the model file.
|
|
28
|
+
argself (OWWidget): OWQueryLLM object.
|
|
29
|
+
|
|
30
|
+
Returns:
|
|
31
|
+
bool: True if the model can be loaded on the GPU, False otherwise.
|
|
32
|
+
"""
|
|
33
|
+
argself.error("")
|
|
34
|
+
argself.warning("")
|
|
35
|
+
argself.information("")
|
|
36
|
+
argself.can_run = True
|
|
37
|
+
argself.use_gpu = True
|
|
38
|
+
return
|
|
39
|
+
|
|
40
|
+
# attention bien faire la suite dans un try exept car gputil peut etre capricieux
|
|
41
|
+
token_weight = 0.13
|
|
42
|
+
if model_path is None:
|
|
43
|
+
argself.use_gpu = False
|
|
44
|
+
return
|
|
45
|
+
if platform.system() != "Windows":
|
|
46
|
+
argself.use_gpu = False
|
|
47
|
+
return
|
|
48
|
+
if not model_path.endswith(".gguf"):
|
|
49
|
+
argself.use_gpu = False
|
|
50
|
+
argself.can_run = False
|
|
51
|
+
argself.error("Model is not compatible. It must be a .gguf format.")
|
|
52
|
+
return
|
|
53
|
+
# Calculate the model size in MB with a 1500 MB buffer
|
|
54
|
+
model_size = os.path.getsize(model_path) / (1024 ** 3) * 1000
|
|
55
|
+
model_size += token_weight * int(argself.n_ctx)
|
|
56
|
+
print(f"Required memory: {model_size/1000:.2f}GB")
|
|
57
|
+
# If there is no GPU, set use_gpu to False
|
|
58
|
+
if len(GPUtil.getGPUs()) == 0:
|
|
59
|
+
argself.use_gpu = False
|
|
60
|
+
argself.information("Running on CPU. No GPU detected.")
|
|
61
|
+
return
|
|
62
|
+
# Else
|
|
63
|
+
else:
|
|
64
|
+
# Get the available VRAM on the first GPU
|
|
65
|
+
gpu = GPUtil.getGPUs()[0]
|
|
66
|
+
free_vram = gpu.memoryFree
|
|
67
|
+
# If there is not enough VRAM on GPU
|
|
68
|
+
if free_vram < model_size:
|
|
69
|
+
# Set use_gpu to False
|
|
70
|
+
argself.use_gpu = False
|
|
71
|
+
# Check for available RAM
|
|
72
|
+
available_ram = psutil.virtual_memory().available / 1024 / 1024
|
|
73
|
+
if available_ram < model_size:
|
|
74
|
+
argself.can_run = False
|
|
75
|
+
argself.error(f"Cannot run. Both GPU and CPU are too small for this model (required: {model_size/1000:.2f}GB).")
|
|
76
|
+
return
|
|
77
|
+
else:
|
|
78
|
+
argself.warning(f"Running on CPU. GPU seems to be too small for this model (available: {free_vram/1000:.2f}GB || required: {model_size/1000:.2f}GB).")
|
|
79
|
+
return
|
|
80
|
+
# If there is enough space on GPU
|
|
81
|
+
else:
|
|
82
|
+
try:
|
|
83
|
+
# Load the model and test it
|
|
84
|
+
# model = GPT4All(model_name=model_path, model_path=model_path, n_ctx=int(argself.n_ctx),
|
|
85
|
+
# allow_download=False, device="cuda")
|
|
86
|
+
# answer = model.generate("What if ?", max_tokens=3)
|
|
87
|
+
# # If it works, set use_gpu to True
|
|
88
|
+
argself.use_gpu = True
|
|
89
|
+
argself.information("Running on GPU.")
|
|
90
|
+
return
|
|
91
|
+
# If importing Llama and reading the model doesn't work
|
|
92
|
+
except Exception as e:
|
|
93
|
+
# Set use_gpu to False
|
|
94
|
+
argself.use_gpu = False
|
|
95
|
+
argself.warning(f"GPU cannot be used. (detail: {e})")
|
|
96
|
+
return
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def load_model(model_path, use_gpu, n_ctx=10000):
|
|
100
|
+
"""
|
|
101
|
+
Charge un modèle GGUF avec llama_cpp.Llama.
|
|
102
|
+
|
|
103
|
+
- use_gpu=True : tente d'utiliser l'accélération (Metal/CUDA/Vulkan selon build)
|
|
104
|
+
en mettant n_gpu_layers à -1 (= toutes les couches si possible).
|
|
105
|
+
- use_gpu=False : CPU only (n_gpu_layers=0).
|
|
106
|
+
"""
|
|
107
|
+
if not os.path.exists(model_path):
|
|
108
|
+
print(f"Model could not be found: {model_path} does not exist")
|
|
109
|
+
return
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
# n_gpu_layers : -1 = toutes les couches si le binaire a un backend GPU (Metal/CUDA/Vulkan)
|
|
113
|
+
n_gpu_layers = -1 if use_gpu else 0
|
|
114
|
+
|
|
115
|
+
# n_threads : par défaut tous les cœurs logiques dispo moins 1 (pour avoir l'interface graphique qui ne freeze pas)
|
|
116
|
+
n_threads = max(1, (os.cpu_count()-1 or 1))
|
|
117
|
+
|
|
118
|
+
# NOTE : llama_cpp utilise n_ctx pour la taille de contexte
|
|
119
|
+
model = Llama(
|
|
120
|
+
model_path=model_path,
|
|
121
|
+
n_ctx=n_ctx,
|
|
122
|
+
n_threads=n_threads,
|
|
123
|
+
n_gpu_layers=n_gpu_layers,
|
|
124
|
+
# Quelques réglages sûrs
|
|
125
|
+
use_mmap=True,
|
|
126
|
+
use_mlock=False,
|
|
127
|
+
embedding=False,
|
|
128
|
+
verbose=False,
|
|
129
|
+
)
|
|
130
|
+
return model
|
|
131
|
+
except Exception as e:
|
|
132
|
+
print("Failed to load model with llama_cpp:", e)
|
|
133
|
+
return
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_parameters=None, workflow_id="", progress_callback=None, argself=None):
|
|
137
|
+
"""
|
|
138
|
+
Identique en signature/comportement, mais utilise llama_cpp sous le capot.
|
|
139
|
+
"""
|
|
140
|
+
# Copie des données d'entrée
|
|
141
|
+
data = copy.deepcopy(table)
|
|
142
|
+
attr_dom = list(data.domain.attributes)
|
|
143
|
+
metas_dom = list(data.domain.metas)
|
|
144
|
+
class_dom = list(data.domain.class_vars)
|
|
145
|
+
|
|
146
|
+
# Chargement modèle (llama_cpp)
|
|
147
|
+
model = load_model(model_path=model_path, use_gpu=use_gpu, n_ctx=n_ctx)
|
|
148
|
+
|
|
149
|
+
# Paramètres de génération par défaut
|
|
150
|
+
if query_parameters is None:
|
|
151
|
+
query_parameters = {"max_tokens": 4096, "temperature": 0.4, "top_p": 0.4, "top_k": 40, "repeat_penalty": 1.15}
|
|
152
|
+
|
|
153
|
+
# Génération sur la colonne "prompt"
|
|
154
|
+
try:
|
|
155
|
+
rows = []
|
|
156
|
+
for i, row in enumerate(data):
|
|
157
|
+
features = list(data[i])
|
|
158
|
+
metas = list(data.metas[i])
|
|
159
|
+
prompt = row["prompt"].value
|
|
160
|
+
|
|
161
|
+
system_prompt = row["system prompt"].value if "system prompt" in data.domain else ""
|
|
162
|
+
assistant_prompt = row["assistant prompt"].value if "assistant prompt" in data.domain else ""
|
|
163
|
+
|
|
164
|
+
# Appliquer ton template existant (inchangé)
|
|
165
|
+
prompt = prompt_management.apply_prompt_template(
|
|
166
|
+
model_path,
|
|
167
|
+
user_prompt=prompt,
|
|
168
|
+
assistant_prompt=assistant_prompt,
|
|
169
|
+
system_prompt=system_prompt
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
answer = run_query(
|
|
173
|
+
prompt,
|
|
174
|
+
model=model,
|
|
175
|
+
max_tokens=query_parameters["max_tokens"],
|
|
176
|
+
temperature=query_parameters["temperature"],
|
|
177
|
+
top_p=query_parameters["top_p"],
|
|
178
|
+
top_k=query_parameters["top_k"],
|
|
179
|
+
repeat_penalty=query_parameters["repeat_penalty"],
|
|
180
|
+
workflow_id=workflow_id,
|
|
181
|
+
argself=argself,
|
|
182
|
+
progress_callback=progress_callback
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
if answer == "":
|
|
186
|
+
answer = (
|
|
187
|
+
"Error: The answer could not be generated. The model architecture you tried to use is most "
|
|
188
|
+
f"likely not supported yet.\n\nModel name: {ntpath.basename(model_path)}"
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
metas += [answer]
|
|
192
|
+
rows.append(features + metas)
|
|
193
|
+
|
|
194
|
+
if progress_callback is not None:
|
|
195
|
+
progress_value = float(100 * (i + 1) / len(data))
|
|
196
|
+
progress_callback((progress_value, "\n\n\n\n"))
|
|
197
|
+
|
|
198
|
+
if argself is not None and getattr(argself, "stop", False):
|
|
199
|
+
break
|
|
200
|
+
except ValueError as e:
|
|
201
|
+
print("An error occurred when trying to generate an answer:", e)
|
|
202
|
+
return
|
|
203
|
+
|
|
204
|
+
# Ajouter la colonne "Answer" en metas
|
|
205
|
+
answer_dom = [StringVariable("Answer")]
|
|
206
|
+
|
|
207
|
+
domain = Domain(attributes=attr_dom, metas=metas_dom + answer_dom, class_vars=class_dom)
|
|
208
|
+
out_data = Table.from_list(domain=domain, rows=rows)
|
|
209
|
+
return out_data
|
|
210
|
+
|
|
211
|
+
class StopCallback:
|
|
212
|
+
def __init__(self, stop_sequences, widget_thread=None):
|
|
213
|
+
self.stop_sequences = stop_sequences
|
|
214
|
+
self.recent_tokens = ""
|
|
215
|
+
self.returning = True # Store the last valid token before stopping
|
|
216
|
+
self.widget_thread = widget_thread
|
|
217
|
+
|
|
218
|
+
def __call__(self, token_id, token):
|
|
219
|
+
# Stop in case thread is stopped
|
|
220
|
+
if self.widget_thread:
|
|
221
|
+
if self.widget_thread.stop:
|
|
222
|
+
return False
|
|
223
|
+
|
|
224
|
+
# Stop in case stop word has been met
|
|
225
|
+
if not self.returning:
|
|
226
|
+
return False
|
|
227
|
+
self.recent_tokens += token
|
|
228
|
+
|
|
229
|
+
# Check if any stop sequence appears
|
|
230
|
+
for stop_seq in self.stop_sequences:
|
|
231
|
+
if stop_seq in self.recent_tokens:
|
|
232
|
+
self.returning = False # Stop the generation, but allow the last token
|
|
233
|
+
|
|
234
|
+
return True # Continue generation
|
|
235
|
+
|
|
236
|
+
def write_tokens_to_file(token: str, workflow_id=""):
|
|
237
|
+
chemin_dossier = MetManagement.get_api_local_folder(workflow_id=workflow_id)
|
|
238
|
+
if os.path.exists(chemin_dossier):
|
|
239
|
+
MetManagement.write_file_time(chemin_dossier + "time.txt")
|
|
240
|
+
filepath = os.path.join(chemin_dossier, "chat_output.txt")
|
|
241
|
+
with open(filepath, "a", encoding="utf-8") as f:
|
|
242
|
+
f.write(token)
|
|
243
|
+
f.flush()
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def run_query(prompt, model, max_tokens=4096, temperature=0, top_p=0, top_k=40, repeat_penalty=1.15,
|
|
247
|
+
workflow_id="", argself=None, progress_callback=None):
|
|
248
|
+
"""
|
|
249
|
+
Version llama_cpp avec streaming.
|
|
250
|
+
On garde la même signature et le même contrat de retour.
|
|
251
|
+
"""
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
# Séquences d'arrêt à filtrer du résultat final
|
|
255
|
+
stop_sequences = ["<|endoftext|>", "### User", "<|im_end|>", "<|im_start|>", "<|im_end>", "<im_end|>", "<im_end>"]
|
|
256
|
+
callback_instance = StopCallback(stop_sequences, argself)
|
|
257
|
+
|
|
258
|
+
# Paramètres de sampling mappés vers llama_cpp
|
|
259
|
+
gen_kwargs = dict(
|
|
260
|
+
max_tokens=max_tokens,
|
|
261
|
+
temperature=temperature,
|
|
262
|
+
top_p=top_p if top_p else 1.0, # top_p=0 désactive → on met 1.0
|
|
263
|
+
top_k=top_k if top_k else 0, # top_k=0 désactive
|
|
264
|
+
repeat_penalty=repeat_penalty,
|
|
265
|
+
stream=True,
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
answer = ""
|
|
269
|
+
|
|
270
|
+
# IMPORTANT :
|
|
271
|
+
# - On utilise create_completion (prompt-style) pour rester compatible avec ton templating actuel.
|
|
272
|
+
# - Le générateur renvoie des chunks contenant choices[0].text.
|
|
273
|
+
try:
|
|
274
|
+
stream = model.create_completion(prompt=prompt, **gen_kwargs)
|
|
275
|
+
|
|
276
|
+
for chunk in stream:
|
|
277
|
+
# Récupérer le texte incrémental
|
|
278
|
+
token = chunk["choices"][0].get("text", "")
|
|
279
|
+
if not token:
|
|
280
|
+
continue
|
|
281
|
+
|
|
282
|
+
# Callback d'arrêt custom (on simule token_id=None)
|
|
283
|
+
if not callback_instance(None, token):
|
|
284
|
+
# On stoppe proprement le flux (consommation du générateur non nécessaire)
|
|
285
|
+
answer += token # on peut inclure le dernier token si souhaité
|
|
286
|
+
break
|
|
287
|
+
|
|
288
|
+
answer += token
|
|
289
|
+
write_tokens_to_file(token, workflow_id)
|
|
290
|
+
|
|
291
|
+
if progress_callback is not None:
|
|
292
|
+
progress_callback((None, token))
|
|
293
|
+
|
|
294
|
+
if argself is not None and getattr(argself, "stop", False):
|
|
295
|
+
# Arrêt demandé de l'extérieur
|
|
296
|
+
return answer
|
|
297
|
+
|
|
298
|
+
except Exception as e:
|
|
299
|
+
# En cas d'erreur pendant la génération, on retourne ce qu'on a + log
|
|
300
|
+
print("Generation error (llama_cpp):", e)
|
|
301
|
+
|
|
302
|
+
# Nettoyage des séquences d'arrêt
|
|
303
|
+
for stop in stop_sequences:
|
|
304
|
+
if stop:
|
|
305
|
+
answer = answer.replace(stop, "")
|
|
306
|
+
|
|
307
|
+
return answer
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
# def generate_conversation(table, model, model_path, conversation="", progress_callback=None, argself=None):
|
|
311
|
+
# """
|
|
312
|
+
# Generates a response using a language model and appends it to a conversation.
|
|
313
|
+
#
|
|
314
|
+
# Parameters:
|
|
315
|
+
# ----------
|
|
316
|
+
# table (Orange.data.Table) Input data table. The first row should contain at least a "prompt" column, and optionally
|
|
317
|
+
# "system prompt" and "assistant prompt" columns for context.
|
|
318
|
+
#
|
|
319
|
+
# model (GPT4All) : Loaded language model instance, compatible with GPT4All or llama.cpp-style interfaces.
|
|
320
|
+
#
|
|
321
|
+
# model_path (str) : Path or name of the model, used for selecting the appropriate prompt template.
|
|
322
|
+
#
|
|
323
|
+
# conversation (str, optional) : Existing conversation string to append the new response to. Defaults to an empty string.
|
|
324
|
+
#
|
|
325
|
+
# progress_callback (callable, optional) : Callback function for UI updates during generation. Called with progress percentage and message.
|
|
326
|
+
#
|
|
327
|
+
# argself (object, optional) : Extra argument passed to `run_query`, typically the widget instance (used for context or settings).
|
|
328
|
+
#
|
|
329
|
+
# Returns:
|
|
330
|
+
# -------
|
|
331
|
+
# Orange.data.Table
|
|
332
|
+
# A new Orange Table containing the original input row with two new meta columns:
|
|
333
|
+
# - "Answer": the model's generated response.
|
|
334
|
+
# - "Conversation": the updated full conversation string.
|
|
335
|
+
# """
|
|
336
|
+
# if table is None:
|
|
337
|
+
# return
|
|
338
|
+
#
|
|
339
|
+
# # Copy of input data
|
|
340
|
+
# data = copy.deepcopy(table)
|
|
341
|
+
# attr_dom = list(data.domain.attributes)
|
|
342
|
+
# metas_dom = list(data.domain.metas)
|
|
343
|
+
# class_dom = list(data.domain.class_vars)
|
|
344
|
+
#
|
|
345
|
+
# features = list(data[0])
|
|
346
|
+
# metas = list(data.metas[0])
|
|
347
|
+
#
|
|
348
|
+
# # Get data from the first row of the Data Table
|
|
349
|
+
# system_prompt = data[0]["system prompt"].value if "system prompt" in data.domain else ""
|
|
350
|
+
# assistant_prompt = data[0]["assistant prompt"].value if "assistant prompt" in data.domain else ""
|
|
351
|
+
# user_prompt = data[0]["prompt"].value
|
|
352
|
+
#
|
|
353
|
+
# # Build prompt based on the model name
|
|
354
|
+
# prompt = prompt_management.apply_prompt_template(model_path, user_prompt=user_prompt, assistant_prompt=assistant_prompt, system_prompt=system_prompt)
|
|
355
|
+
# answer = run_query(prompt, model=model, argself=argself, progress_callback=progress_callback)
|
|
356
|
+
# conversation += "### Assistant :\n\n" + answer + "\n\n\n\n"
|
|
357
|
+
#
|
|
358
|
+
# # Add spaces to the widget for following answers
|
|
359
|
+
# progress_callback((100, "\n\n\n\n"))
|
|
360
|
+
#
|
|
361
|
+
# # Generate new Domain to add to data
|
|
362
|
+
# metas += [answer, conversation]
|
|
363
|
+
# row = [features + metas]
|
|
364
|
+
# answer_dom = [StringVariable("Answer"), StringVariable("Conversation")]
|
|
365
|
+
#
|
|
366
|
+
# # Create and return table
|
|
367
|
+
# domain = Domain(attributes=attr_dom, metas=metas_dom + answer_dom, class_vars=class_dom)
|
|
368
|
+
# out_data = Table.from_list(domain=domain, rows=row)
|
|
369
|
+
# return out_data
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import List
|
|
4
|
+
import shutil
|
|
5
|
+
import time
|
|
6
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
7
|
+
from Orange.widgets.orangecontrib.AAIT.utils import MetManagement
|
|
8
|
+
else:
|
|
9
|
+
from orangecontrib.AAIT.utils import MetManagement
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def DeleteFolderlistOrFilelist(paths: list[str]):
|
|
14
|
+
"""
|
|
15
|
+
supprime des fichier et des dossier dans la liste
|
|
16
|
+
"""
|
|
17
|
+
for p in paths:
|
|
18
|
+
if os.path.exists(p):
|
|
19
|
+
if os.path.isfile(p):
|
|
20
|
+
MetManagement.reset_files([p], attempts=10, delay=0.05)
|
|
21
|
+
elif os.path.isdir(p):
|
|
22
|
+
MetManagement.reset_folder(p, attempts=10, delay=0.05, recreate=False)
|
|
23
|
+
|
|
24
|
+
def ensure_dirs(paths: List[str]):
|
|
25
|
+
"""
|
|
26
|
+
Crée récursivement tous les dossiers donnés dans la liste.
|
|
27
|
+
Ne lève pas d'erreur si le dossier existe déjà.
|
|
28
|
+
Compatible Windows, macOS, Linux.
|
|
29
|
+
"""
|
|
30
|
+
for p in paths:
|
|
31
|
+
path = Path(p).expanduser()
|
|
32
|
+
if path.exists() and not path.is_dir():
|
|
33
|
+
continue # un fichier existe déjà ici, on ne touche pas
|
|
34
|
+
os.makedirs(path, exist_ok=True)
|
|
35
|
+
|
|
36
|
+
def move_or_rename(src_list: List[str], dst_list: List[str]):
|
|
37
|
+
"""
|
|
38
|
+
Déplace ou renomme des fichiers / dossiers.
|
|
39
|
+
- src_list et dst_list doivent avoir la même longueur.
|
|
40
|
+
- Crée les dossiers parents de destination si besoin.
|
|
41
|
+
- Ne produit aucune sortie (fonction silencieuse).
|
|
42
|
+
- Compatible Windows, macOS, Linux.
|
|
43
|
+
"""
|
|
44
|
+
if len(src_list) != len(dst_list):
|
|
45
|
+
raise ValueError("Les listes source et destination doivent avoir la même longueur.")
|
|
46
|
+
|
|
47
|
+
for src, dst in zip(src_list, dst_list):
|
|
48
|
+
src_path = Path(src).expanduser()
|
|
49
|
+
dst_path = Path(dst).expanduser()
|
|
50
|
+
|
|
51
|
+
if not src_path.exists():
|
|
52
|
+
continue # ignore si le fichier/dossier source n'existe pas
|
|
53
|
+
|
|
54
|
+
dst_path.parent.mkdir(parents=True, exist_ok=True) # crée le dossier parent si besoin
|
|
55
|
+
os.replace(src_path, dst_path) # déplace ou renomme (remplace si existe)
|
|
56
|
+
|
|
57
|
+
def copy_and_overwrite(src_list: List[str], dst_list: List[str]):
|
|
58
|
+
"""
|
|
59
|
+
Copie des fichiers ou dossiers (récursivement pour les dossiers).
|
|
60
|
+
- src_list et dst_list doivent avoir la même longueur.
|
|
61
|
+
- Crée automatiquement les dossiers parents de destination.
|
|
62
|
+
- Écrase les fichiers existants sans erreur.
|
|
63
|
+
- Fonction silencieuse (aucune sortie console).
|
|
64
|
+
- Compatible Windows, macOS, Linux.
|
|
65
|
+
"""
|
|
66
|
+
if len(src_list) != len(dst_list):
|
|
67
|
+
raise ValueError("Les listes source et destination doivent avoir la même longueur.")
|
|
68
|
+
|
|
69
|
+
for src, dst in zip(src_list, dst_list):
|
|
70
|
+
src_path = Path(src).expanduser()
|
|
71
|
+
dst_path = Path(dst).expanduser()
|
|
72
|
+
|
|
73
|
+
if not src_path.exists():
|
|
74
|
+
continue # ignore les sources inexistantes
|
|
75
|
+
|
|
76
|
+
dst_path.parent.mkdir(parents=True, exist_ok=True)
|
|
77
|
+
|
|
78
|
+
if src_path.is_dir():
|
|
79
|
+
# Copie récursive du dossier (remplace si déjà présent)
|
|
80
|
+
if dst_path.exists():
|
|
81
|
+
shutil.rmtree(dst_path)
|
|
82
|
+
shutil.copytree(src_path, dst_path)
|
|
83
|
+
else:
|
|
84
|
+
# Copie simple de fichier
|
|
85
|
+
shutil.copy2(src_path, dst_path)
|
|
86
|
+
|
|
87
|
+
def sleep_seconds(seconds: float):
|
|
88
|
+
"""
|
|
89
|
+
Suspend l'exécution pendant 'seconds' secondes.
|
|
90
|
+
Compatible Windows, macOS, Linux.
|
|
91
|
+
"""
|
|
92
|
+
if seconds <= 0:
|
|
93
|
+
return
|
|
94
|
+
time.sleep(seconds)
|