edsl 0.1.38.dev1__py3-none-any.whl → 0.1.38.dev2__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 +3 -3
- edsl/BaseDiff.py +7 -7
- edsl/__init__.py +2 -1
- edsl/__version__.py +1 -1
- edsl/agents/Agent.py +17 -14
- edsl/agents/AgentList.py +29 -17
- edsl/auto/SurveyCreatorPipeline.py +1 -1
- edsl/auto/utilities.py +1 -1
- edsl/base/Base.py +3 -13
- edsl/coop/coop.py +3 -0
- edsl/data/Cache.py +18 -15
- edsl/exceptions/agents.py +4 -0
- edsl/exceptions/cache.py +5 -0
- edsl/jobs/Jobs.py +22 -11
- edsl/jobs/buckets/TokenBucket.py +3 -0
- edsl/jobs/interviews/Interview.py +18 -18
- edsl/jobs/runners/JobsRunnerAsyncio.py +38 -15
- edsl/jobs/runners/JobsRunnerStatus.py +196 -196
- edsl/jobs/tasks/TaskHistory.py +12 -3
- edsl/language_models/LanguageModel.py +9 -7
- edsl/language_models/ModelList.py +20 -13
- edsl/notebooks/Notebook.py +7 -8
- edsl/questions/QuestionBase.py +21 -17
- edsl/questions/QuestionBaseGenMixin.py +1 -1
- edsl/questions/QuestionBasePromptsMixin.py +0 -17
- edsl/questions/QuestionFunctional.py +10 -3
- edsl/questions/derived/QuestionTopK.py +2 -0
- edsl/results/Result.py +31 -25
- edsl/results/Results.py +22 -22
- edsl/scenarios/Scenario.py +12 -14
- edsl/scenarios/ScenarioList.py +16 -16
- edsl/surveys/MemoryPlan.py +1 -1
- edsl/surveys/Rule.py +1 -5
- edsl/surveys/RuleCollection.py +1 -1
- edsl/surveys/Survey.py +9 -17
- edsl/surveys/instructions/ChangeInstruction.py +9 -7
- edsl/surveys/instructions/Instruction.py +9 -7
- edsl/{conjure → utilities}/naming_utilities.py +1 -1
- {edsl-0.1.38.dev1.dist-info → edsl-0.1.38.dev2.dist-info}/METADATA +1 -1
- {edsl-0.1.38.dev1.dist-info → edsl-0.1.38.dev2.dist-info}/RECORD +42 -56
- 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.38.dev1.dist-info → edsl-0.1.38.dev2.dist-info}/LICENSE +0 -0
- {edsl-0.1.38.dev1.dist-info → edsl-0.1.38.dev2.dist-info}/WHEEL +0 -0
@@ -1,10 +1,10 @@
|
|
1
|
-
edsl/Base.py,sha256
|
2
|
-
edsl/BaseDiff.py,sha256=
|
1
|
+
edsl/Base.py,sha256=-dtcJ8lYlnyqiA8B0Vllv3KFB7us7GO_I_khPmQf484,9428
|
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=
|
4
|
+
edsl/__init__.py,sha256=rAch7Qsj61LdstA_YeZROUhZkNls1HkpcJWodf6WtFk,1820
|
5
|
+
edsl/__version__.py,sha256=GoXam3vPN_CfLeu8eCRBBa8n-392r6o48nwvlJgfzGs,28
|
6
|
+
edsl/agents/Agent.py,sha256=ovA5IKm8GIubqgVtyYdeTClkyU9bjmiAIBiwxnmKCRU,31677
|
7
|
+
edsl/agents/AgentList.py,sha256=D-RqPVtzcmmlAjwV8FuNGT-jfLBHypIm8yXwsWyRHAc,11980
|
8
8
|
edsl/agents/Invigilator.py,sha256=m4T-z4aNCGd4LKjLXVNI2VszYW-pQeScfcFAxkb0pWc,9080
|
9
9
|
edsl/agents/InvigilatorBase.py,sha256=2CLo-mOIWsLREUVz3Cy-MOCMNW6xURh4Lkha9gaddn8,9754
|
10
10
|
edsl/agents/PromptConstructor.py,sha256=Bp0AqjY0B6zqcI7Q-7X94pX_3mQXSx4KJ5aU5N0K1uY,13791
|
@@ -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=
|
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
26
|
edsl/config.py,sha256=IfEm07QvhV5B2baNg6SrhME82BHBGwNZSLmYnx9ERxM,5875
|
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
|
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,9 +31,9 @@ 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=KIhuI4Xm5KoyTL5CSn_Oygs1Eydmp_IZ3v6wF-4jUwI,34288
|
51
35
|
edsl/coop/utils.py,sha256=UZwljKYW_Yjw7RYcjOg3SW7fn1pyHQfJ1fM48TBNoss,3601
|
52
|
-
edsl/data/Cache.py,sha256=
|
36
|
+
edsl/data/Cache.py,sha256=fL1yWljFFfcEUqzeNbo3YSDMa4R0O7fFGxcrFQHWuKA,16711
|
53
37
|
edsl/data/CacheEntry.py,sha256=_5UiFaJQu_U-Z1_lEPt-h6Gaidp2Eunk02wOd3Ni3MQ,7252
|
54
38
|
edsl/data/CacheHandler.py,sha256=DxbfeT2nZGRu8yQkbWr2tyEnhNiClevMsd5KZMCq2f0,4793
|
55
39
|
edsl/data/RemoteCacheSync.py,sha256=is3j644YAZDPCt4bMxOZpXtJkCXLs_hoKukxQosKKXM,3628
|
@@ -60,7 +44,8 @@ edsl/data_transfer_models.py,sha256=9LsvZNMvyEEkF-DIcEUA9iomFbxG7E6nRUqsbHoB03k,
|
|
60
44
|
edsl/enums.py,sha256=Z6nhaP8p3z0UJSfsCGb6VQUtGUKw3AK6yC0UDwOi05c,5247
|
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
|
@@ -91,12 +76,12 @@ edsl/inference_services/rate_limits_cache.py,sha256=HYslviz7mxF9U4CUTPAkoyBsiXjS
|
|
91
76
|
edsl/inference_services/registry.py,sha256=Fn6va65MqD9lnFvT603ZnU7Ok8IW64M2MzOH57kf9-A,1240
|
92
77
|
edsl/inference_services/write_available.py,sha256=NNwhATlaMp8IYY635MSx-oYxt5X15acjAfaqYCo_I1Y,285
|
93
78
|
edsl/jobs/Answers.py,sha256=c4LpigQjdnMr7iJu8571C4FggGPVudfT7hbJgmgKW40,1821
|
94
|
-
edsl/jobs/Jobs.py,sha256=
|
79
|
+
edsl/jobs/Jobs.py,sha256=Cy27HrLDM4YI5kYG7K61Xd0N7DdSIAT2tRXJqMToq5w,49616
|
95
80
|
edsl/jobs/__init__.py,sha256=aKuAyd_GoalGj-k7djOoVwEbFUE2XLPlikXaA1_8yAg,32
|
96
81
|
edsl/jobs/buckets/BucketCollection.py,sha256=11CRisE1WAPcAlI3YJK3DVvu0AqSvv8KskXo4Q1waSk,2286
|
97
82
|
edsl/jobs/buckets/ModelBuckets.py,sha256=hxw_tzc0V42CiB7mh5jIxlgwDVJ-zFZhlLtKrHEg8ho,2419
|
98
|
-
edsl/jobs/buckets/TokenBucket.py,sha256=
|
99
|
-
edsl/jobs/interviews/Interview.py,sha256=
|
83
|
+
edsl/jobs/buckets/TokenBucket.py,sha256=VRnbMkjnYc7ed1EQYMK3OnIL2CFYZNFywmLKrkyBSfw,9166
|
84
|
+
edsl/jobs/interviews/Interview.py,sha256=da2QlX_YSGrgf1yl7BJ0wt755iZu9eHGPlGeZzxaf94,26177
|
100
85
|
edsl/jobs/interviews/InterviewExceptionCollection.py,sha256=ZIe9nnI8pznxp1D0K2Ii9SHorc9-f0k_lQV-Giq41P8,3666
|
101
86
|
edsl/jobs/interviews/InterviewExceptionEntry.py,sha256=JMLcftRItQRCo8cOWH5S2H02wa-157l1TCFGVDXfViY,5685
|
102
87
|
edsl/jobs/interviews/InterviewStatistic.py,sha256=hY5d2EkIJ96NilPpZAvZZzZoxLXM7ss3xx5MIcKtTPs,1856
|
@@ -105,19 +90,19 @@ edsl/jobs/interviews/InterviewStatusDictionary.py,sha256=MSyys4hOWe1d8gfsUvAPbcK
|
|
105
90
|
edsl/jobs/interviews/InterviewStatusLog.py,sha256=6u0F8gf5tha39VQL-IK_QPkCsQAYVOx_IesX7TDDX_A,3252
|
106
91
|
edsl/jobs/interviews/ReportErrors.py,sha256=xmzppVqNI93-NjL-BCBOBgBFkU3tuBJiw-FHYKeWDlY,1783
|
107
92
|
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=
|
93
|
+
edsl/jobs/runners/JobsRunnerAsyncio.py,sha256=veRmC7z8kelvDLR7cTUTEC01wY_OKUGt_Iw7Qsvk9iI,13599
|
94
|
+
edsl/jobs/runners/JobsRunnerStatus.py,sha256=tTlAigbXfcx-h-sy2L1H5JY4jZYwLtFamaUbgfPErls,11009
|
110
95
|
edsl/jobs/runners/JobsRunnerStatusData.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
111
96
|
edsl/jobs/tasks/QuestionTaskCreator.py,sha256=K-xATHIXMWPTMOnms5UDW30eTIlIfebf7oOEfwrh1ME,10072
|
112
97
|
edsl/jobs/tasks/TaskCreators.py,sha256=XqAbNU33378Z4PQncokbfJwnKt3KHR9aqa5fKYRDpfg,2694
|
113
|
-
edsl/jobs/tasks/TaskHistory.py,sha256=
|
98
|
+
edsl/jobs/tasks/TaskHistory.py,sha256=Dbb752QJOD9AKKL1vd2umAgE7l9rS_cS24SR9k84Ldg,15150
|
114
99
|
edsl/jobs/tasks/TaskStatusLog.py,sha256=bqH36a32F12fjX-M-4lNOhHaK2-WLFzKE-r0PxZPRjI,546
|
115
100
|
edsl/jobs/tasks/task_status_enum.py,sha256=DOyrz61YlIS8R1W7izJNphcLrJ7I_ReUlfdRmk23h0Q,5333
|
116
101
|
edsl/jobs/tokens/InterviewTokenUsage.py,sha256=u_6-IHpGFwZ6qMEXr24-jyLVUSSp4dSs_4iAZsBv7O4,1100
|
117
102
|
edsl/jobs/tokens/TokenUsage.py,sha256=odj2-wDNEbHl9noyFAQ0DSKV0D9cv3aDOpmXufKZ8O4,1323
|
118
103
|
edsl/language_models/KeyLookup.py,sha256=4ZTpm7rK20wm4ljqyQDu6c5DF9CUhKxtp1GVL1XFkFA,1051
|
119
|
-
edsl/language_models/LanguageModel.py,sha256=
|
120
|
-
edsl/language_models/ModelList.py,sha256=
|
104
|
+
edsl/language_models/LanguageModel.py,sha256=Ej9Zs8aCGY0HhYRnGMwvyV062yusHWx7OkGi9J-VSyk,24804
|
105
|
+
edsl/language_models/ModelList.py,sha256=6PyaALDVVNomE19GNXOrvskffyu212gsPTe5LH0z8Ns,3020
|
121
106
|
edsl/language_models/RegisterLanguageModelsMeta.py,sha256=eMtBSAnlRnC4c-0_o2QkSNyzv-uAce4BEGMXq2PLj2E,7523
|
122
107
|
edsl/language_models/__init__.py,sha256=f38OP_aBJde_NjNDxwDGs3_2Bu-A17NMZ47pvnhMEkg,162
|
123
108
|
edsl/language_models/fake_openai_call.py,sha256=dxbL5e4NLF-eTk9IduPyGwLiVCX_-eGCJDaLYPlQTqc,364
|
@@ -126,19 +111,19 @@ edsl/language_models/registry.py,sha256=hfOlKbTkXrXGpZHQQPKE9uyyUCgOxoUyyIaKL2kf
|
|
126
111
|
edsl/language_models/repair.py,sha256=d0i2S3kJfX7JtuCYhlIyT0QP8hcZkRPLanC09lOW_xo,5353
|
127
112
|
edsl/language_models/unused/ReplicateBase.py,sha256=J1oqf7mEyyKhRwNUomnptVqAsVFYCbS3iTW0EXpKtXo,3331
|
128
113
|
edsl/language_models/utilities.py,sha256=GWON2ahCpB-_-hhqmQ5Yi7_rKB4cd8GlucWuq6EnGZQ,2280
|
129
|
-
edsl/notebooks/Notebook.py,sha256=
|
114
|
+
edsl/notebooks/Notebook.py,sha256=YAFLc9p8HMaHq9ZemB5aKRBg-evZ6b4U9W00ds0N2VU,7797
|
130
115
|
edsl/notebooks/__init__.py,sha256=VNUA3nNq04slWNbYaNrzOhQJu3AZANpvBniyCJSzJ7U,45
|
131
116
|
edsl/prompts/Prompt.py,sha256=IfaHS6esguvSDkYtT3oVYQBBVUqGBo9diyZ_MwEQb3U,11433
|
132
117
|
edsl/prompts/__init__.py,sha256=wrtkH7JW72U93_pnmTvqQx_NoadH5OPRNfrZ5AaD7Co,87
|
133
118
|
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=
|
119
|
+
edsl/questions/QuestionBase.py,sha256=4uniwMIFNO8eKt3UA6LBmled6TN2nzEVdlkQ6ZUmsN8,22456
|
120
|
+
edsl/questions/QuestionBaseGenMixin.py,sha256=4WxPuoPRl_b_sPFLJ9KdfPuoYm2_ogkDTVfdD7vLOng,6038
|
121
|
+
edsl/questions/QuestionBasePromptsMixin.py,sha256=lCnC5Uvk-BJNiuy05BL9v9Qn89yyoq5BqH2zb0DHeSs,7837
|
137
122
|
edsl/questions/QuestionBudget.py,sha256=TJgPsyqafJdJw5if0zVxh7zHloourINUqUWfWIlRq9Y,8131
|
138
123
|
edsl/questions/QuestionCheckBox.py,sha256=wC_doEdNZi4y8Uz-tXZyQ2GYS5wQKOWhbVUnyVLoACU,12840
|
139
124
|
edsl/questions/QuestionExtract.py,sha256=PlXwMeZgPAFBXIHSXpFMYTToag-HwA9C7u6-Z3bQMek,6103
|
140
125
|
edsl/questions/QuestionFreeText.py,sha256=NSdPWpTkbBpAKmyN8eS0g2ogOOjWMjWFGYvY2jrsWag,3423
|
141
|
-
edsl/questions/QuestionFunctional.py,sha256=
|
126
|
+
edsl/questions/QuestionFunctional.py,sha256=APuTZ5QNBTLvwv_iNcgFFV81qImiUL3qHMMHjArREf0,5581
|
142
127
|
edsl/questions/QuestionList.py,sha256=vs2AE8OnbwVsly-sorb9dfIibdF1BpOaCRYyvwXYSzY,7209
|
143
128
|
edsl/questions/QuestionMultipleChoice.py,sha256=Yj94-6fwFqDI9UvjwSCOfKnp4gBB86XMmCsL7lbX-t4,10292
|
144
129
|
edsl/questions/QuestionNumerical.py,sha256=_jMZ28DZHYAv_g3Y3vCnmzerMs995on0Ng6j4pDcfHo,4959
|
@@ -152,7 +137,7 @@ edsl/questions/compose_questions.py,sha256=ZcLkwNaofk-o0-skGXEDGZAj6DumOhVhyIUjq
|
|
152
137
|
edsl/questions/decorators.py,sha256=ZijaRYUntAcg0JEztCiOEpcDvvVie___85Zx5ogBQXY,596
|
153
138
|
edsl/questions/derived/QuestionLikertFive.py,sha256=XCpmwlk2qyCxEkiG3UwPqVpS5-k4d4uWyMaxfJg5wkw,2585
|
154
139
|
edsl/questions/derived/QuestionLinearScale.py,sha256=tj_RszK9WumaKRVMS1Fy63-Q6ip4FGBpNU2AtQrWlp8,3304
|
155
|
-
edsl/questions/derived/QuestionTopK.py,sha256=
|
140
|
+
edsl/questions/derived/QuestionTopK.py,sha256=AN-iibO9y-2HdpJJh2FpAV8ImNkC2cb4N_zAKlL8Hkw,3284
|
156
141
|
edsl/questions/derived/QuestionYesNo.py,sha256=KWJyaXSNPNxELtK0nWvIqNtpAF05MMAC0ILUjxXkVwo,2735
|
157
142
|
edsl/questions/derived/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
143
|
edsl/questions/descriptors.py,sha256=wKPVZhccE9kZP8AHoH05OS1rN0t5TyGBGev3M6oTh8c,16170
|
@@ -207,8 +192,8 @@ edsl/questions/templates/yes_no/question_presentation.jinja,sha256=hoEVj4GQD3EYn
|
|
207
192
|
edsl/results/Dataset.py,sha256=udJvOr9ePfD5xfy5k2zaNNWr4Qg_yp5s_f1YKEcVtKc,9547
|
208
193
|
edsl/results/DatasetExportMixin.py,sha256=c0fHbx6DyE54CCoI4I2QuWqTzmaM8LiGrMjyz-hBzMQ,26688
|
209
194
|
edsl/results/DatasetTree.py,sha256=nwEgnWBqRXUxagSCEgqwikmIo8ztUxaF-QH-m-8myyQ,4985
|
210
|
-
edsl/results/Result.py,sha256=
|
211
|
-
edsl/results/Results.py,sha256=
|
195
|
+
edsl/results/Result.py,sha256=4K1L01ORYZvZKAFpqH0bBP_XuSkiGcIi2TUci1ZJS0o,16524
|
196
|
+
edsl/results/Results.py,sha256=Llr6w3iMMGqc-nRjTS00CtIj9T1Q9F4thzj6kkaYbOo,37753
|
212
197
|
edsl/results/ResultsDBMixin.py,sha256=oh1QXKwreSx90PBJyjYsQ7WrLXdNqbe4QULy25Nq7dk,7945
|
213
198
|
edsl/results/ResultsExportMixin.py,sha256=XizBsPNxziyffirMA4kS7UHpYM1WIE4s1K-B7TqTfDw,1266
|
214
199
|
edsl/results/ResultsFetchMixin.py,sha256=VEa0TKDcXbnTinSKs9YaE4WjOSLmlp9Po1_9kklFvSo,848
|
@@ -218,9 +203,9 @@ edsl/results/Selector.py,sha256=WMRVBCwLuQ4ljVzqnZxGKIwqPEL_waK-FqaMY4__ob0,4847
|
|
218
203
|
edsl/results/__init__.py,sha256=2YcyiVtXi-3vIV0ZzOy1PqBLm2gaziufJVi4fdNrAt8,80
|
219
204
|
edsl/results/tree_explore.py,sha256=hQjiO4E71rIOPDgEHgK8T8ukxqoNdgX_tvyiDlG4_9U,4624
|
220
205
|
edsl/scenarios/FileStore.py,sha256=6XeRxYJmxlAWDiVozlO0hINChgECyPTpMjJskAltFzg,14260
|
221
|
-
edsl/scenarios/Scenario.py,sha256=
|
206
|
+
edsl/scenarios/Scenario.py,sha256=GP2dkdU_IXZPxV0HxCNn0GHyC9-rXUjAsdSMh2kvDP0,18601
|
222
207
|
edsl/scenarios/ScenarioHtmlMixin.py,sha256=yKAhYTjR600od8l2KJDaTiz-FC0ppyRzOwNOWO0zxN8,2086
|
223
|
-
edsl/scenarios/ScenarioList.py,sha256=
|
208
|
+
edsl/scenarios/ScenarioList.py,sha256=d-UPxsveu3bLYtd1dRnQJjCrHMu9VwOrikhD_lslFFQ,41439
|
224
209
|
edsl/scenarios/ScenarioListExportMixin.py,sha256=wfffY9xy_1QyIM-1xnisr64izSLjmyuotUYY5iDLodc,1681
|
225
210
|
edsl/scenarios/ScenarioListPdfMixin.py,sha256=z_H2sZn5SCSq6nRLSU5jefaOlh4sqJLyOY_Ld0XCR18,8332
|
226
211
|
edsl/scenarios/__init__.py,sha256=1X03GA_ltVRzNT5KQIuATj3qBcpFCvvGWojr3wggGtk,148
|
@@ -232,10 +217,10 @@ edsl/study/Study.py,sha256=Ytm15XIWgT716scM3HKFSfdBHxRwX6mfMn3l8dgdY1c,18462
|
|
232
217
|
edsl/study/__init__.py,sha256=YAvPLTPG3hK_eN9Ar3d1_d-E3laXpSya879A25-JAxU,170
|
233
218
|
edsl/surveys/DAG.py,sha256=dnIbrfJ_lQ3QEKjpyuo1I6b0kcnW2KMMyPir0A6J4XM,4235
|
234
219
|
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=
|
220
|
+
edsl/surveys/MemoryPlan.py,sha256=9NNue5Z1FQs-H7yz0kFFDc6yTqJGN9pDcmeY15h3SLY,9052
|
221
|
+
edsl/surveys/Rule.py,sha256=Vy0NX7E5V1CmXJS5DhUb8iMJRD8EDHVr8HPD6KCGYt4,12393
|
222
|
+
edsl/surveys/RuleCollection.py,sha256=ID8EN1qAwKcCJz7jMEwh9cF0fHc-O2R8Vi3V_59UNys,14894
|
223
|
+
edsl/surveys/Survey.py,sha256=1TiACeQYVBt-YVboJlbQ6lN76CGUI1mSONVOAh8hkiE,72935
|
239
224
|
edsl/surveys/SurveyCSS.py,sha256=NjJezs2sTlgFprN6IukjGKwNYmNdXnLjzV2w5K4z4RI,8415
|
240
225
|
edsl/surveys/SurveyExportMixin.py,sha256=Kvkd2ku2Kemsn2Nw-Yt8GTnGFcUqfEiKznmisAeO7ck,8339
|
241
226
|
edsl/surveys/SurveyFlowVisualizationMixin.py,sha256=dEG_f-L0ZAyWU5Ta584IX5GZurjVt1tbIISo5z61Jvg,4004
|
@@ -243,8 +228,8 @@ edsl/surveys/SurveyQualtricsImport.py,sha256=SSZv53D1zVhQSfSw-X0_cte0QnkWhE9v922
|
|
243
228
|
edsl/surveys/__init__.py,sha256=vjMYVlP95fHVqqw2FfKXRuYbTArZkZr1nK4FnXzZWzs,129
|
244
229
|
edsl/surveys/base.py,sha256=XJHGEbbsH6hlYYkmI4isVLD8guLz8BdhR-eQRL78mc4,1115
|
245
230
|
edsl/surveys/descriptors.py,sha256=3B-hBVvGpLlVBCyOnPuxkLjesvpr0QIuATbggp_MJ7o,2076
|
246
|
-
edsl/surveys/instructions/ChangeInstruction.py,sha256=
|
247
|
-
edsl/surveys/instructions/Instruction.py,sha256=
|
231
|
+
edsl/surveys/instructions/ChangeInstruction.py,sha256=3zwis7DFKA5XYBt1291Rgcm8EEcH1Tp9rfhYYUDOAMQ,1364
|
232
|
+
edsl/surveys/instructions/Instruction.py,sha256=o85HttLF0-uRhHhZ_67rkPxiF8rlcjuFSEL5MFAoMsM,1496
|
248
233
|
edsl/surveys/instructions/InstructionCollection.py,sha256=eO-i9zgbk8q0D8hnawDrioS-iqXOEE7eKm5cgYNgwrU,2931
|
249
234
|
edsl/surveys/instructions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
250
235
|
edsl/templates/error_reporting/base.html,sha256=IkV24ZaUCNX303ZqVTWkFsJOnu5BG_SULrKN2YejUxQ,552
|
@@ -274,10 +259,11 @@ edsl/utilities/decorators.py,sha256=rlTSMItwmWUxHQBIEUDxX3lFzgtiT8PnfNavakuf-2M,
|
|
274
259
|
edsl/utilities/gcp_bucket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
275
260
|
edsl/utilities/gcp_bucket/cloud_storage.py,sha256=dStHsG181YP9ALW-bkyO-sgMWuLV5aaLsnsCOVD8jJw,3472
|
276
261
|
edsl/utilities/interface.py,sha256=AaKpWiwWBwP2swNXmnFlIf3ZFsjfsR5bjXQAW47tD-8,19656
|
262
|
+
edsl/utilities/naming_utilities.py,sha256=ZIxEe8nX0ZCpcZ14QjnnxBxQ0UBSiNZp6RqC7-gvUCw,4966
|
277
263
|
edsl/utilities/repair_functions.py,sha256=tftmklAqam6LOQQu_-9U44N-llycffhW8LfO63vBmNw,929
|
278
264
|
edsl/utilities/restricted_python.py,sha256=5-_zUhrNbos7pLhDl9nr8d24auRlquR6w-vKkmNjPiA,2060
|
279
265
|
edsl/utilities/utilities.py,sha256=bvi3uSj6HNB9IzjD4_UoRw7o9UAd2WWYXPXbHDVmFP8,11857
|
280
|
-
edsl-0.1.38.
|
281
|
-
edsl-0.1.38.
|
282
|
-
edsl-0.1.38.
|
283
|
-
edsl-0.1.38.
|
266
|
+
edsl-0.1.38.dev2.dist-info/LICENSE,sha256=_qszBDs8KHShVYcYzdMz3HNMtH-fKN_p5zjoVAVumFc,1111
|
267
|
+
edsl-0.1.38.dev2.dist-info/METADATA,sha256=fnaAGvZvnVS9ObcZsfrRQbpUxWsAxYj_XXxLsGrHZdU,4476
|
268
|
+
edsl-0.1.38.dev2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
269
|
+
edsl-0.1.38.dev2.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()
|