edsl 0.1.37.dev5__py3-none-any.whl → 0.1.38__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 +63 -34
- edsl/BaseDiff.py +7 -7
- edsl/__init__.py +2 -1
- edsl/__version__.py +1 -1
- edsl/agents/Agent.py +23 -11
- edsl/agents/AgentList.py +86 -23
- edsl/agents/Invigilator.py +18 -7
- edsl/agents/InvigilatorBase.py +0 -19
- edsl/agents/PromptConstructor.py +5 -4
- edsl/auto/SurveyCreatorPipeline.py +1 -1
- edsl/auto/utilities.py +1 -1
- edsl/base/Base.py +3 -13
- edsl/config.py +8 -0
- edsl/coop/coop.py +89 -19
- edsl/data/Cache.py +45 -17
- edsl/data/CacheEntry.py +8 -3
- edsl/data/RemoteCacheSync.py +0 -19
- edsl/enums.py +2 -0
- edsl/exceptions/agents.py +4 -0
- edsl/exceptions/cache.py +5 -0
- edsl/inference_services/GoogleService.py +7 -15
- edsl/inference_services/PerplexityService.py +163 -0
- edsl/inference_services/registry.py +2 -0
- edsl/jobs/Jobs.py +110 -559
- edsl/jobs/JobsChecks.py +147 -0
- edsl/jobs/JobsPrompts.py +268 -0
- edsl/jobs/JobsRemoteInferenceHandler.py +239 -0
- edsl/jobs/buckets/TokenBucket.py +3 -0
- edsl/jobs/interviews/Interview.py +7 -7
- edsl/jobs/runners/JobsRunnerAsyncio.py +156 -28
- edsl/jobs/runners/JobsRunnerStatus.py +194 -196
- edsl/jobs/tasks/TaskHistory.py +27 -19
- edsl/language_models/LanguageModel.py +52 -90
- edsl/language_models/ModelList.py +67 -14
- edsl/language_models/registry.py +57 -4
- edsl/notebooks/Notebook.py +7 -8
- edsl/prompts/Prompt.py +8 -3
- edsl/questions/QuestionBase.py +38 -30
- edsl/questions/QuestionBaseGenMixin.py +1 -1
- edsl/questions/QuestionBasePromptsMixin.py +0 -17
- edsl/questions/QuestionExtract.py +3 -4
- edsl/questions/QuestionFunctional.py +10 -3
- edsl/questions/derived/QuestionTopK.py +2 -0
- edsl/questions/question_registry.py +36 -6
- edsl/results/CSSParameterizer.py +108 -0
- edsl/results/Dataset.py +146 -15
- edsl/results/DatasetExportMixin.py +231 -217
- edsl/results/DatasetTree.py +134 -4
- edsl/results/Result.py +31 -16
- edsl/results/Results.py +159 -65
- edsl/results/TableDisplay.py +198 -0
- edsl/results/table_display.css +78 -0
- edsl/scenarios/FileStore.py +187 -13
- edsl/scenarios/Scenario.py +73 -18
- edsl/scenarios/ScenarioJoin.py +127 -0
- edsl/scenarios/ScenarioList.py +251 -76
- edsl/surveys/MemoryPlan.py +1 -1
- edsl/surveys/Rule.py +1 -5
- edsl/surveys/RuleCollection.py +1 -1
- edsl/surveys/Survey.py +25 -19
- edsl/surveys/SurveyFlowVisualizationMixin.py +67 -9
- edsl/surveys/instructions/ChangeInstruction.py +9 -7
- edsl/surveys/instructions/Instruction.py +21 -7
- edsl/templates/error_reporting/interview_details.html +3 -3
- edsl/templates/error_reporting/interviews.html +18 -9
- edsl/{conjure → utilities}/naming_utilities.py +1 -1
- edsl/utilities/utilities.py +15 -0
- {edsl-0.1.37.dev5.dist-info → edsl-0.1.38.dist-info}/METADATA +2 -1
- {edsl-0.1.37.dev5.dist-info → edsl-0.1.38.dist-info}/RECORD +71 -77
- edsl/conjure/AgentConstructionMixin.py +0 -160
- edsl/conjure/Conjure.py +0 -62
- edsl/conjure/InputData.py +0 -659
- edsl/conjure/InputDataCSV.py +0 -48
- edsl/conjure/InputDataMixinQuestionStats.py +0 -182
- edsl/conjure/InputDataPyRead.py +0 -91
- edsl/conjure/InputDataSPSS.py +0 -8
- edsl/conjure/InputDataStata.py +0 -8
- edsl/conjure/QuestionOptionMixin.py +0 -76
- edsl/conjure/QuestionTypeMixin.py +0 -23
- edsl/conjure/RawQuestion.py +0 -65
- edsl/conjure/SurveyResponses.py +0 -7
- edsl/conjure/__init__.py +0 -9
- edsl/conjure/examples/placeholder.txt +0 -0
- edsl/conjure/utilities.py +0 -201
- {edsl-0.1.37.dev5.dist-info → edsl-0.1.38.dist-info}/LICENSE +0 -0
- {edsl-0.1.37.dev5.dist-info → edsl-0.1.38.dist-info}/WHEEL +0 -0
@@ -1,13 +1,13 @@
|
|
1
|
-
edsl/Base.py,sha256=
|
2
|
-
edsl/BaseDiff.py,sha256=
|
1
|
+
edsl/Base.py,sha256=HmleFvdP6tDwLfCKxyCdjRImGA2_blb0soE9GU7_crY,10200
|
2
|
+
edsl/BaseDiff.py,sha256=92BirXj2u3TEGHJWni9TBsvZjvq8wpb4wDL2vxX9Lb0,8253
|
3
3
|
edsl/TemplateLoader.py,sha256=sDBlSMt7EfOduM7w3h6v03gvh_Rzn9hVrlS-iLSQdZA,849
|
4
|
-
edsl/__init__.py,sha256=
|
5
|
-
edsl/__version__.py,sha256=
|
6
|
-
edsl/agents/Agent.py,sha256=
|
7
|
-
edsl/agents/AgentList.py,sha256=
|
8
|
-
edsl/agents/Invigilator.py,sha256=
|
9
|
-
edsl/agents/InvigilatorBase.py,sha256=
|
10
|
-
edsl/agents/PromptConstructor.py,sha256=
|
4
|
+
edsl/__init__.py,sha256=rAch7Qsj61LdstA_YeZROUhZkNls1HkpcJWodf6WtFk,1820
|
5
|
+
edsl/__version__.py,sha256=iqMsqiw28paXOQhpmbrJrO6OnNN9YpR83VgJimFDq8k,23
|
6
|
+
edsl/agents/Agent.py,sha256=cmO4jEsyTewu6fDC5geEtrtUtjcEFBga6_XmdLCqBb4,31985
|
7
|
+
edsl/agents/AgentList.py,sha256=K_VdOnDfD4qPFq_Ms1jfSSKEM6q9BWMXEcBXhh4yVaY,13588
|
8
|
+
edsl/agents/Invigilator.py,sha256=Yd2_rTwXH-6vzwJM2283CBN4UtNfblphltu73OMsEVk,9578
|
9
|
+
edsl/agents/InvigilatorBase.py,sha256=5PKImpjDHMEHzeAqxTB_kBL8FKGmvfBGzZcW5vxl2Jc,9050
|
10
|
+
edsl/agents/PromptConstructor.py,sha256=0YsUGlIzDUML57pN4TH6nMvfpxkQ5YRSOVZ9rIZxJt0,13714
|
11
11
|
edsl/agents/__init__.py,sha256=B1dWfV4QWOo8cc2KeuetdFGeNhZ8XHc0Q8YhQW9k7BE,136
|
12
12
|
edsl/agents/descriptors.py,sha256=JxM_ckzhDmfZT1igSUdCxgyQcCK0o9MhU5jbLIned9g,3189
|
13
13
|
edsl/agents/prompt_helpers.py,sha256=rHUxM_F0kCOkJmnhCyK-amFKViAYvpRRLD8LHFLGqQw,5023
|
@@ -20,26 +20,10 @@ edsl/auto/StagePersonaDimensionValueRanges.py,sha256=z_fJJK4vydId13IVQnI92RUoDQk
|
|
20
20
|
edsl/auto/StagePersonaDimensionValues.py,sha256=o6xUVkYLa1wooY5mDmy1j8bGQbK4EzUZ-Zqi7Lfv1hI,2313
|
21
21
|
edsl/auto/StagePersonaDimensions.py,sha256=9tjZJGA1ytTgMlTspRrYKRXj0QYvkWx9Yg5Comf_x8k,2069
|
22
22
|
edsl/auto/StageQuestions.py,sha256=TyUSnfeFEbuQKG_KZT9rk43flRt0ZyzQDqYzBa_858c,2198
|
23
|
-
edsl/auto/SurveyCreatorPipeline.py,sha256=
|
24
|
-
edsl/auto/utilities.py,sha256=
|
25
|
-
edsl/base/Base.py,sha256=
|
26
|
-
edsl/config.py,sha256=
|
27
|
-
edsl/conjure/AgentConstructionMixin.py,sha256=w2HqFAery-3WNkMR88-Zd_2jUlfq8xVlaoJ9IPOUPD0,6120
|
28
|
-
edsl/conjure/Conjure.py,sha256=JaCuAm3rmqjh11_X8PXgvPsVHGql3yTn9JEzVlzOUVU,2019
|
29
|
-
edsl/conjure/InputData.py,sha256=RdFgkzzayddSTd6vcwBB8LC796YBj94pciwrQx9nBtg,22003
|
30
|
-
edsl/conjure/InputDataCSV.py,sha256=m4hHSQogxt7LNcGNxcGRkrbdGy8pIQu5KvXhIEt9i6k,1684
|
31
|
-
edsl/conjure/InputDataMixinQuestionStats.py,sha256=Jav5pqYCLSQ1pAbGV8O9VCBu0vL8Q6pteSEhRKrONuw,6256
|
32
|
-
edsl/conjure/InputDataPyRead.py,sha256=phGmzVi06jdbcxgngAp_lEawGkJr5dAC2B4ho5IrAy4,3064
|
33
|
-
edsl/conjure/InputDataSPSS.py,sha256=lv7NK8lpUfjsWh8h9MpqQrCjJX6Oyg3tIOrXcQYcS_4,223
|
34
|
-
edsl/conjure/InputDataStata.py,sha256=WbA7oUGHgHJgugKjakXzpFfzWxTI4bXGGSZLxM1-tEM,224
|
35
|
-
edsl/conjure/QuestionOptionMixin.py,sha256=RSLZ7AmA65MfwyxKKjqprR9FdkLP6MsCcmTbJoqu-MM,2870
|
36
|
-
edsl/conjure/QuestionTypeMixin.py,sha256=L2vU207aeezlI1OuJ4I4SdtFCWBZzE-mBk7VwnTghO8,892
|
37
|
-
edsl/conjure/RawQuestion.py,sha256=lo8k1aln4RfnfeS6OukzwC7P_cRe2LVZxcL6uwmim6A,2116
|
38
|
-
edsl/conjure/SurveyResponses.py,sha256=fdJNFasSXVf7S5KCsYE9WB6w17q7VRylzw0aD5zGO_M,191
|
39
|
-
edsl/conjure/__init__.py,sha256=1lPYFjV73GzYYSXiTyxopM4nKcXVHumEEo0fe06DbMo,535
|
40
|
-
edsl/conjure/examples/placeholder.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
|
-
edsl/conjure/naming_utilities.py,sha256=8uoGaCPZQKLwz2HudtsFSovivTGumQrFYxXxck5WUZQ,4964
|
42
|
-
edsl/conjure/utilities.py,sha256=yRdOJx9KIpWXMx41Bbfysx7Zd4v2ROwca5L4T1rmtQM,5539
|
23
|
+
edsl/auto/SurveyCreatorPipeline.py,sha256=b1rvJ1u_snPzdXIotfv_Zq3LV7OQVpIicudiFpny-S4,660
|
24
|
+
edsl/auto/utilities.py,sha256=jNRccPq5e-Eya4dlLT6oa6WAYi45bSeQb8zRsD2e_IU,7608
|
25
|
+
edsl/base/Base.py,sha256=dTXYSNcmNbkUVe6cv5kskJOmY1bbTRgQw0OGdtH_Dck,8534
|
26
|
+
edsl/config.py,sha256=5sUX1O8paVAYroxVfTlnHFAi_S0uSX2H6JLPnK0s94c,6245
|
43
27
|
edsl/conversation/Conversation.py,sha256=GDGEq_2_ni1hEUM__2x2MBoaw4GZ1Nl5RqyvLiA5wzs,9589
|
44
28
|
edsl/conversation/car_buying.py,sha256=Quh2Q8O9YoCyTKJUy3li376QFIOcL1gX0y89w3wlSl4,1950
|
45
29
|
edsl/conversation/chips.py,sha256=IoWoWEdSfJqy_TRcPPjT73lhEmYgBrZ4_3kwHEHJijQ,3323
|
@@ -47,20 +31,21 @@ edsl/conversation/mug_negotiation.py,sha256=mjvAqErD4AjN3G2za2c-X-3axOShW-zAJUei
|
|
47
31
|
edsl/conversation/next_speaker_utilities.py,sha256=bqr5JglCd6bdLc9IZ5zGOAsmN2F4ERiubSMYvZIG7qk,3629
|
48
32
|
edsl/coop/PriceFetcher.py,sha256=pCCWBqFnSv8iYpgQKhAzVCdan1xTCNesZgmIB34N4HY,1770
|
49
33
|
edsl/coop/__init__.py,sha256=4iZCwJSzJVyjBYk8ggGxY2kZjq9dXVT1jhyPDNyew4I,115
|
50
|
-
edsl/coop/coop.py,sha256=
|
34
|
+
edsl/coop/coop.py,sha256=oP3ECQAtz1oXVtgc490USJpGyxeOSOBdLrBUBJbkuX4,37057
|
51
35
|
edsl/coop/utils.py,sha256=UZwljKYW_Yjw7RYcjOg3SW7fn1pyHQfJ1fM48TBNoss,3601
|
52
|
-
edsl/data/Cache.py,sha256=
|
53
|
-
edsl/data/CacheEntry.py,sha256=
|
36
|
+
edsl/data/Cache.py,sha256=IyTj3eV9limmRTMBgdJ2XWLSEph_1SHxkaIcBhHbARU,17555
|
37
|
+
edsl/data/CacheEntry.py,sha256=qsry0YYmdEwJC6KiWeq9_ceQXpaRlKzwy46R7vP6DBk,7485
|
54
38
|
edsl/data/CacheHandler.py,sha256=DxbfeT2nZGRu8yQkbWr2tyEnhNiClevMsd5KZMCq2f0,4793
|
55
|
-
edsl/data/RemoteCacheSync.py,sha256=
|
39
|
+
edsl/data/RemoteCacheSync.py,sha256=qA2RymUcnhM2-g8PuzzaD99zQnb0zNUr9OQ0TlOFz-M,2878
|
56
40
|
edsl/data/SQLiteDict.py,sha256=V5Nfnxctgh4Iblqcw1KmbnkjtfmWrrombROSQ3mvg6A,8979
|
57
41
|
edsl/data/__init__.py,sha256=KBNGGEuGHq--D-TlpAQmvv_If906dJc1Gsy028zOx78,170
|
58
42
|
edsl/data/orm.py,sha256=Jz6rvw5SrlxwysTL0QI9r68EflKxeEBmf6j6himHDS8,238
|
59
43
|
edsl/data_transfer_models.py,sha256=9LsvZNMvyEEkF-DIcEUA9iomFbxG7E6nRUqsbHoB03k,1951
|
60
|
-
edsl/enums.py,sha256=
|
44
|
+
edsl/enums.py,sha256=adsZKcsKLr5ZHu2nJVtR_nVH_40pMGQP1IEWoOuIMrs,5342
|
61
45
|
edsl/exceptions/BaseException.py,sha256=eP30DOYtssbKt0qarfDkNOKDW-aG0DLaHtx42bp5dVQ,811
|
62
46
|
edsl/exceptions/__init__.py,sha256=zuztBvLpOCvnKtKDbnqcZ8qPKW_1OEFMSMjOgLHUP_M,1432
|
63
|
-
edsl/exceptions/agents.py,sha256=
|
47
|
+
edsl/exceptions/agents.py,sha256=kjn30zF1AemM2k4j3YgBDW7wW-U-Ghms-wkb1qQHUYg,1346
|
48
|
+
edsl/exceptions/cache.py,sha256=z4D4RHPtOV86xLsW5bl4JM8UtpH8D89gufrlpVu2mWM,178
|
64
49
|
edsl/exceptions/configuration.py,sha256=qH2sInNTndKlCLAaNgaXHyRFdKQHL7-dElB_j8wz9g4,351
|
65
50
|
edsl/exceptions/coop.py,sha256=xunPPrnbcNHn60wnH-Qw0rC_Ey99X_N7HnOBF8BQg7E,138
|
66
51
|
edsl/exceptions/data.py,sha256=K24CjgwFiMWxrF1Z2dF6F7Vfrge_y9kMK_wsYYSaroU,209
|
@@ -76,27 +61,31 @@ edsl/inference_services/AnthropicService.py,sha256=6kE8miYIsCZ6B-da4LMHE3tUkyNAs
|
|
76
61
|
edsl/inference_services/AwsBedrock.py,sha256=Ma1Xt8DEgOtHTmKfjuWbXLypjDHEEYaVp0h7xiN33OM,4073
|
77
62
|
edsl/inference_services/AzureAI.py,sha256=Xd3r4Y5OQReW-hG67ymK3LSDLiHj5hMFuvGEz5DI3lY,8889
|
78
63
|
edsl/inference_services/DeepInfraService.py,sha256=fWlH5sCNxf8eHPHxPPxJMEVWpCM9sDenkC8IZYqtXfA,515
|
79
|
-
edsl/inference_services/GoogleService.py,sha256=
|
64
|
+
edsl/inference_services/GoogleService.py,sha256=k8vJEZ6LxFbr2JVCQFt2BtHNr9PAJwjOYmM3_Gp8mlo,5100
|
80
65
|
edsl/inference_services/GroqService.py,sha256=eDMq8d7YAlJ2689ywaoaPGvMgFfOiX1KYlF_vr97N6I,510
|
81
66
|
edsl/inference_services/InferenceServiceABC.py,sha256=Js_XFM4678C0NrTXbmSKLyIsiNzye55gOoz2-FyiC7E,4694
|
82
67
|
edsl/inference_services/InferenceServicesCollection.py,sha256=uNTzNAfqRR5fL609KV3ZMyXxjfvZpj1PBz4QWme-lBY,3739
|
83
68
|
edsl/inference_services/MistralAIService.py,sha256=7mUsBEZdEWIjfh4qMNemTT2xYMq7k0yuMLGtDTdfp4Y,3878
|
84
69
|
edsl/inference_services/OllamaService.py,sha256=oro9CRl8IUE2Ro-zE69Cr4Zaf6Gdw29XW5CFU-46E0k,498
|
85
70
|
edsl/inference_services/OpenAIService.py,sha256=wraTu62bZojmgAXHNG6pJMMPZiyO1pSDfY73LVaBR_I,7621
|
71
|
+
edsl/inference_services/PerplexityService.py,sha256=mlo5vpJjOXWORV17bGt9lKUGfNR8OXTeswQBUzmSU-Q,5730
|
86
72
|
edsl/inference_services/TestService.py,sha256=-jTXkl_qLt1k8gJjRb0SMgTb9EY-XMTP-ZUL9AJcUCA,3009
|
87
73
|
edsl/inference_services/TogetherAIService.py,sha256=p_31ccrfN25kZF2xlAlUkb7w1EL4lGjmkSv-5qZ7TtY,6301
|
88
74
|
edsl/inference_services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
75
|
edsl/inference_services/models_available_cache.py,sha256=bOvevfRn2HlmBcHalaDkjFLxiw0JJhsXVUHZo_OhgjA,4061
|
90
76
|
edsl/inference_services/rate_limits_cache.py,sha256=HYslviz7mxF9U4CUTPAkoyBsiXjSju-YCp4HHir6e34,1398
|
91
|
-
edsl/inference_services/registry.py,sha256=
|
77
|
+
edsl/inference_services/registry.py,sha256=Rkjfe4iABQc7aiY73bGnbRAgLXY0osni22hYnmMEI2c,1335
|
92
78
|
edsl/inference_services/write_available.py,sha256=NNwhATlaMp8IYY635MSx-oYxt5X15acjAfaqYCo_I1Y,285
|
93
79
|
edsl/jobs/Answers.py,sha256=c4LpigQjdnMr7iJu8571C4FggGPVudfT7hbJgmgKW40,1821
|
94
|
-
edsl/jobs/Jobs.py,sha256=
|
80
|
+
edsl/jobs/Jobs.py,sha256=QztGWk8MuGi0zuNREJNqKO66SEa8T15nIE8hBSv1eIc,32785
|
81
|
+
edsl/jobs/JobsChecks.py,sha256=rMXPHJ6_Qvs_P8ebvHFVkvJw47xiMCIfah8FxiOceYA,4450
|
82
|
+
edsl/jobs/JobsPrompts.py,sha256=nnEVi2z3M-5MR6K28TatWFj6zBY-1KpYoqr0Qx3EqVQ,9681
|
83
|
+
edsl/jobs/JobsRemoteInferenceHandler.py,sha256=0bFQcvybhyKpwXocUYZKM803_YJtJOryID5CatI-zLU,9045
|
95
84
|
edsl/jobs/__init__.py,sha256=aKuAyd_GoalGj-k7djOoVwEbFUE2XLPlikXaA1_8yAg,32
|
96
85
|
edsl/jobs/buckets/BucketCollection.py,sha256=11CRisE1WAPcAlI3YJK3DVvu0AqSvv8KskXo4Q1waSk,2286
|
97
86
|
edsl/jobs/buckets/ModelBuckets.py,sha256=hxw_tzc0V42CiB7mh5jIxlgwDVJ-zFZhlLtKrHEg8ho,2419
|
98
|
-
edsl/jobs/buckets/TokenBucket.py,sha256=
|
99
|
-
edsl/jobs/interviews/Interview.py,sha256=
|
87
|
+
edsl/jobs/buckets/TokenBucket.py,sha256=VRnbMkjnYc7ed1EQYMK3OnIL2CFYZNFywmLKrkyBSfw,9166
|
88
|
+
edsl/jobs/interviews/Interview.py,sha256=g63o7Wwh_C6MkOkL4tqRN_wyJtb9lELu19D_6dkLEgU,26159
|
100
89
|
edsl/jobs/interviews/InterviewExceptionCollection.py,sha256=ZIe9nnI8pznxp1D0K2Ii9SHorc9-f0k_lQV-Giq41P8,3666
|
101
90
|
edsl/jobs/interviews/InterviewExceptionEntry.py,sha256=JMLcftRItQRCo8cOWH5S2H02wa-157l1TCFGVDXfViY,5685
|
102
91
|
edsl/jobs/interviews/InterviewStatistic.py,sha256=hY5d2EkIJ96NilPpZAvZZzZoxLXM7ss3xx5MIcKtTPs,1856
|
@@ -105,40 +94,40 @@ edsl/jobs/interviews/InterviewStatusDictionary.py,sha256=MSyys4hOWe1d8gfsUvAPbcK
|
|
105
94
|
edsl/jobs/interviews/InterviewStatusLog.py,sha256=6u0F8gf5tha39VQL-IK_QPkCsQAYVOx_IesX7TDDX_A,3252
|
106
95
|
edsl/jobs/interviews/ReportErrors.py,sha256=xmzppVqNI93-NjL-BCBOBgBFkU3tuBJiw-FHYKeWDlY,1783
|
107
96
|
edsl/jobs/interviews/interview_status_enum.py,sha256=KJ-1yLAHdX-p8TiFnM0M3v1tnBwkq4aMCuBX6-ytrI8,229
|
108
|
-
edsl/jobs/runners/JobsRunnerAsyncio.py,sha256=
|
109
|
-
edsl/jobs/runners/JobsRunnerStatus.py,sha256=
|
97
|
+
edsl/jobs/runners/JobsRunnerAsyncio.py,sha256=ZzhFytQ4hqQWs65I0krzz909Hlks9Z202Vx8X2TJzRM,18135
|
98
|
+
edsl/jobs/runners/JobsRunnerStatus.py,sha256=XoUGd5Y501JSo98NRvqbP9aV9Ye01HVxI65UcMXmAzs,11007
|
110
99
|
edsl/jobs/runners/JobsRunnerStatusData.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
111
100
|
edsl/jobs/tasks/QuestionTaskCreator.py,sha256=K-xATHIXMWPTMOnms5UDW30eTIlIfebf7oOEfwrh1ME,10072
|
112
101
|
edsl/jobs/tasks/TaskCreators.py,sha256=XqAbNU33378Z4PQncokbfJwnKt3KHR9aqa5fKYRDpfg,2694
|
113
|
-
edsl/jobs/tasks/TaskHistory.py,sha256=
|
102
|
+
edsl/jobs/tasks/TaskHistory.py,sha256=61cdzs3A4OldBz_UWsLJIpRFPPA3yG45RSkVkOQrwxQ,14970
|
114
103
|
edsl/jobs/tasks/TaskStatusLog.py,sha256=bqH36a32F12fjX-M-4lNOhHaK2-WLFzKE-r0PxZPRjI,546
|
115
104
|
edsl/jobs/tasks/task_status_enum.py,sha256=DOyrz61YlIS8R1W7izJNphcLrJ7I_ReUlfdRmk23h0Q,5333
|
116
105
|
edsl/jobs/tokens/InterviewTokenUsage.py,sha256=u_6-IHpGFwZ6qMEXr24-jyLVUSSp4dSs_4iAZsBv7O4,1100
|
117
106
|
edsl/jobs/tokens/TokenUsage.py,sha256=odj2-wDNEbHl9noyFAQ0DSKV0D9cv3aDOpmXufKZ8O4,1323
|
118
107
|
edsl/language_models/KeyLookup.py,sha256=4ZTpm7rK20wm4ljqyQDu6c5DF9CUhKxtp1GVL1XFkFA,1051
|
119
|
-
edsl/language_models/LanguageModel.py,sha256=
|
120
|
-
edsl/language_models/ModelList.py,sha256=
|
108
|
+
edsl/language_models/LanguageModel.py,sha256=qSIP2ekLnrnTRfTIHyTDf2XYLK1rQM0NwmL9ItHwDw0,23771
|
109
|
+
edsl/language_models/ModelList.py,sha256=buK4mCQyt4owmEa8foWg9a7WQZFg_zFJ90Uv0mbP8YY,4375
|
121
110
|
edsl/language_models/RegisterLanguageModelsMeta.py,sha256=eMtBSAnlRnC4c-0_o2QkSNyzv-uAce4BEGMXq2PLj2E,7523
|
122
111
|
edsl/language_models/__init__.py,sha256=f38OP_aBJde_NjNDxwDGs3_2Bu-A17NMZ47pvnhMEkg,162
|
123
112
|
edsl/language_models/fake_openai_call.py,sha256=dxbL5e4NLF-eTk9IduPyGwLiVCX_-eGCJDaLYPlQTqc,364
|
124
113
|
edsl/language_models/fake_openai_service.py,sha256=2AAsAinELbMZRqiepwBkWhWcLuMe5ORXUBNarrdl1ug,1714
|
125
|
-
edsl/language_models/registry.py,sha256=
|
114
|
+
edsl/language_models/registry.py,sha256=qj2hiMLkm3OIzlD_FDh-D6MoQH_FPRvy38uTWp46AsI,6072
|
126
115
|
edsl/language_models/repair.py,sha256=d0i2S3kJfX7JtuCYhlIyT0QP8hcZkRPLanC09lOW_xo,5353
|
127
116
|
edsl/language_models/unused/ReplicateBase.py,sha256=J1oqf7mEyyKhRwNUomnptVqAsVFYCbS3iTW0EXpKtXo,3331
|
128
117
|
edsl/language_models/utilities.py,sha256=GWON2ahCpB-_-hhqmQ5Yi7_rKB4cd8GlucWuq6EnGZQ,2280
|
129
|
-
edsl/notebooks/Notebook.py,sha256=
|
118
|
+
edsl/notebooks/Notebook.py,sha256=YAFLc9p8HMaHq9ZemB5aKRBg-evZ6b4U9W00ds0N2VU,7797
|
130
119
|
edsl/notebooks/__init__.py,sha256=VNUA3nNq04slWNbYaNrzOhQJu3AZANpvBniyCJSzJ7U,45
|
131
|
-
edsl/prompts/Prompt.py,sha256=
|
120
|
+
edsl/prompts/Prompt.py,sha256=a1OFyfAWhZsvcuMGfIqQ3Sz82d5LSoICMjtpkuKAPss,11666
|
132
121
|
edsl/prompts/__init__.py,sha256=wrtkH7JW72U93_pnmTvqQx_NoadH5OPRNfrZ5AaD7Co,87
|
133
122
|
edsl/questions/AnswerValidatorMixin.py,sha256=t_ABep50KP02GSc48Y8VAEjp35drVOngfrWXU5aVhgk,11505
|
134
|
-
edsl/questions/QuestionBase.py,sha256=
|
135
|
-
edsl/questions/QuestionBaseGenMixin.py,sha256=
|
136
|
-
edsl/questions/QuestionBasePromptsMixin.py,sha256=
|
123
|
+
edsl/questions/QuestionBase.py,sha256=3beTv65WO8-mgqdOvOn6SXCkQYMpDZk65BRl9d0__KM,22509
|
124
|
+
edsl/questions/QuestionBaseGenMixin.py,sha256=4WxPuoPRl_b_sPFLJ9KdfPuoYm2_ogkDTVfdD7vLOng,6038
|
125
|
+
edsl/questions/QuestionBasePromptsMixin.py,sha256=lCnC5Uvk-BJNiuy05BL9v9Qn89yyoq5BqH2zb0DHeSs,7837
|
137
126
|
edsl/questions/QuestionBudget.py,sha256=TJgPsyqafJdJw5if0zVxh7zHloourINUqUWfWIlRq9Y,8131
|
138
127
|
edsl/questions/QuestionCheckBox.py,sha256=wC_doEdNZi4y8Uz-tXZyQ2GYS5wQKOWhbVUnyVLoACU,12840
|
139
|
-
edsl/questions/QuestionExtract.py,sha256=
|
128
|
+
edsl/questions/QuestionExtract.py,sha256=gI3iZQq-j9Ltvm6OHgUEz3WHeBPfOXEbfLZApyc3JI0,6023
|
140
129
|
edsl/questions/QuestionFreeText.py,sha256=NSdPWpTkbBpAKmyN8eS0g2ogOOjWMjWFGYvY2jrsWag,3423
|
141
|
-
edsl/questions/QuestionFunctional.py,sha256=
|
130
|
+
edsl/questions/QuestionFunctional.py,sha256=APuTZ5QNBTLvwv_iNcgFFV81qImiUL3qHMMHjArREf0,5581
|
142
131
|
edsl/questions/QuestionList.py,sha256=vs2AE8OnbwVsly-sorb9dfIibdF1BpOaCRYyvwXYSzY,7209
|
143
132
|
edsl/questions/QuestionMultipleChoice.py,sha256=Yj94-6fwFqDI9UvjwSCOfKnp4gBB86XMmCsL7lbX-t4,10292
|
144
133
|
edsl/questions/QuestionNumerical.py,sha256=_jMZ28DZHYAv_g3Y3vCnmzerMs995on0Ng6j4pDcfHo,4959
|
@@ -152,7 +141,7 @@ edsl/questions/compose_questions.py,sha256=ZcLkwNaofk-o0-skGXEDGZAj6DumOhVhyIUjq
|
|
152
141
|
edsl/questions/decorators.py,sha256=ZijaRYUntAcg0JEztCiOEpcDvvVie___85Zx5ogBQXY,596
|
153
142
|
edsl/questions/derived/QuestionLikertFive.py,sha256=XCpmwlk2qyCxEkiG3UwPqVpS5-k4d4uWyMaxfJg5wkw,2585
|
154
143
|
edsl/questions/derived/QuestionLinearScale.py,sha256=tj_RszK9WumaKRVMS1Fy63-Q6ip4FGBpNU2AtQrWlp8,3304
|
155
|
-
edsl/questions/derived/QuestionTopK.py,sha256=
|
144
|
+
edsl/questions/derived/QuestionTopK.py,sha256=AN-iibO9y-2HdpJJh2FpAV8ImNkC2cb4N_zAKlL8Hkw,3284
|
156
145
|
edsl/questions/derived/QuestionYesNo.py,sha256=KWJyaXSNPNxELtK0nWvIqNtpAF05MMAC0ILUjxXkVwo,2735
|
157
146
|
edsl/questions/derived/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
147
|
edsl/questions/descriptors.py,sha256=wKPVZhccE9kZP8AHoH05OS1rN0t5TyGBGev3M6oTh8c,16170
|
@@ -164,7 +153,7 @@ edsl/questions/prompt_templates/question_linear_scale.jinja,sha256=VB9bFPeLGGb5a
|
|
164
153
|
edsl/questions/prompt_templates/question_list.jinja,sha256=MAkNv88E79jXK9TxKdnf5KgA77CWz9vXc2TZm2r-g-A,495
|
165
154
|
edsl/questions/prompt_templates/question_multiple_choice.jinja,sha256=sSyAhnexZF6oWqHL-45r7o69vrFcCbbYXLZ3zu7q76U,761
|
166
155
|
edsl/questions/prompt_templates/question_numerical.jinja,sha256=c20sp3HfFonfaRwwmnF7HjAEugU15QlgpNAIkNHasl0,1218
|
167
|
-
edsl/questions/question_registry.py,sha256=
|
156
|
+
edsl/questions/question_registry.py,sha256=ggPAjW2XJ-rFA_2bitxJV7SVlEx_QLYNib9geFXjhKw,6334
|
168
157
|
edsl/questions/settings.py,sha256=er_z0ZW_dgmC5CHLWkaqBJiuWgAYzIund85M5YZFQAI,291
|
169
158
|
edsl/questions/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
170
159
|
edsl/questions/templates/budget/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -204,23 +193,27 @@ edsl/questions/templates/top_k/question_presentation.jinja,sha256=2u8XIkFPWzOuhb
|
|
204
193
|
edsl/questions/templates/yes_no/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
205
194
|
edsl/questions/templates/yes_no/answering_instructions.jinja,sha256=UAcssfcYeW8zytmPOVJOVQEdwdvlRspE8WnatYvreJQ,172
|
206
195
|
edsl/questions/templates/yes_no/question_presentation.jinja,sha256=hoEVj4GQD3EYnR2AStXkMFOJeqISNoEVzBd8-cx2yWg,273
|
207
|
-
edsl/results/
|
208
|
-
edsl/results/
|
209
|
-
edsl/results/
|
210
|
-
edsl/results/
|
211
|
-
edsl/results/
|
196
|
+
edsl/results/CSSParameterizer.py,sha256=1gIV1q7647FUsEcwExuWPyymn-KT5aFV2cGltXzQJP4,3675
|
197
|
+
edsl/results/Dataset.py,sha256=S349g21y5xgt2XD2Ttw2LJXVGwV5wiOr1nBAkF76NvM,14427
|
198
|
+
edsl/results/DatasetExportMixin.py,sha256=6KngdS-UbK_sDNPEEwd_peUvdPljxAYkBHPNs-XGyfg,27487
|
199
|
+
edsl/results/DatasetTree.py,sha256=jKn1ZRjjt-fEosXWCzz48LVABPyioSRH3An2hSAFhoc,9471
|
200
|
+
edsl/results/Result.py,sha256=hsPEqZ-nX3kd6FFmE1CQHTziq11Rj7R9reBdv-VJ3Go,16849
|
201
|
+
edsl/results/Results.py,sha256=qMr0IjjyR1F7uV-OsqN2HoIehqUd9fHqb87U82s7x-w,40264
|
212
202
|
edsl/results/ResultsDBMixin.py,sha256=oh1QXKwreSx90PBJyjYsQ7WrLXdNqbe4QULy25Nq7dk,7945
|
213
203
|
edsl/results/ResultsExportMixin.py,sha256=XizBsPNxziyffirMA4kS7UHpYM1WIE4s1K-B7TqTfDw,1266
|
214
204
|
edsl/results/ResultsFetchMixin.py,sha256=VEa0TKDcXbnTinSKs9YaE4WjOSLmlp9Po1_9kklFvSo,848
|
215
205
|
edsl/results/ResultsGGMixin.py,sha256=SAYz8p4wb1g8x6KhBVz9NHOGib2c2XsqtTclpADrFeM,4344
|
216
206
|
edsl/results/ResultsToolsMixin.py,sha256=mseEFxJCf9sjXdIxpjITt_UZBwdXxw2o2VLg5jMrALA,3017
|
217
207
|
edsl/results/Selector.py,sha256=WMRVBCwLuQ4ljVzqnZxGKIwqPEL_waK-FqaMY4__ob0,4847
|
208
|
+
edsl/results/TableDisplay.py,sha256=pA9VTBcwVasruustj-_xx1XYRU484EqWDDb9RZYVH3Y,6453
|
218
209
|
edsl/results/__init__.py,sha256=2YcyiVtXi-3vIV0ZzOy1PqBLm2gaziufJVi4fdNrAt8,80
|
210
|
+
edsl/results/table_display.css,sha256=d9HuZYpGvgpDItjYYB0SI88qEPZ4pLgxbhzty_o5DoY,2106
|
219
211
|
edsl/results/tree_explore.py,sha256=hQjiO4E71rIOPDgEHgK8T8ukxqoNdgX_tvyiDlG4_9U,4624
|
220
|
-
edsl/scenarios/FileStore.py,sha256=
|
221
|
-
edsl/scenarios/Scenario.py,sha256=
|
212
|
+
edsl/scenarios/FileStore.py,sha256=nsFQ9VLjlilzHRXj3KARN8vvR47vfAAm1y9Ww0ZL2uk,19724
|
213
|
+
edsl/scenarios/Scenario.py,sha256=RKb38Q13vTqc31qoNFW9hmljBtWHIrQUO5IMblygN5U,20146
|
222
214
|
edsl/scenarios/ScenarioHtmlMixin.py,sha256=yKAhYTjR600od8l2KJDaTiz-FC0ppyRzOwNOWO0zxN8,2086
|
223
|
-
edsl/scenarios/
|
215
|
+
edsl/scenarios/ScenarioJoin.py,sha256=4wa4JGnwrF-u2nTfaVkzLTuB6PftfvTkm5UDWvCVFyk,4774
|
216
|
+
edsl/scenarios/ScenarioList.py,sha256=RRnAI2UsAfFBChI44_T93RXpRfbUEzhXTUq037clEZg,49151
|
224
217
|
edsl/scenarios/ScenarioListExportMixin.py,sha256=wfffY9xy_1QyIM-1xnisr64izSLjmyuotUYY5iDLodc,1681
|
225
218
|
edsl/scenarios/ScenarioListPdfMixin.py,sha256=z_H2sZn5SCSq6nRLSU5jefaOlh4sqJLyOY_Ld0XCR18,8332
|
226
219
|
edsl/scenarios/__init__.py,sha256=1X03GA_ltVRzNT5KQIuATj3qBcpFCvvGWojr3wggGtk,148
|
@@ -232,27 +225,27 @@ edsl/study/Study.py,sha256=Ytm15XIWgT716scM3HKFSfdBHxRwX6mfMn3l8dgdY1c,18462
|
|
232
225
|
edsl/study/__init__.py,sha256=YAvPLTPG3hK_eN9Ar3d1_d-E3laXpSya879A25-JAxU,170
|
233
226
|
edsl/surveys/DAG.py,sha256=dnIbrfJ_lQ3QEKjpyuo1I6b0kcnW2KMMyPir0A6J4XM,4235
|
234
227
|
edsl/surveys/Memory.py,sha256=-ikOtkkQldGB_BkPCW3o7AYwV5B_pIwlREw7aVCSHaQ,1113
|
235
|
-
edsl/surveys/MemoryPlan.py,sha256=
|
236
|
-
edsl/surveys/Rule.py,sha256=
|
237
|
-
edsl/surveys/RuleCollection.py,sha256=
|
238
|
-
edsl/surveys/Survey.py,sha256=
|
228
|
+
edsl/surveys/MemoryPlan.py,sha256=9NNue5Z1FQs-H7yz0kFFDc6yTqJGN9pDcmeY15h3SLY,9052
|
229
|
+
edsl/surveys/Rule.py,sha256=Vy0NX7E5V1CmXJS5DhUb8iMJRD8EDHVr8HPD6KCGYt4,12393
|
230
|
+
edsl/surveys/RuleCollection.py,sha256=ID8EN1qAwKcCJz7jMEwh9cF0fHc-O2R8Vi3V_59UNys,14894
|
231
|
+
edsl/surveys/Survey.py,sha256=thP3lnmIYpCEo7qd6Jk6qITXfQtKDcNrZsdulAwkjqI,73498
|
239
232
|
edsl/surveys/SurveyCSS.py,sha256=NjJezs2sTlgFprN6IukjGKwNYmNdXnLjzV2w5K4z4RI,8415
|
240
233
|
edsl/surveys/SurveyExportMixin.py,sha256=Kvkd2ku2Kemsn2Nw-Yt8GTnGFcUqfEiKznmisAeO7ck,8339
|
241
|
-
edsl/surveys/SurveyFlowVisualizationMixin.py,sha256=
|
234
|
+
edsl/surveys/SurveyFlowVisualizationMixin.py,sha256=QpqqKEzgNo90wh-S4eFco8CWpZZ3x062Zc2vk6U4gLw,6356
|
242
235
|
edsl/surveys/SurveyQualtricsImport.py,sha256=SSZv53D1zVhQSfSw-X0_cte0QnkWhE9v922wLn6RMkI,9771
|
243
236
|
edsl/surveys/__init__.py,sha256=vjMYVlP95fHVqqw2FfKXRuYbTArZkZr1nK4FnXzZWzs,129
|
244
237
|
edsl/surveys/base.py,sha256=XJHGEbbsH6hlYYkmI4isVLD8guLz8BdhR-eQRL78mc4,1115
|
245
238
|
edsl/surveys/descriptors.py,sha256=3B-hBVvGpLlVBCyOnPuxkLjesvpr0QIuATbggp_MJ7o,2076
|
246
|
-
edsl/surveys/instructions/ChangeInstruction.py,sha256=
|
247
|
-
edsl/surveys/instructions/Instruction.py,sha256=
|
239
|
+
edsl/surveys/instructions/ChangeInstruction.py,sha256=3zwis7DFKA5XYBt1291Rgcm8EEcH1Tp9rfhYYUDOAMQ,1364
|
240
|
+
edsl/surveys/instructions/Instruction.py,sha256=Bo98pcaYF_srLS2FL9myVYAcTjSefeneCKVw-EPq6wA,1908
|
248
241
|
edsl/surveys/instructions/InstructionCollection.py,sha256=eO-i9zgbk8q0D8hnawDrioS-iqXOEE7eKm5cgYNgwrU,2931
|
249
242
|
edsl/surveys/instructions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
250
243
|
edsl/templates/error_reporting/base.html,sha256=IkV24ZaUCNX303ZqVTWkFsJOnu5BG_SULrKN2YejUxQ,552
|
251
244
|
edsl/templates/error_reporting/exceptions_by_model.html,sha256=7uAWGfhUMey-29Vh6YkN_Qx1lfhC92fsTMxJEVXWPDs,792
|
252
245
|
edsl/templates/error_reporting/exceptions_by_question_name.html,sha256=_q6hSwtO_WhjXLZNLZhRj-qbPzStqYSzT0iECKUAFlg,454
|
253
246
|
edsl/templates/error_reporting/exceptions_by_type.html,sha256=TVsNCAz_G53LSZ-YslM51TUsbwtw7wzCqPwVYO6TVEw,415
|
254
|
-
edsl/templates/error_reporting/interview_details.html,sha256=
|
255
|
-
edsl/templates/error_reporting/interviews.html,sha256=
|
247
|
+
edsl/templates/error_reporting/interview_details.html,sha256=TSfbfNsvteZnR0rhHHn2MYDHWjlbzOHmuZS1GowKgv0,4034
|
248
|
+
edsl/templates/error_reporting/interviews.html,sha256=x-hD7A0_PIM_8-wDx0SaPlukBe7v338tprZ-qjEt6n0,661
|
256
249
|
edsl/templates/error_reporting/overview.html,sha256=1oTYQpi03OnguG-iudO8FZC7mwR6GryeslDbl0w9ksw,405
|
257
250
|
edsl/templates/error_reporting/performance_plot.html,sha256=NTXFj51VEwew59gLzbR83Lybh88WmFR-fhxm5rmz0Ms,53
|
258
251
|
edsl/templates/error_reporting/report.css,sha256=e0kM4z4fF3xrKIJbbhvrzzh8gMJ8LD7rDu0ut63kg8c,1209
|
@@ -274,10 +267,11 @@ edsl/utilities/decorators.py,sha256=rlTSMItwmWUxHQBIEUDxX3lFzgtiT8PnfNavakuf-2M,
|
|
274
267
|
edsl/utilities/gcp_bucket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
275
268
|
edsl/utilities/gcp_bucket/cloud_storage.py,sha256=dStHsG181YP9ALW-bkyO-sgMWuLV5aaLsnsCOVD8jJw,3472
|
276
269
|
edsl/utilities/interface.py,sha256=AaKpWiwWBwP2swNXmnFlIf3ZFsjfsR5bjXQAW47tD-8,19656
|
270
|
+
edsl/utilities/naming_utilities.py,sha256=ZIxEe8nX0ZCpcZ14QjnnxBxQ0UBSiNZp6RqC7-gvUCw,4966
|
277
271
|
edsl/utilities/repair_functions.py,sha256=tftmklAqam6LOQQu_-9U44N-llycffhW8LfO63vBmNw,929
|
278
272
|
edsl/utilities/restricted_python.py,sha256=5-_zUhrNbos7pLhDl9nr8d24auRlquR6w-vKkmNjPiA,2060
|
279
|
-
edsl/utilities/utilities.py,sha256=
|
280
|
-
edsl-0.1.
|
281
|
-
edsl-0.1.
|
282
|
-
edsl-0.1.
|
283
|
-
edsl-0.1.
|
273
|
+
edsl/utilities/utilities.py,sha256=8VCm6A2ktKhTUPFYEY37kTxaHl3p-xAUeAwnBJLlEAU,12263
|
274
|
+
edsl-0.1.38.dist-info/LICENSE,sha256=_qszBDs8KHShVYcYzdMz3HNMtH-fKN_p5zjoVAVumFc,1111
|
275
|
+
edsl-0.1.38.dist-info/METADATA,sha256=hlKsfwKH4Skfeu0-geJIh39g2P2vwWX0zyq-XQ4Pmo4,4513
|
276
|
+
edsl-0.1.38.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
277
|
+
edsl-0.1.38.dist-info/RECORD,,
|
@@ -1,160 +0,0 @@
|
|
1
|
-
import random
|
2
|
-
from typing import Generator, List, Optional, Union, Callable
|
3
|
-
from edsl.agents.Agent import Agent
|
4
|
-
from edsl.agents.AgentList import AgentList
|
5
|
-
from edsl.questions import QuestionBase
|
6
|
-
from edsl.results.Results import Results
|
7
|
-
|
8
|
-
|
9
|
-
class AgentConstructionMixin:
|
10
|
-
def agent(self, index) -> Agent:
|
11
|
-
"""Return an agent constructed from the data.
|
12
|
-
|
13
|
-
:param index: The index of the agent to construct.
|
14
|
-
|
15
|
-
>>> from edsl.conjure.InputData import InputDataABC
|
16
|
-
>>> id = InputDataABC.example()
|
17
|
-
>>> id.agent(0)
|
18
|
-
Agent(traits = {'morning': '1', 'feeling': '3'}, codebook = {'morning': 'how are you doing this morning?', 'feeling': 'how are you feeling?'})
|
19
|
-
|
20
|
-
|
21
|
-
"""
|
22
|
-
responses = [responses[index] for responses in self.raw_data]
|
23
|
-
traits = {qn: r for qn, r in zip(self.question_names, responses)}
|
24
|
-
|
25
|
-
a = Agent(traits=traits, codebook=self.names_to_texts)
|
26
|
-
|
27
|
-
def construct_answer_dict_function(traits: dict) -> Callable:
|
28
|
-
def func(self, question: "QuestionBase", scenario=None):
|
29
|
-
return traits.get(question.question_name, None)
|
30
|
-
|
31
|
-
return func
|
32
|
-
|
33
|
-
a.add_direct_question_answering_method(construct_answer_dict_function(traits))
|
34
|
-
return a
|
35
|
-
|
36
|
-
def _agents(self, indices) -> Generator[Agent, None, None]:
|
37
|
-
"""Return a generator of agents, one for each index."""
|
38
|
-
for idx in indices:
|
39
|
-
yield self.agent(idx)
|
40
|
-
|
41
|
-
def to_agent_list(
|
42
|
-
self,
|
43
|
-
indices: Optional[List] = None,
|
44
|
-
sample_size: int = None,
|
45
|
-
seed: str = "edsl",
|
46
|
-
remove_direct_question_answering_method: bool = True,
|
47
|
-
) -> AgentList:
|
48
|
-
"""Return an AgentList from the data.
|
49
|
-
|
50
|
-
:param indices: The indices of the agents to include.
|
51
|
-
:param sample_size: The number of agents to sample.
|
52
|
-
:param seed: The seed for the random number generator.
|
53
|
-
|
54
|
-
>>> from edsl.conjure.InputData import InputDataABC
|
55
|
-
>>> id = InputDataABC.example()
|
56
|
-
>>> al = id.to_agent_list()
|
57
|
-
>>> len(al) == id.num_observations
|
58
|
-
True
|
59
|
-
>>> al = id.to_agent_list(indices = [0, 1, 2])
|
60
|
-
Traceback (most recent call last):
|
61
|
-
...
|
62
|
-
ValueError: Index 2 is greater than the number of agents 2.
|
63
|
-
"""
|
64
|
-
if indices and (sample_size or seed != "edsl"):
|
65
|
-
raise ValueError(
|
66
|
-
"You cannot pass both indices and sample_size/seed, as these are mutually exclusive."
|
67
|
-
)
|
68
|
-
|
69
|
-
if indices:
|
70
|
-
if len(indices) == 0:
|
71
|
-
raise ValueError("Indices must be a non-empty list.")
|
72
|
-
if max(indices) >= self.num_observations:
|
73
|
-
raise ValueError(
|
74
|
-
f"Index {max(indices)} is greater than the number of agents {self.num_observations}."
|
75
|
-
)
|
76
|
-
if min(indices) < 0:
|
77
|
-
raise ValueError(f"Index {min(indices)} is less than 0.")
|
78
|
-
|
79
|
-
if indices is None:
|
80
|
-
if sample_size is None:
|
81
|
-
indices = range(self.num_observations)
|
82
|
-
else:
|
83
|
-
if sample_size > self.num_observations:
|
84
|
-
raise ValueError(
|
85
|
-
f"Sample size {sample_size} is greater than the number of agents {self.num_observations}."
|
86
|
-
)
|
87
|
-
random.seed(seed)
|
88
|
-
indices = random.sample(range(self.num_observations), sample_size)
|
89
|
-
|
90
|
-
agents = list(self._agents(indices))
|
91
|
-
if remove_direct_question_answering_method:
|
92
|
-
for a in agents:
|
93
|
-
a.remove_direct_question_answering_method()
|
94
|
-
return AgentList(agents)
|
95
|
-
|
96
|
-
def to_results(
|
97
|
-
self,
|
98
|
-
indices: Optional[List] = None,
|
99
|
-
sample_size: int = None,
|
100
|
-
seed: str = "edsl",
|
101
|
-
dryrun=False,
|
102
|
-
disable_remote_cache: bool = False,
|
103
|
-
disable_remote_inference: bool = False,
|
104
|
-
) -> Union[Results, None]:
|
105
|
-
"""Return the results of the survey.
|
106
|
-
|
107
|
-
:param indices: The indices of the agents to include.
|
108
|
-
:param sample_size: The number of agents to sample.
|
109
|
-
:param seed: The seed for the random number generator.
|
110
|
-
:param dryrun: If True, the survey will not be run, but the time to run it will be printed.
|
111
|
-
|
112
|
-
>>> from edsl.conjure.InputData import InputDataABC
|
113
|
-
>>> id = InputDataABC.example()
|
114
|
-
>>> r = id.to_results(disable_remote_cache = True, disable_remote_inference = True)
|
115
|
-
>>> len(r) == id.num_observations
|
116
|
-
True
|
117
|
-
"""
|
118
|
-
agent_list = self.to_agent_list(
|
119
|
-
indices=indices,
|
120
|
-
sample_size=sample_size,
|
121
|
-
seed=seed,
|
122
|
-
remove_direct_question_answering_method=False,
|
123
|
-
)
|
124
|
-
DRYRUN_SAMPLE = 30
|
125
|
-
survey = self.to_survey()
|
126
|
-
if dryrun:
|
127
|
-
import time
|
128
|
-
|
129
|
-
start = time.time()
|
130
|
-
_ = survey.by(agent_list.sample(DRYRUN_SAMPLE)).run(
|
131
|
-
disable_remote_cache=disable_remote_cache,
|
132
|
-
disable_remote_inference=disable_remote_inference,
|
133
|
-
)
|
134
|
-
end = time.time()
|
135
|
-
print(f"Time to run {DRYRUN_SAMPLE} agents (s): {round(end - start, 2)}")
|
136
|
-
time_per_agent = (end - start) / DRYRUN_SAMPLE
|
137
|
-
full_sample_time = time_per_agent * len(agent_list)
|
138
|
-
if full_sample_time < 60:
|
139
|
-
print(
|
140
|
-
f"Full sample will take about {round(full_sample_time, 2)} seconds."
|
141
|
-
)
|
142
|
-
if full_sample_time > 60 and full_sample_time < 3600:
|
143
|
-
print(
|
144
|
-
f"Full sample will take about {round(full_sample_time / 60, 2)} minutes."
|
145
|
-
)
|
146
|
-
if full_sample_time > 3600:
|
147
|
-
print(
|
148
|
-
f"Full sample will take about {round(full_sample_time / 3600, 2)} hours."
|
149
|
-
)
|
150
|
-
return None
|
151
|
-
return survey.by(agent_list).run(
|
152
|
-
disable_remote_cache=disable_remote_cache,
|
153
|
-
disable_remote_inference=disable_remote_inference,
|
154
|
-
)
|
155
|
-
|
156
|
-
|
157
|
-
if __name__ == "__main__":
|
158
|
-
import doctest
|
159
|
-
|
160
|
-
doctest.testmod(optionflags=doctest.ELLIPSIS)
|
edsl/conjure/Conjure.py
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
from typing import List, Optional, Dict, Callable
|
2
|
-
|
3
|
-
|
4
|
-
class Conjure:
|
5
|
-
def __new__(cls, datafile_name: str, *args, **kwargs):
|
6
|
-
if datafile_name.endswith(".csv"):
|
7
|
-
from edsl.conjure.InputDataCSV import InputDataCSV
|
8
|
-
|
9
|
-
return InputDataCSV(datafile_name, *args, **kwargs)
|
10
|
-
elif datafile_name.endswith(".sav"):
|
11
|
-
from edsl.conjure.InputDataSPSS import InputDataSPSS
|
12
|
-
|
13
|
-
return InputDataSPSS(datafile_name, *args, **kwargs)
|
14
|
-
elif datafile_name.endswith(".dta"):
|
15
|
-
from edsl.conjure.InputDataStata import InputDataStata
|
16
|
-
|
17
|
-
return InputDataStata(datafile_name, *args, **kwargs)
|
18
|
-
else:
|
19
|
-
raise ValueError("Unsupported file type")
|
20
|
-
|
21
|
-
def __init__(
|
22
|
-
self,
|
23
|
-
datafile_name: str,
|
24
|
-
config: Optional[dict] = None,
|
25
|
-
naming_function: Optional[Callable] = None,
|
26
|
-
raw_data: Optional[List] = None,
|
27
|
-
question_names: Optional[List[str]] = None,
|
28
|
-
question_texts: Optional[List[str]] = None,
|
29
|
-
answer_codebook: Optional[Dict] = None,
|
30
|
-
question_types: Optional[List[str]] = None,
|
31
|
-
question_options: Optional[List] = None,
|
32
|
-
order_options=False,
|
33
|
-
question_name_repair_func: Callable = None,
|
34
|
-
):
|
35
|
-
# The __init__ method in Conjure won't be called because __new__ returns a different class instance.
|
36
|
-
pass
|
37
|
-
|
38
|
-
@classmethod
|
39
|
-
def example(cls):
|
40
|
-
from edsl.conjure.InputData import InputDataABC
|
41
|
-
|
42
|
-
return InputDataABC.example()
|
43
|
-
|
44
|
-
|
45
|
-
if __name__ == "__main__":
|
46
|
-
pass
|
47
|
-
# import glob
|
48
|
-
|
49
|
-
# for file in glob.glob("examples/*"):
|
50
|
-
# if file.endswith(".txt"):
|
51
|
-
# continue
|
52
|
-
# print("\n\n")
|
53
|
-
# print("Now processing:", file)
|
54
|
-
# conjure_instance = Conjure(file)
|
55
|
-
# print(conjure_instance)
|
56
|
-
# conjure_instance.to_results(dryrun=True)
|
57
|
-
# print("\n\n")
|
58
|
-
|
59
|
-
# # c = Conjure("mayors.sav")
|
60
|
-
# # al = c.to_agent_list()
|
61
|
-
# # s = c.to_survey()
|
62
|
-
# # r = c.results()
|