edsl 0.1.31.dev4__py3-none-any.whl → 0.1.33__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.
- edsl/Base.py +9 -3
- edsl/TemplateLoader.py +24 -0
- edsl/__init__.py +8 -3
- edsl/__version__.py +1 -1
- edsl/agents/Agent.py +40 -8
- edsl/agents/AgentList.py +43 -0
- edsl/agents/Invigilator.py +136 -221
- edsl/agents/InvigilatorBase.py +148 -59
- edsl/agents/{PromptConstructionMixin.py → PromptConstructor.py} +154 -85
- edsl/agents/__init__.py +1 -0
- edsl/auto/AutoStudy.py +117 -0
- edsl/auto/StageBase.py +230 -0
- edsl/auto/StageGenerateSurvey.py +178 -0
- edsl/auto/StageLabelQuestions.py +125 -0
- edsl/auto/StagePersona.py +61 -0
- edsl/auto/StagePersonaDimensionValueRanges.py +88 -0
- edsl/auto/StagePersonaDimensionValues.py +74 -0
- edsl/auto/StagePersonaDimensions.py +69 -0
- edsl/auto/StageQuestions.py +73 -0
- edsl/auto/SurveyCreatorPipeline.py +21 -0
- edsl/auto/utilities.py +224 -0
- edsl/config.py +48 -47
- edsl/conjure/Conjure.py +6 -0
- edsl/coop/PriceFetcher.py +58 -0
- edsl/coop/coop.py +50 -7
- edsl/data/Cache.py +35 -1
- edsl/data/CacheHandler.py +3 -4
- edsl/data_transfer_models.py +73 -38
- edsl/enums.py +8 -0
- edsl/exceptions/general.py +10 -8
- edsl/exceptions/language_models.py +25 -1
- edsl/exceptions/questions.py +62 -5
- edsl/exceptions/results.py +4 -0
- edsl/inference_services/AnthropicService.py +13 -11
- edsl/inference_services/AwsBedrock.py +112 -0
- edsl/inference_services/AzureAI.py +214 -0
- edsl/inference_services/DeepInfraService.py +4 -3
- edsl/inference_services/GoogleService.py +16 -12
- edsl/inference_services/GroqService.py +5 -4
- edsl/inference_services/InferenceServiceABC.py +58 -3
- edsl/inference_services/InferenceServicesCollection.py +13 -8
- edsl/inference_services/MistralAIService.py +120 -0
- edsl/inference_services/OllamaService.py +18 -0
- edsl/inference_services/OpenAIService.py +55 -56
- edsl/inference_services/TestService.py +80 -0
- edsl/inference_services/TogetherAIService.py +170 -0
- edsl/inference_services/models_available_cache.py +25 -0
- edsl/inference_services/registry.py +19 -1
- edsl/jobs/Answers.py +10 -12
- edsl/jobs/FailedQuestion.py +78 -0
- edsl/jobs/Jobs.py +137 -41
- edsl/jobs/buckets/BucketCollection.py +24 -15
- edsl/jobs/buckets/TokenBucket.py +105 -18
- edsl/jobs/interviews/Interview.py +393 -83
- edsl/jobs/interviews/{interview_exception_tracking.py → InterviewExceptionCollection.py} +22 -18
- edsl/jobs/interviews/InterviewExceptionEntry.py +167 -0
- edsl/jobs/runners/JobsRunnerAsyncio.py +152 -160
- edsl/jobs/runners/JobsRunnerStatus.py +331 -0
- edsl/jobs/tasks/QuestionTaskCreator.py +30 -23
- edsl/jobs/tasks/TaskCreators.py +1 -1
- edsl/jobs/tasks/TaskHistory.py +205 -126
- edsl/language_models/LanguageModel.py +297 -177
- edsl/language_models/ModelList.py +2 -2
- edsl/language_models/RegisterLanguageModelsMeta.py +14 -29
- edsl/language_models/fake_openai_call.py +15 -0
- edsl/language_models/fake_openai_service.py +61 -0
- edsl/language_models/registry.py +25 -8
- edsl/language_models/repair.py +0 -19
- edsl/language_models/utilities.py +61 -0
- edsl/notebooks/Notebook.py +20 -2
- edsl/prompts/Prompt.py +52 -2
- edsl/questions/AnswerValidatorMixin.py +23 -26
- edsl/questions/QuestionBase.py +330 -249
- edsl/questions/QuestionBaseGenMixin.py +133 -0
- edsl/questions/QuestionBasePromptsMixin.py +266 -0
- edsl/questions/QuestionBudget.py +99 -42
- edsl/questions/QuestionCheckBox.py +227 -36
- edsl/questions/QuestionExtract.py +98 -28
- edsl/questions/QuestionFreeText.py +47 -31
- edsl/questions/QuestionFunctional.py +7 -0
- edsl/questions/QuestionList.py +141 -23
- edsl/questions/QuestionMultipleChoice.py +159 -66
- edsl/questions/QuestionNumerical.py +88 -47
- edsl/questions/QuestionRank.py +182 -25
- edsl/questions/Quick.py +41 -0
- edsl/questions/RegisterQuestionsMeta.py +31 -12
- edsl/questions/ResponseValidatorABC.py +170 -0
- edsl/questions/__init__.py +3 -4
- edsl/questions/decorators.py +21 -0
- edsl/questions/derived/QuestionLikertFive.py +10 -5
- edsl/questions/derived/QuestionLinearScale.py +15 -2
- edsl/questions/derived/QuestionTopK.py +10 -1
- edsl/questions/derived/QuestionYesNo.py +24 -3
- edsl/questions/descriptors.py +43 -7
- edsl/questions/prompt_templates/question_budget.jinja +13 -0
- edsl/questions/prompt_templates/question_checkbox.jinja +32 -0
- edsl/questions/prompt_templates/question_extract.jinja +11 -0
- edsl/questions/prompt_templates/question_free_text.jinja +3 -0
- edsl/questions/prompt_templates/question_linear_scale.jinja +11 -0
- edsl/questions/prompt_templates/question_list.jinja +17 -0
- edsl/questions/prompt_templates/question_multiple_choice.jinja +33 -0
- edsl/questions/prompt_templates/question_numerical.jinja +37 -0
- edsl/questions/question_registry.py +6 -2
- edsl/questions/templates/__init__.py +0 -0
- edsl/questions/templates/budget/__init__.py +0 -0
- edsl/questions/templates/budget/answering_instructions.jinja +7 -0
- edsl/questions/templates/budget/question_presentation.jinja +7 -0
- edsl/questions/templates/checkbox/__init__.py +0 -0
- edsl/questions/templates/checkbox/answering_instructions.jinja +10 -0
- edsl/questions/templates/checkbox/question_presentation.jinja +22 -0
- edsl/questions/templates/extract/__init__.py +0 -0
- edsl/questions/templates/extract/answering_instructions.jinja +7 -0
- edsl/questions/templates/extract/question_presentation.jinja +1 -0
- edsl/questions/templates/free_text/__init__.py +0 -0
- edsl/questions/templates/free_text/answering_instructions.jinja +0 -0
- edsl/questions/templates/free_text/question_presentation.jinja +1 -0
- edsl/questions/templates/likert_five/__init__.py +0 -0
- edsl/questions/templates/likert_five/answering_instructions.jinja +10 -0
- edsl/questions/templates/likert_five/question_presentation.jinja +12 -0
- edsl/questions/templates/linear_scale/__init__.py +0 -0
- edsl/questions/templates/linear_scale/answering_instructions.jinja +5 -0
- edsl/questions/templates/linear_scale/question_presentation.jinja +5 -0
- edsl/questions/templates/list/__init__.py +0 -0
- edsl/questions/templates/list/answering_instructions.jinja +4 -0
- edsl/questions/templates/list/question_presentation.jinja +5 -0
- edsl/questions/templates/multiple_choice/__init__.py +0 -0
- edsl/questions/templates/multiple_choice/answering_instructions.jinja +9 -0
- edsl/questions/templates/multiple_choice/html.jinja +0 -0
- edsl/questions/templates/multiple_choice/question_presentation.jinja +12 -0
- edsl/questions/templates/numerical/__init__.py +0 -0
- edsl/questions/templates/numerical/answering_instructions.jinja +8 -0
- edsl/questions/templates/numerical/question_presentation.jinja +7 -0
- edsl/questions/templates/rank/__init__.py +0 -0
- edsl/questions/templates/rank/answering_instructions.jinja +11 -0
- edsl/questions/templates/rank/question_presentation.jinja +15 -0
- edsl/questions/templates/top_k/__init__.py +0 -0
- edsl/questions/templates/top_k/answering_instructions.jinja +8 -0
- edsl/questions/templates/top_k/question_presentation.jinja +22 -0
- edsl/questions/templates/yes_no/__init__.py +0 -0
- edsl/questions/templates/yes_no/answering_instructions.jinja +6 -0
- edsl/questions/templates/yes_no/question_presentation.jinja +12 -0
- edsl/results/Dataset.py +20 -0
- edsl/results/DatasetExportMixin.py +58 -30
- edsl/results/DatasetTree.py +145 -0
- edsl/results/Result.py +32 -5
- edsl/results/Results.py +135 -46
- edsl/results/ResultsDBMixin.py +3 -3
- edsl/results/Selector.py +118 -0
- edsl/results/tree_explore.py +115 -0
- edsl/scenarios/FileStore.py +71 -10
- edsl/scenarios/Scenario.py +109 -24
- edsl/scenarios/ScenarioImageMixin.py +2 -2
- edsl/scenarios/ScenarioList.py +546 -21
- edsl/scenarios/ScenarioListExportMixin.py +24 -4
- edsl/scenarios/ScenarioListPdfMixin.py +153 -4
- edsl/study/SnapShot.py +8 -1
- edsl/study/Study.py +32 -0
- edsl/surveys/Rule.py +15 -3
- edsl/surveys/RuleCollection.py +21 -5
- edsl/surveys/Survey.py +707 -298
- edsl/surveys/SurveyExportMixin.py +71 -9
- edsl/surveys/SurveyFlowVisualizationMixin.py +2 -1
- edsl/surveys/SurveyQualtricsImport.py +284 -0
- edsl/surveys/instructions/ChangeInstruction.py +47 -0
- edsl/surveys/instructions/Instruction.py +34 -0
- edsl/surveys/instructions/InstructionCollection.py +77 -0
- edsl/surveys/instructions/__init__.py +0 -0
- edsl/templates/error_reporting/base.html +24 -0
- edsl/templates/error_reporting/exceptions_by_model.html +35 -0
- edsl/templates/error_reporting/exceptions_by_question_name.html +17 -0
- edsl/templates/error_reporting/exceptions_by_type.html +17 -0
- edsl/templates/error_reporting/interview_details.html +116 -0
- edsl/templates/error_reporting/interviews.html +10 -0
- edsl/templates/error_reporting/overview.html +5 -0
- edsl/templates/error_reporting/performance_plot.html +2 -0
- edsl/templates/error_reporting/report.css +74 -0
- edsl/templates/error_reporting/report.html +118 -0
- edsl/templates/error_reporting/report.js +25 -0
- edsl/utilities/utilities.py +40 -1
- {edsl-0.1.31.dev4.dist-info → edsl-0.1.33.dist-info}/METADATA +8 -2
- edsl-0.1.33.dist-info/RECORD +295 -0
- edsl/jobs/interviews/InterviewTaskBuildingMixin.py +0 -271
- edsl/jobs/interviews/retry_management.py +0 -37
- edsl/jobs/runners/JobsRunnerStatusMixin.py +0 -303
- edsl/utilities/gcp_bucket/simple_example.py +0 -9
- edsl-0.1.31.dev4.dist-info/RECORD +0 -204
- {edsl-0.1.31.dev4.dist-info → edsl-0.1.33.dist-info}/LICENSE +0 -0
- {edsl-0.1.31.dev4.dist-info → edsl-0.1.33.dist-info}/WHEEL +0 -0
@@ -0,0 +1,295 @@
|
|
1
|
+
edsl/Base.py,sha256=8T9p-MMUACtgEi6MQY0XvSI_wRToQlMob42E31FCgdg,9124
|
2
|
+
edsl/BaseDiff.py,sha256=RoVEh52UJs22yMa7k7jv8se01G62jJNWnBzaZngo-Ug,8260
|
3
|
+
edsl/TemplateLoader.py,sha256=sDBlSMt7EfOduM7w3h6v03gvh_Rzn9hVrlS-iLSQdZA,849
|
4
|
+
edsl/__init__.py,sha256=UZcx9RHSi3Dslh2lWvCOeppdMW9Xzw_YLs-kFaNW1MU,1770
|
5
|
+
edsl/__version__.py,sha256=gzg6nU6x2Uud0fXG6Kts9v4UFjYEjLGQu5DaW7kU0qc,23
|
6
|
+
edsl/agents/Agent.py,sha256=ww6DK177eHQUlYkzgnt1b-MBDKXCdhVx3HezAZZ7TKk,28473
|
7
|
+
edsl/agents/AgentList.py,sha256=qo8VK3Ov0YOSbsBcHmlwLZBH81CcDfy5IEcx9AVH78M,10963
|
8
|
+
edsl/agents/Invigilator.py,sha256=Of6R2zWoEzx-_NxQG1G7qNbNt4leb544kRBidSjeIJE,8126
|
9
|
+
edsl/agents/InvigilatorBase.py,sha256=qIdAiriXAbnJH_SN9w2UAXHcDgQvk8Ar3QerKFjtPwM,10341
|
10
|
+
edsl/agents/PromptConstructor.py,sha256=VOxZsILgC60zOxK4kEauO6XKCz3tyM0ddxND5o1QDN8,18533
|
11
|
+
edsl/agents/__init__.py,sha256=B1dWfV4QWOo8cc2KeuetdFGeNhZ8XHc0Q8YhQW9k7BE,136
|
12
|
+
edsl/agents/descriptors.py,sha256=m8ND3-2-JbgNX1HGakBNLIeemwsgYa1mQxYO9GW33hw,2934
|
13
|
+
edsl/auto/AutoStudy.py,sha256=yNnhfJPO6oxbgVaYbRftJa8DluKhajfgLCh9o9E3YmU,3843
|
14
|
+
edsl/auto/StageBase.py,sha256=6Ve0cMmc-wdK7tgk7_cOopnvvggEOSkNWfLLWXny7QU,7933
|
15
|
+
edsl/auto/StageGenerateSurvey.py,sha256=_lC1-hhFjqd6md1-RE9uEOPtZp7dZHxJn0ERpszSfow,7394
|
16
|
+
edsl/auto/StageLabelQuestions.py,sha256=8uHrDi6t-o_NgumfguiCENsNU3rmYF4nmanTMEtbkYI,4663
|
17
|
+
edsl/auto/StagePersona.py,sha256=1oqHedJGmT1E0F5F-5uq36SudkP7d4FHDd8mbmb5hOw,1886
|
18
|
+
edsl/auto/StagePersonaDimensionValueRanges.py,sha256=z_fJJK4vydId13IVQnI92RUoDQkl6Tr9XxUOMNrKyYI,2933
|
19
|
+
edsl/auto/StagePersonaDimensionValues.py,sha256=o6xUVkYLa1wooY5mDmy1j8bGQbK4EzUZ-Zqi7Lfv1hI,2313
|
20
|
+
edsl/auto/StagePersonaDimensions.py,sha256=9tjZJGA1ytTgMlTspRrYKRXj0QYvkWx9Yg5Comf_x8k,2069
|
21
|
+
edsl/auto/StageQuestions.py,sha256=TyUSnfeFEbuQKG_KZT9rk43flRt0ZyzQDqYzBa_858c,2198
|
22
|
+
edsl/auto/SurveyCreatorPipeline.py,sha256=s5S_RPFM3Ia8Dzdv52_576BxfsFq9GwXEVWxJId5Fuo,658
|
23
|
+
edsl/auto/utilities.py,sha256=DDngZCGlzjWeJUvPHhMEZ5ZoVm4KgGYtgyRA1mfUfmA,7606
|
24
|
+
edsl/base/Base.py,sha256=DShsfI6A2ojg42muPFpVtUgTX33pnqT5vtN0SRlr-9Q,8866
|
25
|
+
edsl/config.py,sha256=IfEm07QvhV5B2baNg6SrhME82BHBGwNZSLmYnx9ERxM,5875
|
26
|
+
edsl/conjure/AgentConstructionMixin.py,sha256=qLLYJH02HotVwBUYzaHs4QW0t5nsC3NX15qxQLzEwLI,5702
|
27
|
+
edsl/conjure/Conjure.py,sha256=JaCuAm3rmqjh11_X8PXgvPsVHGql3yTn9JEzVlzOUVU,2019
|
28
|
+
edsl/conjure/InputData.py,sha256=RdFgkzzayddSTd6vcwBB8LC796YBj94pciwrQx9nBtg,22003
|
29
|
+
edsl/conjure/InputDataCSV.py,sha256=m4hHSQogxt7LNcGNxcGRkrbdGy8pIQu5KvXhIEt9i6k,1684
|
30
|
+
edsl/conjure/InputDataMixinQuestionStats.py,sha256=Jav5pqYCLSQ1pAbGV8O9VCBu0vL8Q6pteSEhRKrONuw,6256
|
31
|
+
edsl/conjure/InputDataPyRead.py,sha256=phGmzVi06jdbcxgngAp_lEawGkJr5dAC2B4ho5IrAy4,3064
|
32
|
+
edsl/conjure/InputDataSPSS.py,sha256=lv7NK8lpUfjsWh8h9MpqQrCjJX6Oyg3tIOrXcQYcS_4,223
|
33
|
+
edsl/conjure/InputDataStata.py,sha256=WbA7oUGHgHJgugKjakXzpFfzWxTI4bXGGSZLxM1-tEM,224
|
34
|
+
edsl/conjure/QuestionOptionMixin.py,sha256=RSLZ7AmA65MfwyxKKjqprR9FdkLP6MsCcmTbJoqu-MM,2870
|
35
|
+
edsl/conjure/QuestionTypeMixin.py,sha256=L2vU207aeezlI1OuJ4I4SdtFCWBZzE-mBk7VwnTghO8,892
|
36
|
+
edsl/conjure/RawQuestion.py,sha256=lo8k1aln4RfnfeS6OukzwC7P_cRe2LVZxcL6uwmim6A,2116
|
37
|
+
edsl/conjure/SurveyResponses.py,sha256=fdJNFasSXVf7S5KCsYE9WB6w17q7VRylzw0aD5zGO_M,191
|
38
|
+
edsl/conjure/__init__.py,sha256=1lPYFjV73GzYYSXiTyxopM4nKcXVHumEEo0fe06DbMo,535
|
39
|
+
edsl/conjure/examples/placeholder.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
|
+
edsl/conjure/naming_utilities.py,sha256=8uoGaCPZQKLwz2HudtsFSovivTGumQrFYxXxck5WUZQ,4964
|
41
|
+
edsl/conjure/utilities.py,sha256=yRdOJx9KIpWXMx41Bbfysx7Zd4v2ROwca5L4T1rmtQM,5539
|
42
|
+
edsl/conversation/Conversation.py,sha256=NdWH62XpcF6hoaG0ScMho_c3TO7PfBnbdlppUN-j07k,7627
|
43
|
+
edsl/conversation/car_buying.py,sha256=Quh2Q8O9YoCyTKJUy3li376QFIOcL1gX0y89w3wlSl4,1950
|
44
|
+
edsl/conversation/mug_negotiation.py,sha256=mjvAqErD4AjN3G2za2c-X-3axOShW-zAJUeiJqTxVPA,2616
|
45
|
+
edsl/conversation/next_speaker_utilities.py,sha256=bqr5JglCd6bdLc9IZ5zGOAsmN2F4ERiubSMYvZIG7qk,3629
|
46
|
+
edsl/coop/PriceFetcher.py,sha256=7q8r1FqE9ap1CMi6WiE_pZQhYxEqG9_tgPgGxLQYVX8,1894
|
47
|
+
edsl/coop/__init__.py,sha256=4iZCwJSzJVyjBYk8ggGxY2kZjq9dXVT1jhyPDNyew4I,115
|
48
|
+
edsl/coop/coop.py,sha256=nXb5JHuqfEQTnUEgS0NHv3E5MYpuA9U972FDzdgTm1g,28456
|
49
|
+
edsl/coop/utils.py,sha256=UZwljKYW_Yjw7RYcjOg3SW7fn1pyHQfJ1fM48TBNoss,3601
|
50
|
+
edsl/data/Cache.py,sha256=jDt0LoZjLpGnM8-CraQEcsQaVg--U3BiBR1zHj0nDn8,16536
|
51
|
+
edsl/data/CacheEntry.py,sha256=_5UiFaJQu_U-Z1_lEPt-h6Gaidp2Eunk02wOd3Ni3MQ,7252
|
52
|
+
edsl/data/CacheHandler.py,sha256=DxbfeT2nZGRu8yQkbWr2tyEnhNiClevMsd5KZMCq2f0,4793
|
53
|
+
edsl/data/SQLiteDict.py,sha256=V5Nfnxctgh4Iblqcw1KmbnkjtfmWrrombROSQ3mvg6A,8979
|
54
|
+
edsl/data/__init__.py,sha256=KBNGGEuGHq--D-TlpAQmvv_If906dJc1Gsy028zOx78,170
|
55
|
+
edsl/data/orm.py,sha256=Jz6rvw5SrlxwysTL0QI9r68EflKxeEBmf6j6himHDS8,238
|
56
|
+
edsl/data_transfer_models.py,sha256=9LsvZNMvyEEkF-DIcEUA9iomFbxG7E6nRUqsbHoB03k,1951
|
57
|
+
edsl/enums.py,sha256=Z6nhaP8p3z0UJSfsCGb6VQUtGUKw3AK6yC0UDwOi05c,5247
|
58
|
+
edsl/exceptions/__init__.py,sha256=HVg-U-rJ0fRoG9Rws6gnK5S9B68SkPWDPsoD6KpMZ-A,1370
|
59
|
+
edsl/exceptions/agents.py,sha256=3SORFwFbMGrF6-vAL2GrKEVdPcXo7md_k2oYufnVXHA,673
|
60
|
+
edsl/exceptions/configuration.py,sha256=qH2sInNTndKlCLAaNgaXHyRFdKQHL7-dElB_j8wz9g4,351
|
61
|
+
edsl/exceptions/coop.py,sha256=xDr7k_Tir6L5AxO6GMmoFyUjZ3DIenPQflpUkaTqJl0,38
|
62
|
+
edsl/exceptions/data.py,sha256=K24CjgwFiMWxrF1Z2dF6F7Vfrge_y9kMK_wsYYSaroU,209
|
63
|
+
edsl/exceptions/general.py,sha256=zAyJnppPjjxQAn6X3A5fetmv5FUR7kQDU58vwBKvAks,1114
|
64
|
+
edsl/exceptions/jobs.py,sha256=sSUATmzBIN1oINWuwPExxPqIWmfCo0XYj_yR4dJzVjo,803
|
65
|
+
edsl/exceptions/language_models.py,sha256=lpAFUiY8uVMXHAznGXtHQSdzdkAWOGu5A9u3-t1vi8A,1814
|
66
|
+
edsl/exceptions/prompts.py,sha256=vD_reI-RVKWYHYozenEmhmB7Rb1sIiXghgNUtbVGBUo,247
|
67
|
+
edsl/exceptions/questions.py,sha256=ItTXeJEN2TDBL0LLWy37RFX3QG5iUoZa9HzUOs5Ney4,2509
|
68
|
+
edsl/exceptions/results.py,sha256=EkjowYF_7tvDQU0SlyHRiETq-MzZcxALMn0CyaSk2M0,386
|
69
|
+
edsl/exceptions/surveys.py,sha256=lADtr-tvPmUYSfRy3TdkTV5SzZfShlMgCzm-ZGYRlGk,557
|
70
|
+
edsl/inference_services/AnthropicService.py,sha256=OV6miOC8mzPmalNouTmzk7eqqzUUHteLf5qZ-yWRBXA,2808
|
71
|
+
edsl/inference_services/AwsBedrock.py,sha256=Tf_g4vNDJXDWpYOmUxGrMRfoqN5bUJRf2NZCBucmb4U,3813
|
72
|
+
edsl/inference_services/AzureAI.py,sha256=1o257vsZLDTvJ5VnL65gE2qpFg4lzP835E3SySFTGcA,8776
|
73
|
+
edsl/inference_services/DeepInfraService.py,sha256=fWlH5sCNxf8eHPHxPPxJMEVWpCM9sDenkC8IZYqtXfA,515
|
74
|
+
edsl/inference_services/GoogleService.py,sha256=2OKQmV2SB5pWgK3YBBuAyRrOInPArMirmfM9ihnUNq8,2903
|
75
|
+
edsl/inference_services/GroqService.py,sha256=eDMq8d7YAlJ2689ywaoaPGvMgFfOiX1KYlF_vr97N6I,510
|
76
|
+
edsl/inference_services/InferenceServiceABC.py,sha256=rXqorwbKqzlwui2cxum8_TRrBcfOkgB9s0xULHYGQ1Y,3709
|
77
|
+
edsl/inference_services/InferenceServicesCollection.py,sha256=EDyxnoSjGXhWob_ost7U8WUYjn1jgL_noB0-VlXBnOo,2810
|
78
|
+
edsl/inference_services/MistralAIService.py,sha256=MIdvroQcfMJLx5wOXItLZpie-MXid4pvIYV9y4xLOWY,3771
|
79
|
+
edsl/inference_services/OllamaService.py,sha256=oro9CRl8IUE2Ro-zE69Cr4Zaf6Gdw29XW5CFU-46E0k,498
|
80
|
+
edsl/inference_services/OpenAIService.py,sha256=Io84AC-_QGRze1PbllaoYI2li00YMtONhfluK8f_po0,7179
|
81
|
+
edsl/inference_services/TestService.py,sha256=Y9dBFE35Y089I3E4LXqG2RdccD4IP2eFG49EoHQ9b5g,2600
|
82
|
+
edsl/inference_services/TogetherAIService.py,sha256=DIyYs2OoUi44xynwezT4EscOPL0ySl8_f3og5stOkQw,6291
|
83
|
+
edsl/inference_services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
|
+
edsl/inference_services/models_available_cache.py,sha256=HtGNaYgrxY2oPy-QruKhjj6LUzhGNqBhLHFWMoMi1E4,3312
|
85
|
+
edsl/inference_services/rate_limits_cache.py,sha256=HYslviz7mxF9U4CUTPAkoyBsiXjSju-YCp4HHir6e34,1398
|
86
|
+
edsl/inference_services/registry.py,sha256=CwdaQ-A5PTb5lFKMQdOfl8IqCw2SVJ8HlC-_2uZf11k,1141
|
87
|
+
edsl/inference_services/write_available.py,sha256=NNwhATlaMp8IYY635MSx-oYxt5X15acjAfaqYCo_I1Y,285
|
88
|
+
edsl/jobs/Answers.py,sha256=c4LpigQjdnMr7iJu8571C4FggGPVudfT7hbJgmgKW40,1821
|
89
|
+
edsl/jobs/FailedQuestion.py,sha256=3D5Vcmv1t2_dzBWbkUUIia3_jXHdzQDdyg-4TEIWU2Q,2701
|
90
|
+
edsl/jobs/Jobs.py,sha256=a2Y-goWT9vGi00OqW7t9L8Oi6SXXiSllymd3s1frX1g,34035
|
91
|
+
edsl/jobs/__init__.py,sha256=aKuAyd_GoalGj-k7djOoVwEbFUE2XLPlikXaA1_8yAg,32
|
92
|
+
edsl/jobs/buckets/BucketCollection.py,sha256=11CRisE1WAPcAlI3YJK3DVvu0AqSvv8KskXo4Q1waSk,2286
|
93
|
+
edsl/jobs/buckets/ModelBuckets.py,sha256=hxw_tzc0V42CiB7mh5jIxlgwDVJ-zFZhlLtKrHEg8ho,2419
|
94
|
+
edsl/jobs/buckets/TokenBucket.py,sha256=7fG4omzTcj5xC2iJLO9bfBkdAGs6Y3weXzlA3BgPr0E,9090
|
95
|
+
edsl/jobs/interviews/Interview.py,sha256=OsIcz6wmVmkoJNnA8PN8tCD1DKq-HwLmSwo5UUkyvbU,23264
|
96
|
+
edsl/jobs/interviews/InterviewExceptionCollection.py,sha256=Ez8BCZUD3odqoY9h-gzYKKM8yaHynQ-eYw2uMDh7t98,3279
|
97
|
+
edsl/jobs/interviews/InterviewExceptionEntry.py,sha256=BGGjj0sb1wJJ0QmYklt1DyEYKD8mUGygllGfN2WXKbY,4903
|
98
|
+
edsl/jobs/interviews/InterviewStatistic.py,sha256=hY5d2EkIJ96NilPpZAvZZzZoxLXM7ss3xx5MIcKtTPs,1856
|
99
|
+
edsl/jobs/interviews/InterviewStatisticsCollection.py,sha256=_ZZ0fnZBQiIywP9Q_wWjpWhlfcPe2cn32GKut10t5RI,788
|
100
|
+
edsl/jobs/interviews/InterviewStatusDictionary.py,sha256=MSyys4hOWe1d8gfsUvAPbcKrs8YiPnz8jpufBSJL7SU,2485
|
101
|
+
edsl/jobs/interviews/InterviewStatusLog.py,sha256=6u0F8gf5tha39VQL-IK_QPkCsQAYVOx_IesX7TDDX_A,3252
|
102
|
+
edsl/jobs/interviews/InterviewStatusMixin.py,sha256=VV0Pel-crUsLoGpTifeIIkXsLGj0bfuO--UtpRnH-dU,1251
|
103
|
+
edsl/jobs/interviews/ReportErrors.py,sha256=RSzDU2rWwtjfztj7sqaMab0quCiY-X2bG3AEOxhTim8,1745
|
104
|
+
edsl/jobs/interviews/interview_status_enum.py,sha256=KJ-1yLAHdX-p8TiFnM0M3v1tnBwkq4aMCuBX6-ytrI8,229
|
105
|
+
edsl/jobs/runners/JobsRunnerAsyncio.py,sha256=HYCjoxCA4PzKDlTaQYsSDJGiIQeP4YxkamRfR9YHsqw,12086
|
106
|
+
edsl/jobs/runners/JobsRunnerStatus.py,sha256=Rhy3Jfa0VK9QqtwtVzX5sF-9Zyg139OeuM-r4psl2UM,12054
|
107
|
+
edsl/jobs/runners/JobsRunnerStatusData.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
108
|
+
edsl/jobs/tasks/QuestionTaskCreator.py,sha256=8d-rduM4i2Zpd66_NeMkHvkQLhV7SQjLIks2A_nKRoM,10655
|
109
|
+
edsl/jobs/tasks/TaskCreators.py,sha256=XqAbNU33378Z4PQncokbfJwnKt3KHR9aqa5fKYRDpfg,2694
|
110
|
+
edsl/jobs/tasks/TaskHistory.py,sha256=xRSo22ipyUSJ15w_k2Jc3dZ04VLwft8zfvm3smAIYrA,14227
|
111
|
+
edsl/jobs/tasks/TaskStatusLog.py,sha256=bqH36a32F12fjX-M-4lNOhHaK2-WLFzKE-r0PxZPRjI,546
|
112
|
+
edsl/jobs/tasks/task_management.py,sha256=KMToZuXzMlnHRHUF_VHL0-lHMTGhklf2GHVuwEEHtzA,301
|
113
|
+
edsl/jobs/tasks/task_status_enum.py,sha256=DOyrz61YlIS8R1W7izJNphcLrJ7I_ReUlfdRmk23h0Q,5333
|
114
|
+
edsl/jobs/tokens/InterviewTokenUsage.py,sha256=u_6-IHpGFwZ6qMEXr24-jyLVUSSp4dSs_4iAZsBv7O4,1100
|
115
|
+
edsl/jobs/tokens/TokenUsage.py,sha256=odj2-wDNEbHl9noyFAQ0DSKV0D9cv3aDOpmXufKZ8O4,1323
|
116
|
+
edsl/language_models/LanguageModel.py,sha256=r80s-9P7icYDz7yABCdfl78vTv-SDF1qlWCJHXb9RiU,25102
|
117
|
+
edsl/language_models/ModelList.py,sha256=GhjRV7y1jRvP_Yjgwv6fxksTVb8sFPBiiRRfdqW-hgg,2852
|
118
|
+
edsl/language_models/RegisterLanguageModelsMeta.py,sha256=eMtBSAnlRnC4c-0_o2QkSNyzv-uAce4BEGMXq2PLj2E,7523
|
119
|
+
edsl/language_models/__init__.py,sha256=bvY7Gy6VkX1gSbNkRbGPS-M1kUnb0EohL0FSagaEaTs,109
|
120
|
+
edsl/language_models/fake_openai_call.py,sha256=dxbL5e4NLF-eTk9IduPyGwLiVCX_-eGCJDaLYPlQTqc,364
|
121
|
+
edsl/language_models/fake_openai_service.py,sha256=2AAsAinELbMZRqiepwBkWhWcLuMe5ORXUBNarrdl1ug,1714
|
122
|
+
edsl/language_models/registry.py,sha256=hfOlKbTkXrXGpZHQQPKE9uyyUCgOxoUyyIaKL2kf53U,4369
|
123
|
+
edsl/language_models/repair.py,sha256=d0i2S3kJfX7JtuCYhlIyT0QP8hcZkRPLanC09lOW_xo,5353
|
124
|
+
edsl/language_models/unused/ReplicateBase.py,sha256=J1oqf7mEyyKhRwNUomnptVqAsVFYCbS3iTW0EXpKtXo,3331
|
125
|
+
edsl/language_models/utilities.py,sha256=iPnzYfN-Qxc-iYmwf-JPA0zr6ZGnRDHmudI_y4OSRdk,2187
|
126
|
+
edsl/notebooks/Notebook.py,sha256=xi9xkxmkQ6-DwhqbjjMLpYKB0VJV20AtwEonJ6mnqjo,7739
|
127
|
+
edsl/notebooks/__init__.py,sha256=VNUA3nNq04slWNbYaNrzOhQJu3AZANpvBniyCJSzJ7U,45
|
128
|
+
edsl/prompts/Prompt.py,sha256=KsIz0tZnIqZlnbzNWO57C3MwJ0OCcUrZPmu7DBApc4s,11887
|
129
|
+
edsl/prompts/QuestionInstructionsBase.py,sha256=xico6ob4cqWsHl-txj2RbY_4Ny5u9UqvIjmoTVgjUhk,348
|
130
|
+
edsl/prompts/__init__.py,sha256=Z0ywyJfnV0i-sR1SCdK4mHhgECT5cXpHVA-pKuBTifc,85
|
131
|
+
edsl/prompts/library/agent_instructions.py,sha256=_2kCDYvh3ZOF72VvcIH5jhmHjM6AAgQdkWrHvR52Yhg,1100
|
132
|
+
edsl/prompts/library/agent_persona.py,sha256=jEl1LjlOP67vOPiRW0S_-TRMz3n6Tp3mPRvltM2r2_k,516
|
133
|
+
edsl/prompts/library/question_budget.py,sha256=RAc7pmQRbs_-xksU52yYl8iqJ7HejPY4sQOlCSQLGWs,1190
|
134
|
+
edsl/prompts/library/question_checkbox.py,sha256=NIGcdnfkJ8_XbGsdq9toeWA_phQVx5FIBOAe0mReXJw,1462
|
135
|
+
edsl/prompts/library/question_extract.py,sha256=QxNiNBjUk25Ss_Pax0iDgmgTYXEycpWJk2z0evmqsP0,775
|
136
|
+
edsl/prompts/library/question_freetext.py,sha256=_I7hcniRfVwmZr2wXAasfbZ0GTu41ZIKfcoixGhzZUI,510
|
137
|
+
edsl/prompts/library/question_linear_scale.py,sha256=sQpgjSvqJU-uQti-DCxOzLzj05ENkpyxmH-qTFq39x0,778
|
138
|
+
edsl/prompts/library/question_list.py,sha256=KYi3gtcWyDzRLyAb2-k7C-QJ9TAfbLGPkWVvVmdT6xg,731
|
139
|
+
edsl/prompts/library/question_multiple_choice.py,sha256=_2LUM9bOInODoFyaTrKfMkcb5Z7RDj_odq5iAnD7KVQ,1617
|
140
|
+
edsl/prompts/library/question_numerical.py,sha256=ZdWnDbTU0gQdMMqcWHw_eIHEZkJ_kuE-XWrnCYFR07w,1456
|
141
|
+
edsl/prompts/library/question_rank.py,sha256=WDgXyph0EKWJrSgsW2eqcx3xdU-WA1LEvB2jvQFOQ8s,882
|
142
|
+
edsl/prompts/prompt_config.py,sha256=O3Y5EvBsCeKs9m9IjXiRXOcHWlWvQV0yqsNb2oSR1ow,974
|
143
|
+
edsl/prompts/registry.py,sha256=XOsqGsvNOmIG83jqoszqI72yNZkkszKR4FrEhwSzj_Q,8093
|
144
|
+
edsl/questions/AnswerValidatorMixin.py,sha256=t_ABep50KP02GSc48Y8VAEjp35drVOngfrWXU5aVhgk,11505
|
145
|
+
edsl/questions/QuestionBase.py,sha256=sYguFP9kb7j_cJ-B-_1WLuroYZhh87esbNb8gsqx3Fw,20893
|
146
|
+
edsl/questions/QuestionBaseGenMixin.py,sha256=v5oquCGPDKklLTlMStrnqeTU5PaFFl98tFkZJCQmLEo,5006
|
147
|
+
edsl/questions/QuestionBasePromptsMixin.py,sha256=Km1P6PpkVJ9O3dS8pJZHNJ6aQABhYGLwdef4Z2vSrqk,9516
|
148
|
+
edsl/questions/QuestionBudget.py,sha256=TJgPsyqafJdJw5if0zVxh7zHloourINUqUWfWIlRq9Y,8131
|
149
|
+
edsl/questions/QuestionCheckBox.py,sha256=TJjmrjbRYmRX4ZNoGpkgLdasWcWavl9uvJDV6AZ5fz0,12835
|
150
|
+
edsl/questions/QuestionExtract.py,sha256=PlXwMeZgPAFBXIHSXpFMYTToag-HwA9C7u6-Z3bQMek,6103
|
151
|
+
edsl/questions/QuestionFreeText.py,sha256=uXJxrrAGCq0-J6WpO6TBNFBNOC2ztoEVa-2UMXuwlak,3384
|
152
|
+
edsl/questions/QuestionFunctional.py,sha256=yZQFLQAxfNsAIETffFoBr-Ltb2oFPeywu-nhm9qjYRc,5133
|
153
|
+
edsl/questions/QuestionList.py,sha256=vs2AE8OnbwVsly-sorb9dfIibdF1BpOaCRYyvwXYSzY,7209
|
154
|
+
edsl/questions/QuestionMultipleChoice.py,sha256=4EP41aB5_WXo0KwT8NEvEfMD4ro2zHUXR7l0MaJNa0A,10072
|
155
|
+
edsl/questions/QuestionNumerical.py,sha256=_jMZ28DZHYAv_g3Y3vCnmzerMs995on0Ng6j4pDcfHo,4959
|
156
|
+
edsl/questions/QuestionRank.py,sha256=kYHTYXU88X2Uv-zeCiI9w5aEFYTxvg2p7DoGaaER4ik,11596
|
157
|
+
edsl/questions/Quick.py,sha256=h6h4fEvIkLIFJX2JiqfOUEXzku9azWxEpI5o2A4RmVs,1731
|
158
|
+
edsl/questions/RegisterQuestionsMeta.py,sha256=2h_9iZt3cjr_7JRmveTqbmEBBCvjtefMDfhM7Pgd_zg,2598
|
159
|
+
edsl/questions/ResponseValidatorABC.py,sha256=TN0AMbPo2mc4_XP0r6BY-5YBZ0ZEyvInHFgMp4citbY,6033
|
160
|
+
edsl/questions/SimpleAskMixin.py,sha256=YRLiHA6TPMKyLWvdAi7Mfnxcqtw7Kem6tH28YNb8n4U,2227
|
161
|
+
edsl/questions/__init__.py,sha256=PYChrB0dHhHAKsL3QUqYa3_ZBgxHmR9bs67pUE9h0Eg,1161
|
162
|
+
edsl/questions/compose_questions.py,sha256=ZcLkwNaofk-o0-skGXEDGZAj6DumOhVhyIUjqEnKrbg,3380
|
163
|
+
edsl/questions/decorators.py,sha256=ZijaRYUntAcg0JEztCiOEpcDvvVie___85Zx5ogBQXY,596
|
164
|
+
edsl/questions/derived/QuestionLikertFive.py,sha256=XCpmwlk2qyCxEkiG3UwPqVpS5-k4d4uWyMaxfJg5wkw,2585
|
165
|
+
edsl/questions/derived/QuestionLinearScale.py,sha256=tj_RszK9WumaKRVMS1Fy63-Q6ip4FGBpNU2AtQrWlp8,3304
|
166
|
+
edsl/questions/derived/QuestionTopK.py,sha256=HT8NlbT8YBTmVNVPVIP1EyqGsiN3bu4SbFp29CVT0a4,3212
|
167
|
+
edsl/questions/derived/QuestionYesNo.py,sha256=KWJyaXSNPNxELtK0nWvIqNtpAF05MMAC0ILUjxXkVwo,2735
|
168
|
+
edsl/questions/derived/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
169
|
+
edsl/questions/descriptors.py,sha256=48Hin8AEZVRltIV37TjGtKI0xyoD0C0pjK51UVkJnxA,16365
|
170
|
+
edsl/questions/prompt_templates/question_budget.jinja,sha256=-ekZYCa_KRc-xLcpf3j-YmXV0WSyIK_laOp2x3li-tA,737
|
171
|
+
edsl/questions/prompt_templates/question_checkbox.jinja,sha256=V-Dn2VJhfXyIILWIhMviTfQ5WuXh1YZerwicaA6Okzc,1136
|
172
|
+
edsl/questions/prompt_templates/question_extract.jinja,sha256=27b8iMJaA2h5UOrHPMiBCapMnJou4vSkZzkZndK2s1U,343
|
173
|
+
edsl/questions/prompt_templates/question_free_text.jinja,sha256=lU95cakq5xS-1h57WsudJLd6hXrJfRmMdxIGgh1avw8,102
|
174
|
+
edsl/questions/prompt_templates/question_linear_scale.jinja,sha256=VB9bFPeLGGb5aiFD8zWIfwWeCxJzWmcYDki0MCoWDWk,455
|
175
|
+
edsl/questions/prompt_templates/question_list.jinja,sha256=MAkNv88E79jXK9TxKdnf5KgA77CWz9vXc2TZm2r-g-A,495
|
176
|
+
edsl/questions/prompt_templates/question_multiple_choice.jinja,sha256=sSyAhnexZF6oWqHL-45r7o69vrFcCbbYXLZ3zu7q76U,761
|
177
|
+
edsl/questions/prompt_templates/question_numerical.jinja,sha256=c20sp3HfFonfaRwwmnF7HjAEugU15QlgpNAIkNHasl0,1218
|
178
|
+
edsl/questions/question_registry.py,sha256=sDr909j6jEulK_uXPuvgvYVytPsrpZz_eqKvG0rsbMo,5365
|
179
|
+
edsl/questions/settings.py,sha256=er_z0ZW_dgmC5CHLWkaqBJiuWgAYzIund85M5YZFQAI,291
|
180
|
+
edsl/questions/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
181
|
+
edsl/questions/templates/budget/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
182
|
+
edsl/questions/templates/budget/answering_instructions.jinja,sha256=tF3bNv9_vIOjsWeZeRsMdgprpNrAKhUreQ53LUh1DP4,352
|
183
|
+
edsl/questions/templates/budget/question_presentation.jinja,sha256=wrZnM5ZbNhPZsvbtflfKrYpR3lH5ELDI7NM2l8pW8Ro,198
|
184
|
+
edsl/questions/templates/checkbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
185
|
+
edsl/questions/templates/checkbox/answering_instructions.jinja,sha256=UCPWWsnaAW3oB05IZDLQtofHXBesbqQxguXMfykUTQU,441
|
186
|
+
edsl/questions/templates/checkbox/question_presentation.jinja,sha256=2u8XIkFPWzOuhbeoIvYBm6zUWnTHF66cGJXIznxVobw,807
|
187
|
+
edsl/questions/templates/extract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
188
|
+
edsl/questions/templates/extract/answering_instructions.jinja,sha256=sjHH4mBdoi6fdpHtRNWG0q3E4ZihvBpVUf08TNnwad4,253
|
189
|
+
edsl/questions/templates/extract/question_presentation.jinja,sha256=OLDuxUc6BjT4InCtAkK_e-D5qbsDmtxw1Spp9pWFYhU,17
|
190
|
+
edsl/questions/templates/free_text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
191
|
+
edsl/questions/templates/free_text/answering_instructions.jinja,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
192
|
+
edsl/questions/templates/free_text/question_presentation.jinja,sha256=OLDuxUc6BjT4InCtAkK_e-D5qbsDmtxw1Spp9pWFYhU,17
|
193
|
+
edsl/questions/templates/likert_five/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
194
|
+
edsl/questions/templates/likert_five/answering_instructions.jinja,sha256=DK37QaSfUdXu9JZKu3RYXl1yi4Hg2kfKfCb3CRHITII,331
|
195
|
+
edsl/questions/templates/likert_five/question_presentation.jinja,sha256=hoEVj4GQD3EYnR2AStXkMFOJeqISNoEVzBd8-cx2yWg,273
|
196
|
+
edsl/questions/templates/linear_scale/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
197
|
+
edsl/questions/templates/linear_scale/answering_instructions.jinja,sha256=reWlNj1ObkpZTuFXlqk_dF92hPgC74ATziBv5b9KobE,253
|
198
|
+
edsl/questions/templates/linear_scale/question_presentation.jinja,sha256=32E7yJcxHd3yn-QG_bq47VJBiB0xqbxMK8TXJw-Obcs,148
|
199
|
+
edsl/questions/templates/list/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
200
|
+
edsl/questions/templates/list/answering_instructions.jinja,sha256=hhWiozX4Sqf7n9NrV52sripxM2ZTrDz74axLDl6s6tE,265
|
201
|
+
edsl/questions/templates/list/question_presentation.jinja,sha256=ZEOZr_SpQ0V8qKKjFlyVlIQr_nAU_zosSsXyidEV_yE,131
|
202
|
+
edsl/questions/templates/multiple_choice/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
203
|
+
edsl/questions/templates/multiple_choice/answering_instructions.jinja,sha256=eScbqZtrNDOX4IlZzP0HMA7Cj-x-fT9UpyQKrPgiif4,330
|
204
|
+
edsl/questions/templates/multiple_choice/html.jinja,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
205
|
+
edsl/questions/templates/multiple_choice/question_presentation.jinja,sha256=hoEVj4GQD3EYnR2AStXkMFOJeqISNoEVzBd8-cx2yWg,273
|
206
|
+
edsl/questions/templates/numerical/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
207
|
+
edsl/questions/templates/numerical/answering_instructions.jinja,sha256=BfGAeKFJWEzzvB91x8DrpRUERSvDv6kXf3Y0szL27LY,373
|
208
|
+
edsl/questions/templates/numerical/question_presentation.jinja,sha256=8lMUWtEPHD4XOAyVEfCmWSwRFrdUa3lo8sxzogDyzWE,183
|
209
|
+
edsl/questions/templates/rank/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
210
|
+
edsl/questions/templates/rank/answering_instructions.jinja,sha256=-LWrhVJ0ZwQW_DXhARh5GweqlarWbhZzoqwr6tE-33s,433
|
211
|
+
edsl/questions/templates/rank/question_presentation.jinja,sha256=9Vbm88_nDl5Xnb09V4QEw6jTp-ryXBoJV6DCFDMyPI4,334
|
212
|
+
edsl/questions/templates/top_k/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
213
|
+
edsl/questions/templates/top_k/answering_instructions.jinja,sha256=2V38SJZ0Y1E70mHm0HJUzGKregiSlEqVYIcqbncxh5c,266
|
214
|
+
edsl/questions/templates/top_k/question_presentation.jinja,sha256=2u8XIkFPWzOuhbeoIvYBm6zUWnTHF66cGJXIznxVobw,807
|
215
|
+
edsl/questions/templates/yes_no/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
216
|
+
edsl/questions/templates/yes_no/answering_instructions.jinja,sha256=aJVZ_SDdN4SkcHr4KtPU9YwCKZLL1_XtUVqEjiRyn0o,171
|
217
|
+
edsl/questions/templates/yes_no/question_presentation.jinja,sha256=hoEVj4GQD3EYnR2AStXkMFOJeqISNoEVzBd8-cx2yWg,273
|
218
|
+
edsl/results/Dataset.py,sha256=XeCWNcni1rde9iVzmC1WTIne2cip4-f2gQL5iaJfXNw,9202
|
219
|
+
edsl/results/DatasetExportMixin.py,sha256=-YR-UeuIW_8u0a8HnQ9R6V41DxCq22_AlsD48fXv0sw,25890
|
220
|
+
edsl/results/DatasetTree.py,sha256=nwEgnWBqRXUxagSCEgqwikmIo8ztUxaF-QH-m-8myyQ,4985
|
221
|
+
edsl/results/Result.py,sha256=o3Tg07loDcwNTb6wPgV_qS7_REkwcMVouc9t_-zwkpw,15469
|
222
|
+
edsl/results/Results.py,sha256=zp4yDt-rPqgEPpv2xCGppQIzzwiKX-BbUpnJtY739L4,40807
|
223
|
+
edsl/results/ResultsDBMixin.py,sha256=Hc08aOiArBf9jbxI5uV4VL4wT6BLOkaaEgTMb3zyTUI,7922
|
224
|
+
edsl/results/ResultsExportMixin.py,sha256=XizBsPNxziyffirMA4kS7UHpYM1WIE4s1K-B7TqTfDw,1266
|
225
|
+
edsl/results/ResultsFetchMixin.py,sha256=VEa0TKDcXbnTinSKs9YaE4WjOSLmlp9Po1_9kklFvSo,848
|
226
|
+
edsl/results/ResultsGGMixin.py,sha256=SAYz8p4wb1g8x6KhBVz9NHOGib2c2XsqtTclpADrFeM,4344
|
227
|
+
edsl/results/ResultsToolsMixin.py,sha256=mseEFxJCf9sjXdIxpjITt_UZBwdXxw2o2VLg5jMrALA,3017
|
228
|
+
edsl/results/Selector.py,sha256=4AsFD71FKTFY1a0_AImsYWcYKx-RXPG6RgwsAvuNW3k,4403
|
229
|
+
edsl/results/__init__.py,sha256=2YcyiVtXi-3vIV0ZzOy1PqBLm2gaziufJVi4fdNrAt8,80
|
230
|
+
edsl/results/tree_explore.py,sha256=hQjiO4E71rIOPDgEHgK8T8ukxqoNdgX_tvyiDlG4_9U,4624
|
231
|
+
edsl/scenarios/FileStore.py,sha256=87WVSU-MFRj2iPAH9-ffvYiD3ycSqxhumhCGcY7IJes,10391
|
232
|
+
edsl/scenarios/Scenario.py,sha256=UdfmjJpm2cTLNza7EhYZtIhEtMO20ZzUD5mQOv_X0lI,17543
|
233
|
+
edsl/scenarios/ScenarioHtmlMixin.py,sha256=EmugmbPJYW5eZS30rM6pDMDQD9yrrvHjmgZWB1qBfq4,1882
|
234
|
+
edsl/scenarios/ScenarioImageMixin.py,sha256=EpUoFa5gFrB8NlLB9m8dX2uEQfGd9KVFXT9ynyVx6XA,3468
|
235
|
+
edsl/scenarios/ScenarioList.py,sha256=2sTTV4i0XTijItuODNhIBbC2mVwpREY2LMct73UALOE,40506
|
236
|
+
edsl/scenarios/ScenarioListExportMixin.py,sha256=wfffY9xy_1QyIM-1xnisr64izSLjmyuotUYY5iDLodc,1681
|
237
|
+
edsl/scenarios/ScenarioListPdfMixin.py,sha256=z_H2sZn5SCSq6nRLSU5jefaOlh4sqJLyOY_Ld0XCR18,8332
|
238
|
+
edsl/scenarios/__init__.py,sha256=KRwZCLf2R0qyJvv1NGbd8M51Bt6Ia6Iylg-Xq_2Fa6M,98
|
239
|
+
edsl/shared.py,sha256=lgLa-mCk2flIhxXarXLtfXZjXG_6XHhC2A3O8yRTjXc,20
|
240
|
+
edsl/study/ObjectEntry.py,sha256=e3xRPH8wCN8Pum5HZsQRYgnSoauSvjXunIEH79wu5A8,5788
|
241
|
+
edsl/study/ProofOfWork.py,sha256=FaqYtLgeiTEQXWKukPgPUTWMcIN5t1FR7h7Re8QEtgc,3433
|
242
|
+
edsl/study/SnapShot.py,sha256=BY9NP_HRTuOSvCncuE-q5OwMcTEtnBS8bFn_PhF7OcU,2678
|
243
|
+
edsl/study/Study.py,sha256=Ytm15XIWgT716scM3HKFSfdBHxRwX6mfMn3l8dgdY1c,18462
|
244
|
+
edsl/study/__init__.py,sha256=YAvPLTPG3hK_eN9Ar3d1_d-E3laXpSya879A25-JAxU,170
|
245
|
+
edsl/surveys/DAG.py,sha256=ozQuHo9ZQ8Eet5nDXtp7rFpiSocvvfxIHtyTnztvodg,2380
|
246
|
+
edsl/surveys/Memory.py,sha256=-ikOtkkQldGB_BkPCW3o7AYwV5B_pIwlREw7aVCSHaQ,1113
|
247
|
+
edsl/surveys/MemoryPlan.py,sha256=BeLuqS5Q8G2jSluHYFCAxVmj7cNPK-rDQ3mUsuDjikQ,7979
|
248
|
+
edsl/surveys/Rule.py,sha256=BWWz3IYN10t2TAO1uch2p9DQM13kPozCJr-ywZN0_LU,11399
|
249
|
+
edsl/surveys/RuleCollection.py,sha256=amnyDclcBoaoSVgZ33Okx_GOli3mw5QCkvDmisrMvxg,14091
|
250
|
+
edsl/surveys/Survey.py,sha256=yBYvCUllH0fxR2F_SxKH8EACPsfZhUT-UeOA9ZJigoA,65263
|
251
|
+
edsl/surveys/SurveyCSS.py,sha256=NjJezs2sTlgFprN6IukjGKwNYmNdXnLjzV2w5K4z4RI,8415
|
252
|
+
edsl/surveys/SurveyExportMixin.py,sha256=Kvkd2ku2Kemsn2Nw-Yt8GTnGFcUqfEiKznmisAeO7ck,8339
|
253
|
+
edsl/surveys/SurveyFlowVisualizationMixin.py,sha256=dEG_f-L0ZAyWU5Ta584IX5GZurjVt1tbIISo5z61Jvg,4004
|
254
|
+
edsl/surveys/SurveyQualtricsImport.py,sha256=SSZv53D1zVhQSfSw-X0_cte0QnkWhE9v922wLn6RMkI,9771
|
255
|
+
edsl/surveys/__init__.py,sha256=vjMYVlP95fHVqqw2FfKXRuYbTArZkZr1nK4FnXzZWzs,129
|
256
|
+
edsl/surveys/base.py,sha256=n5PBx0BF0powzBXCsufpUekfNK_9huf3rohtU1mMCq0,1001
|
257
|
+
edsl/surveys/descriptors.py,sha256=3B-hBVvGpLlVBCyOnPuxkLjesvpr0QIuATbggp_MJ7o,2076
|
258
|
+
edsl/surveys/instructions/ChangeInstruction.py,sha256=XDLuI5nVI60iJz1w1kLaKmYryAYE0XIyRbElBtNjVVM,1265
|
259
|
+
edsl/surveys/instructions/Instruction.py,sha256=WaTGihAQ6lCtm5W4vknTamkPzDp-eIAirdtGV37fdbc,925
|
260
|
+
edsl/surveys/instructions/InstructionCollection.py,sha256=eO-i9zgbk8q0D8hnawDrioS-iqXOEE7eKm5cgYNgwrU,2931
|
261
|
+
edsl/surveys/instructions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
262
|
+
edsl/templates/error_reporting/base.html,sha256=IkV24ZaUCNX303ZqVTWkFsJOnu5BG_SULrKN2YejUxQ,552
|
263
|
+
edsl/templates/error_reporting/exceptions_by_model.html,sha256=7uAWGfhUMey-29Vh6YkN_Qx1lfhC92fsTMxJEVXWPDs,792
|
264
|
+
edsl/templates/error_reporting/exceptions_by_question_name.html,sha256=_q6hSwtO_WhjXLZNLZhRj-qbPzStqYSzT0iECKUAFlg,454
|
265
|
+
edsl/templates/error_reporting/exceptions_by_type.html,sha256=TVsNCAz_G53LSZ-YslM51TUsbwtw7wzCqPwVYO6TVEw,415
|
266
|
+
edsl/templates/error_reporting/interview_details.html,sha256=_3AZfDu7ZOrZZPQAE-odcSRkv7QuOPZQTsiK97MDY6g,4043
|
267
|
+
edsl/templates/error_reporting/interviews.html,sha256=jaPrrtUGs8Rs26H3k1QLqNRpIGAZEWrJR4OF83gDCj8,393
|
268
|
+
edsl/templates/error_reporting/overview.html,sha256=1oTYQpi03OnguG-iudO8FZC7mwR6GryeslDbl0w9ksw,405
|
269
|
+
edsl/templates/error_reporting/performance_plot.html,sha256=NTXFj51VEwew59gLzbR83Lybh88WmFR-fhxm5rmz0Ms,53
|
270
|
+
edsl/templates/error_reporting/report.css,sha256=e0kM4z4fF3xrKIJbbhvrzzh8gMJ8LD7rDu0ut63kg8c,1209
|
271
|
+
edsl/templates/error_reporting/report.html,sha256=ipJq27CTUx22IopZ5N37P2Cw1L6rKYtOLQc-TfxJ6wg,4514
|
272
|
+
edsl/templates/error_reporting/report.js,sha256=PtF1N68RmSYB2OG-6ymO14-LcX7LUZTnUDFX0dN6xW4,957
|
273
|
+
edsl/tools/__init__.py,sha256=4iRiX1K0Yh8RGwlUBuzipvFfRrofKqCRQ0SzNK_2oiQ,41
|
274
|
+
edsl/tools/clusters.py,sha256=uvDN76bfHIHS-ykB2iioXu0gKeP_UyD7Q9ee67w_fV4,6132
|
275
|
+
edsl/tools/embeddings.py,sha256=-mHqApiFbGzj_2Cr_VVl_7XiBBDyPB5-6ZO7IsXvaig,677
|
276
|
+
edsl/tools/embeddings_plotting.py,sha256=fznAqLnjF_K8PkJy1C4hBRObm3f8ebDIxQzrqRXlEJM,3564
|
277
|
+
edsl/tools/plotting.py,sha256=DbVNlm8rNCnWHXi5wDPnOviZ1Qxz-rHvtQM1zHWw1f8,3120
|
278
|
+
edsl/tools/summarize.py,sha256=YcdB0IjZn92qv2zVJuxsHfXou810APWYKeaHknsATqM,656
|
279
|
+
edsl/utilities/SystemInfo.py,sha256=qTP_aKwECPxtTnbEjJ7F1QqKU9U3rcEEbppg2ilQGuY,792
|
280
|
+
edsl/utilities/__init__.py,sha256=oUWx_h-8OFb1Of2SgIQZuIu7hX_bhDuwCSwksKGWZ6k,544
|
281
|
+
edsl/utilities/ast_utilities.py,sha256=49KDDu-PHYpzDN5cCaDf-ReQH-1dzjT5EG3WVSa8THk,868
|
282
|
+
edsl/utilities/data/Registry.py,sha256=q2DKc7CpG_7l47MxxsSi6DJOs4p1Z3qNx7PV-v8CUOE,176
|
283
|
+
edsl/utilities/data/__init__.py,sha256=pDjGnzC11q4Za8qX5zcg6plcQ_8Qjpb-sAKPwOlKmCY,62
|
284
|
+
edsl/utilities/data/scooter_results.json,sha256=tRtVAI5haLMh_-wjz9it_uk_I1bGe5qdFHsIRQMi_ks,250944
|
285
|
+
edsl/utilities/decorators.py,sha256=rlTSMItwmWUxHQBIEUDxX3lFzgtiT8PnfNavakuf-2M,2319
|
286
|
+
edsl/utilities/gcp_bucket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
287
|
+
edsl/utilities/gcp_bucket/cloud_storage.py,sha256=dStHsG181YP9ALW-bkyO-sgMWuLV5aaLsnsCOVD8jJw,3472
|
288
|
+
edsl/utilities/interface.py,sha256=AaKpWiwWBwP2swNXmnFlIf3ZFsjfsR5bjXQAW47tD-8,19656
|
289
|
+
edsl/utilities/repair_functions.py,sha256=tftmklAqam6LOQQu_-9U44N-llycffhW8LfO63vBmNw,929
|
290
|
+
edsl/utilities/restricted_python.py,sha256=5-_zUhrNbos7pLhDl9nr8d24auRlquR6w-vKkmNjPiA,2060
|
291
|
+
edsl/utilities/utilities.py,sha256=gqMtWWNEZkWLiRR9vHW-VRNy2bStEPlJ-I2aK9CwFiQ,11367
|
292
|
+
edsl-0.1.33.dist-info/LICENSE,sha256=_qszBDs8KHShVYcYzdMz3HNMtH-fKN_p5zjoVAVumFc,1111
|
293
|
+
edsl-0.1.33.dist-info/METADATA,sha256=_xtuFGrDVyHDkn9SX64MORBPrdJbZtWfPsE2ptQzEN4,4419
|
294
|
+
edsl-0.1.33.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
295
|
+
edsl-0.1.33.dist-info/RECORD,,
|
@@ -1,271 +0,0 @@
|
|
1
|
-
"""This module contains the Interview class, which is responsible for conducting an interview asynchronously."""
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
import asyncio
|
5
|
-
import time
|
6
|
-
import traceback
|
7
|
-
from typing import Generator, Union
|
8
|
-
|
9
|
-
from edsl import CONFIG
|
10
|
-
from edsl.exceptions import InterviewTimeoutError
|
11
|
-
|
12
|
-
# from edsl.questions.QuestionBase import QuestionBase
|
13
|
-
from edsl.surveys.base import EndOfSurvey
|
14
|
-
from edsl.jobs.buckets.ModelBuckets import ModelBuckets
|
15
|
-
from edsl.jobs.interviews.interview_exception_tracking import InterviewExceptionEntry
|
16
|
-
from edsl.jobs.interviews.retry_management import retry_strategy
|
17
|
-
from edsl.jobs.tasks.task_status_enum import TaskStatus
|
18
|
-
from edsl.jobs.tasks.QuestionTaskCreator import QuestionTaskCreator
|
19
|
-
|
20
|
-
# from edsl.agents.InvigilatorBase import InvigilatorBase
|
21
|
-
|
22
|
-
TIMEOUT = float(CONFIG.get("EDSL_API_TIMEOUT"))
|
23
|
-
|
24
|
-
|
25
|
-
class InterviewTaskBuildingMixin:
|
26
|
-
def _build_invigilators(
|
27
|
-
self, debug: bool
|
28
|
-
) -> Generator["InvigilatorBase", None, None]:
|
29
|
-
"""Create an invigilator for each question.
|
30
|
-
|
31
|
-
:param debug: whether to use debug mode, in which case `InvigilatorDebug` is used.
|
32
|
-
|
33
|
-
An invigilator is responsible for answering a particular question in the survey.
|
34
|
-
"""
|
35
|
-
for question in self.survey.questions:
|
36
|
-
yield self._get_invigilator(question=question, debug=debug)
|
37
|
-
|
38
|
-
def _get_invigilator(self, question: "QuestionBase", debug: bool) -> "Invigilator":
|
39
|
-
"""Return an invigilator for the given question.
|
40
|
-
|
41
|
-
:param question: the question to be answered
|
42
|
-
:param debug: whether to use debug mode, in which case `InvigilatorDebug` is used.
|
43
|
-
"""
|
44
|
-
invigilator = self.agent.create_invigilator(
|
45
|
-
question=question,
|
46
|
-
scenario=self.scenario,
|
47
|
-
model=self.model,
|
48
|
-
debug=debug,
|
49
|
-
survey=self.survey,
|
50
|
-
memory_plan=self.survey.memory_plan,
|
51
|
-
current_answers=self.answers,
|
52
|
-
iteration=self.iteration,
|
53
|
-
cache=self.cache,
|
54
|
-
sidecar_model=self.sidecar_model,
|
55
|
-
)
|
56
|
-
"""Return an invigilator for the given question."""
|
57
|
-
return invigilator
|
58
|
-
|
59
|
-
def _build_question_tasks(
|
60
|
-
self,
|
61
|
-
debug: bool,
|
62
|
-
model_buckets: ModelBuckets,
|
63
|
-
) -> list[asyncio.Task]:
|
64
|
-
"""Create a task for each question, with dependencies on the questions that must be answered before this one can be answered.
|
65
|
-
|
66
|
-
:param debug: whether to use debug mode, in which case `InvigilatorDebug` is used.
|
67
|
-
:param model_buckets: the model buckets used to track and control usage rates.
|
68
|
-
"""
|
69
|
-
tasks = []
|
70
|
-
for question in self.survey.questions:
|
71
|
-
tasks_that_must_be_completed_before = list(
|
72
|
-
self._get_tasks_that_must_be_completed_before(
|
73
|
-
tasks=tasks, question=question
|
74
|
-
)
|
75
|
-
)
|
76
|
-
question_task = self._create_question_task(
|
77
|
-
question=question,
|
78
|
-
tasks_that_must_be_completed_before=tasks_that_must_be_completed_before,
|
79
|
-
model_buckets=model_buckets,
|
80
|
-
debug=debug,
|
81
|
-
iteration=self.iteration,
|
82
|
-
)
|
83
|
-
tasks.append(question_task)
|
84
|
-
return tuple(tasks) # , invigilators
|
85
|
-
|
86
|
-
def _get_tasks_that_must_be_completed_before(
|
87
|
-
self, *, tasks: list[asyncio.Task], question: "QuestionBase"
|
88
|
-
) -> Generator[asyncio.Task, None, None]:
|
89
|
-
"""Return the tasks that must be completed before the given question can be answered.
|
90
|
-
|
91
|
-
:param tasks: a list of tasks that have been created so far.
|
92
|
-
:param question: the question for which we are determining dependencies.
|
93
|
-
|
94
|
-
If a question has no dependencies, this will be an empty list, [].
|
95
|
-
"""
|
96
|
-
parents_of_focal_question = self.dag.get(question.question_name, [])
|
97
|
-
for parent_question_name in parents_of_focal_question:
|
98
|
-
yield tasks[self.to_index[parent_question_name]]
|
99
|
-
|
100
|
-
def _create_question_task(
|
101
|
-
self,
|
102
|
-
*,
|
103
|
-
question: "QuestionBase",
|
104
|
-
tasks_that_must_be_completed_before: list[asyncio.Task],
|
105
|
-
model_buckets: ModelBuckets,
|
106
|
-
debug: bool,
|
107
|
-
iteration: int = 0,
|
108
|
-
) -> asyncio.Task:
|
109
|
-
"""Create a task that depends on the passed-in dependencies that are awaited before the task is run.
|
110
|
-
|
111
|
-
:param question: the question to be answered. This is the question we are creating a task for.
|
112
|
-
:param tasks_that_must_be_completed_before: the tasks that must be completed before the focal task is run.
|
113
|
-
:param model_buckets: the model buckets used to track and control usage rates.
|
114
|
-
:param debug: whether to use debug mode, in which case `InvigilatorDebug` is used.
|
115
|
-
:param iteration: the iteration number for the interview.
|
116
|
-
|
117
|
-
The task is created by a `QuestionTaskCreator`, which is responsible for creating the task and managing its dependencies.
|
118
|
-
It is passed a reference to the function that will be called to answer the question.
|
119
|
-
It is passed a list "tasks_that_must_be_completed_before" that are awaited before the task is run.
|
120
|
-
These are added as a dependency to the focal task.
|
121
|
-
"""
|
122
|
-
task_creator = QuestionTaskCreator(
|
123
|
-
question=question,
|
124
|
-
answer_question_func=self._answer_question_and_record_task,
|
125
|
-
token_estimator=self._get_estimated_request_tokens,
|
126
|
-
model_buckets=model_buckets,
|
127
|
-
iteration=iteration,
|
128
|
-
)
|
129
|
-
for task in tasks_that_must_be_completed_before:
|
130
|
-
task_creator.add_dependency(task)
|
131
|
-
|
132
|
-
self.task_creators.update(
|
133
|
-
{question.question_name: task_creator}
|
134
|
-
) # track this task creator
|
135
|
-
return task_creator.generate_task(debug)
|
136
|
-
|
137
|
-
def _get_estimated_request_tokens(self, question) -> float:
|
138
|
-
"""Estimate the number of tokens that will be required to run the focal task."""
|
139
|
-
invigilator = self._get_invigilator(question=question, debug=False)
|
140
|
-
# TODO: There should be a way to get a more accurate estimate.
|
141
|
-
combined_text = ""
|
142
|
-
for prompt in invigilator.get_prompts().values():
|
143
|
-
if hasattr(prompt, "text"):
|
144
|
-
combined_text += prompt.text
|
145
|
-
elif isinstance(prompt, str):
|
146
|
-
combined_text += prompt
|
147
|
-
else:
|
148
|
-
raise ValueError(f"Prompt is of type {type(prompt)}")
|
149
|
-
return len(combined_text) / 4.0
|
150
|
-
|
151
|
-
@retry_strategy
|
152
|
-
async def _answer_question_and_record_task(
|
153
|
-
self,
|
154
|
-
*,
|
155
|
-
question: "QuestionBase",
|
156
|
-
debug: bool,
|
157
|
-
task=None,
|
158
|
-
) -> "AgentResponseDict":
|
159
|
-
"""Answer a question and records the task.
|
160
|
-
|
161
|
-
This in turn calls the the passed-in agent's async_answer_question method, which returns a response dictionary.
|
162
|
-
Note that is updates answers dictionary with the response.
|
163
|
-
"""
|
164
|
-
from edsl.data_transfer_models import AgentResponseDict
|
165
|
-
|
166
|
-
try:
|
167
|
-
invigilator = self._get_invigilator(question, debug=debug)
|
168
|
-
|
169
|
-
if self._skip_this_question(question):
|
170
|
-
return invigilator.get_failed_task_result()
|
171
|
-
|
172
|
-
response: AgentResponseDict = await self._attempt_to_answer_question(
|
173
|
-
invigilator, task
|
174
|
-
)
|
175
|
-
|
176
|
-
self._add_answer(response=response, question=question)
|
177
|
-
|
178
|
-
self._cancel_skipped_questions(question)
|
179
|
-
return AgentResponseDict(**response)
|
180
|
-
except Exception as e:
|
181
|
-
raise e
|
182
|
-
|
183
|
-
def _add_answer(
|
184
|
-
self, response: "AgentResponseDict", question: "QuestionBase"
|
185
|
-
) -> None:
|
186
|
-
"""Add the answer to the answers dictionary.
|
187
|
-
|
188
|
-
:param response: the response to the question.
|
189
|
-
:param question: the question that was answered.
|
190
|
-
"""
|
191
|
-
self.answers.add_answer(response=response, question=question)
|
192
|
-
|
193
|
-
def _skip_this_question(self, current_question: "QuestionBase") -> bool:
|
194
|
-
"""Determine if the current question should be skipped.
|
195
|
-
|
196
|
-
:param current_question: the question to be answered.
|
197
|
-
"""
|
198
|
-
current_question_index = self.to_index[current_question.question_name]
|
199
|
-
|
200
|
-
answers = self.answers | self.scenario | self.agent["traits"]
|
201
|
-
skip = self.survey.rule_collection.skip_question_before_running(
|
202
|
-
current_question_index, answers
|
203
|
-
)
|
204
|
-
return skip
|
205
|
-
|
206
|
-
async def _attempt_to_answer_question(
|
207
|
-
self, invigilator: 'InvigilatorBase', task: asyncio.Task
|
208
|
-
) -> 'AgentResponseDict':
|
209
|
-
"""Attempt to answer the question, and handle exceptions.
|
210
|
-
|
211
|
-
:param invigilator: the invigilator that will answer the question.
|
212
|
-
:param task: the task that is being run.
|
213
|
-
|
214
|
-
"""
|
215
|
-
try:
|
216
|
-
return await asyncio.wait_for(
|
217
|
-
invigilator.async_answer_question(), timeout=TIMEOUT
|
218
|
-
)
|
219
|
-
except asyncio.TimeoutError as e:
|
220
|
-
exception_entry = InterviewExceptionEntry(
|
221
|
-
exception=repr(e),
|
222
|
-
time=time.time(),
|
223
|
-
traceback=traceback.format_exc(),
|
224
|
-
)
|
225
|
-
if task:
|
226
|
-
task.task_status = TaskStatus.FAILED
|
227
|
-
self.exceptions.add(invigilator.question.question_name, exception_entry)
|
228
|
-
|
229
|
-
raise InterviewTimeoutError(f"Task timed out after {TIMEOUT} seconds.")
|
230
|
-
except Exception as e:
|
231
|
-
exception_entry = InterviewExceptionEntry(
|
232
|
-
exception=repr(e),
|
233
|
-
time=time.time(),
|
234
|
-
traceback=traceback.format_exc(),
|
235
|
-
)
|
236
|
-
if task:
|
237
|
-
task.task_status = TaskStatus.FAILED
|
238
|
-
self.exceptions.add(invigilator.question.question_name, exception_entry)
|
239
|
-
raise e
|
240
|
-
|
241
|
-
def _cancel_skipped_questions(self, current_question: QuestionBase) -> None:
|
242
|
-
"""Cancel the tasks for questions that are skipped.
|
243
|
-
|
244
|
-
:param current_question: the question that was just answered.
|
245
|
-
|
246
|
-
It first determines the next question, given the current question and the current answers.
|
247
|
-
If the next question is the end of the survey, it cancels all remaining tasks.
|
248
|
-
If the next question is after the current question, it cancels all tasks between the current question and the next question.
|
249
|
-
"""
|
250
|
-
current_question_index: int = self.to_index[current_question.question_name]
|
251
|
-
|
252
|
-
next_question: Union[
|
253
|
-
int, EndOfSurvey
|
254
|
-
] = self.survey.rule_collection.next_question(
|
255
|
-
q_now=current_question_index,
|
256
|
-
answers=self.answers | self.scenario | self.agent["traits"],
|
257
|
-
)
|
258
|
-
|
259
|
-
next_question_index = next_question.next_q
|
260
|
-
|
261
|
-
def cancel_between(start, end):
|
262
|
-
"""Cancel the tasks between the start and end indices."""
|
263
|
-
for i in range(start, end):
|
264
|
-
self.tasks[i].cancel()
|
265
|
-
|
266
|
-
if next_question_index == EndOfSurvey:
|
267
|
-
cancel_between(current_question_index + 1, len(self.survey.questions))
|
268
|
-
return
|
269
|
-
|
270
|
-
if next_question_index > (current_question_index + 1):
|
271
|
-
cancel_between(current_question_index + 1, next_question_index)
|
@@ -1,37 +0,0 @@
|
|
1
|
-
from edsl import CONFIG
|
2
|
-
|
3
|
-
from tenacity import (
|
4
|
-
retry,
|
5
|
-
wait_exponential,
|
6
|
-
stop_after_attempt,
|
7
|
-
retry_if_exception_type,
|
8
|
-
before_sleep,
|
9
|
-
)
|
10
|
-
|
11
|
-
EDSL_BACKOFF_START_SEC = float(CONFIG.get("EDSL_BACKOFF_START_SEC"))
|
12
|
-
EDSL_MAX_BACKOFF_SEC = float(CONFIG.get("EDSL_MAX_BACKOFF_SEC"))
|
13
|
-
EDSL_MAX_ATTEMPTS = int(CONFIG.get("EDSL_MAX_ATTEMPTS"))
|
14
|
-
|
15
|
-
|
16
|
-
def print_retry(retry_state, print_to_terminal=True):
|
17
|
-
"Prints details on tenacity retries."
|
18
|
-
attempt_number = retry_state.attempt_number
|
19
|
-
exception = retry_state.outcome.exception()
|
20
|
-
wait_time = retry_state.next_action.sleep
|
21
|
-
if print_to_terminal:
|
22
|
-
print(
|
23
|
-
f"Attempt {attempt_number} failed with exception:" f"{exception}",
|
24
|
-
f"now waiting {wait_time:.2f} seconds before retrying."
|
25
|
-
f"Parameters: start={EDSL_BACKOFF_START_SEC}, max={EDSL_MAX_BACKOFF_SEC}, max_attempts={EDSL_MAX_ATTEMPTS}."
|
26
|
-
"\n\n",
|
27
|
-
)
|
28
|
-
|
29
|
-
|
30
|
-
retry_strategy = retry(
|
31
|
-
wait=wait_exponential(
|
32
|
-
multiplier=EDSL_BACKOFF_START_SEC, max=EDSL_MAX_BACKOFF_SEC
|
33
|
-
), # Exponential back-off starting at 1s, doubling, maxing out at 60s
|
34
|
-
stop=stop_after_attempt(EDSL_MAX_ATTEMPTS), # Stop after 5 attempts
|
35
|
-
# retry=retry_if_exception_type(Exception), # Customize this as per your specific retry-able exception
|
36
|
-
before_sleep=print_retry, # Use custom print function for retries
|
37
|
-
)
|