edsl 0.1.33__py3-none-any.whl → 0.1.33.dev1__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 -9
- edsl/__init__.py +3 -8
- edsl/__version__.py +1 -1
- edsl/agents/Agent.py +8 -40
- edsl/agents/AgentList.py +0 -43
- edsl/agents/Invigilator.py +219 -135
- edsl/agents/InvigilatorBase.py +59 -148
- edsl/agents/{PromptConstructor.py → PromptConstructionMixin.py} +89 -138
- edsl/agents/__init__.py +0 -1
- edsl/config.py +56 -47
- edsl/coop/coop.py +7 -50
- edsl/data/Cache.py +1 -35
- edsl/data_transfer_models.py +38 -73
- edsl/enums.py +0 -4
- edsl/exceptions/language_models.py +1 -25
- edsl/exceptions/questions.py +5 -62
- edsl/exceptions/results.py +0 -4
- edsl/inference_services/AnthropicService.py +11 -13
- edsl/inference_services/AwsBedrock.py +17 -19
- edsl/inference_services/AzureAI.py +20 -37
- edsl/inference_services/GoogleService.py +12 -16
- edsl/inference_services/GroqService.py +0 -2
- edsl/inference_services/InferenceServiceABC.py +3 -58
- edsl/inference_services/OpenAIService.py +54 -48
- edsl/inference_services/models_available_cache.py +6 -0
- edsl/inference_services/registry.py +0 -6
- edsl/jobs/Answers.py +12 -10
- edsl/jobs/Jobs.py +21 -36
- edsl/jobs/buckets/BucketCollection.py +15 -24
- edsl/jobs/buckets/TokenBucket.py +14 -93
- edsl/jobs/interviews/Interview.py +78 -366
- edsl/jobs/interviews/InterviewExceptionEntry.py +19 -85
- edsl/jobs/interviews/InterviewTaskBuildingMixin.py +286 -0
- edsl/jobs/interviews/{InterviewExceptionCollection.py → interview_exception_tracking.py} +68 -14
- edsl/jobs/interviews/retry_management.py +37 -0
- edsl/jobs/runners/JobsRunnerAsyncio.py +175 -146
- edsl/jobs/runners/JobsRunnerStatusMixin.py +333 -0
- edsl/jobs/tasks/QuestionTaskCreator.py +23 -30
- edsl/jobs/tasks/TaskHistory.py +213 -148
- edsl/language_models/LanguageModel.py +156 -261
- edsl/language_models/ModelList.py +2 -2
- edsl/language_models/RegisterLanguageModelsMeta.py +29 -14
- edsl/language_models/registry.py +6 -23
- edsl/language_models/repair.py +19 -0
- edsl/prompts/Prompt.py +2 -52
- edsl/questions/AnswerValidatorMixin.py +26 -23
- edsl/questions/QuestionBase.py +249 -329
- edsl/questions/QuestionBudget.py +41 -99
- edsl/questions/QuestionCheckBox.py +35 -227
- edsl/questions/QuestionExtract.py +27 -98
- edsl/questions/QuestionFreeText.py +29 -52
- edsl/questions/QuestionFunctional.py +0 -7
- edsl/questions/QuestionList.py +22 -141
- edsl/questions/QuestionMultipleChoice.py +65 -159
- edsl/questions/QuestionNumerical.py +46 -88
- edsl/questions/QuestionRank.py +24 -182
- edsl/questions/RegisterQuestionsMeta.py +12 -31
- edsl/questions/__init__.py +4 -3
- edsl/questions/derived/QuestionLikertFive.py +5 -10
- edsl/questions/derived/QuestionLinearScale.py +2 -15
- edsl/questions/derived/QuestionTopK.py +1 -10
- edsl/questions/derived/QuestionYesNo.py +3 -24
- edsl/questions/descriptors.py +7 -43
- edsl/questions/question_registry.py +2 -6
- edsl/results/Dataset.py +0 -20
- edsl/results/DatasetExportMixin.py +48 -46
- edsl/results/Result.py +5 -32
- edsl/results/Results.py +46 -135
- edsl/results/ResultsDBMixin.py +3 -3
- edsl/scenarios/FileStore.py +10 -71
- edsl/scenarios/Scenario.py +25 -96
- edsl/scenarios/ScenarioImageMixin.py +2 -2
- edsl/scenarios/ScenarioList.py +39 -361
- edsl/scenarios/ScenarioListExportMixin.py +0 -9
- edsl/scenarios/ScenarioListPdfMixin.py +4 -150
- edsl/study/SnapShot.py +1 -8
- edsl/study/Study.py +0 -32
- edsl/surveys/Rule.py +1 -10
- edsl/surveys/RuleCollection.py +5 -21
- edsl/surveys/Survey.py +310 -636
- edsl/surveys/SurveyExportMixin.py +9 -71
- edsl/surveys/SurveyFlowVisualizationMixin.py +1 -2
- edsl/surveys/SurveyQualtricsImport.py +4 -75
- edsl/utilities/gcp_bucket/simple_example.py +9 -0
- edsl/utilities/utilities.py +1 -9
- {edsl-0.1.33.dist-info → edsl-0.1.33.dev1.dist-info}/METADATA +2 -5
- edsl-0.1.33.dev1.dist-info/RECORD +209 -0
- edsl/TemplateLoader.py +0 -24
- edsl/auto/AutoStudy.py +0 -117
- edsl/auto/StageBase.py +0 -230
- edsl/auto/StageGenerateSurvey.py +0 -178
- edsl/auto/StageLabelQuestions.py +0 -125
- edsl/auto/StagePersona.py +0 -61
- edsl/auto/StagePersonaDimensionValueRanges.py +0 -88
- edsl/auto/StagePersonaDimensionValues.py +0 -74
- edsl/auto/StagePersonaDimensions.py +0 -69
- edsl/auto/StageQuestions.py +0 -73
- edsl/auto/SurveyCreatorPipeline.py +0 -21
- edsl/auto/utilities.py +0 -224
- edsl/coop/PriceFetcher.py +0 -58
- edsl/inference_services/MistralAIService.py +0 -120
- edsl/inference_services/TestService.py +0 -80
- edsl/inference_services/TogetherAIService.py +0 -170
- edsl/jobs/FailedQuestion.py +0 -78
- edsl/jobs/runners/JobsRunnerStatus.py +0 -331
- edsl/language_models/fake_openai_call.py +0 -15
- edsl/language_models/fake_openai_service.py +0 -61
- edsl/language_models/utilities.py +0 -61
- edsl/questions/QuestionBaseGenMixin.py +0 -133
- edsl/questions/QuestionBasePromptsMixin.py +0 -266
- edsl/questions/Quick.py +0 -41
- edsl/questions/ResponseValidatorABC.py +0 -170
- edsl/questions/decorators.py +0 -21
- edsl/questions/prompt_templates/question_budget.jinja +0 -13
- edsl/questions/prompt_templates/question_checkbox.jinja +0 -32
- edsl/questions/prompt_templates/question_extract.jinja +0 -11
- edsl/questions/prompt_templates/question_free_text.jinja +0 -3
- edsl/questions/prompt_templates/question_linear_scale.jinja +0 -11
- edsl/questions/prompt_templates/question_list.jinja +0 -17
- edsl/questions/prompt_templates/question_multiple_choice.jinja +0 -33
- edsl/questions/prompt_templates/question_numerical.jinja +0 -37
- edsl/questions/templates/__init__.py +0 -0
- edsl/questions/templates/budget/__init__.py +0 -0
- edsl/questions/templates/budget/answering_instructions.jinja +0 -7
- edsl/questions/templates/budget/question_presentation.jinja +0 -7
- edsl/questions/templates/checkbox/__init__.py +0 -0
- edsl/questions/templates/checkbox/answering_instructions.jinja +0 -10
- edsl/questions/templates/checkbox/question_presentation.jinja +0 -22
- edsl/questions/templates/extract/__init__.py +0 -0
- edsl/questions/templates/extract/answering_instructions.jinja +0 -7
- edsl/questions/templates/extract/question_presentation.jinja +0 -1
- 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 +0 -1
- edsl/questions/templates/likert_five/__init__.py +0 -0
- edsl/questions/templates/likert_five/answering_instructions.jinja +0 -10
- edsl/questions/templates/likert_five/question_presentation.jinja +0 -12
- edsl/questions/templates/linear_scale/__init__.py +0 -0
- edsl/questions/templates/linear_scale/answering_instructions.jinja +0 -5
- edsl/questions/templates/linear_scale/question_presentation.jinja +0 -5
- edsl/questions/templates/list/__init__.py +0 -0
- edsl/questions/templates/list/answering_instructions.jinja +0 -4
- edsl/questions/templates/list/question_presentation.jinja +0 -5
- edsl/questions/templates/multiple_choice/__init__.py +0 -0
- edsl/questions/templates/multiple_choice/answering_instructions.jinja +0 -9
- edsl/questions/templates/multiple_choice/html.jinja +0 -0
- edsl/questions/templates/multiple_choice/question_presentation.jinja +0 -12
- edsl/questions/templates/numerical/__init__.py +0 -0
- edsl/questions/templates/numerical/answering_instructions.jinja +0 -8
- edsl/questions/templates/numerical/question_presentation.jinja +0 -7
- edsl/questions/templates/rank/__init__.py +0 -0
- edsl/questions/templates/rank/answering_instructions.jinja +0 -11
- edsl/questions/templates/rank/question_presentation.jinja +0 -15
- edsl/questions/templates/top_k/__init__.py +0 -0
- edsl/questions/templates/top_k/answering_instructions.jinja +0 -8
- edsl/questions/templates/top_k/question_presentation.jinja +0 -22
- edsl/questions/templates/yes_no/__init__.py +0 -0
- edsl/questions/templates/yes_no/answering_instructions.jinja +0 -6
- edsl/questions/templates/yes_no/question_presentation.jinja +0 -12
- edsl/results/DatasetTree.py +0 -145
- edsl/results/Selector.py +0 -118
- edsl/results/tree_explore.py +0 -115
- edsl/surveys/instructions/ChangeInstruction.py +0 -47
- edsl/surveys/instructions/Instruction.py +0 -34
- edsl/surveys/instructions/InstructionCollection.py +0 -77
- edsl/surveys/instructions/__init__.py +0 -0
- edsl/templates/error_reporting/base.html +0 -24
- edsl/templates/error_reporting/exceptions_by_model.html +0 -35
- edsl/templates/error_reporting/exceptions_by_question_name.html +0 -17
- edsl/templates/error_reporting/exceptions_by_type.html +0 -17
- edsl/templates/error_reporting/interview_details.html +0 -116
- edsl/templates/error_reporting/interviews.html +0 -10
- edsl/templates/error_reporting/overview.html +0 -5
- edsl/templates/error_reporting/performance_plot.html +0 -2
- edsl/templates/error_reporting/report.css +0 -74
- edsl/templates/error_reporting/report.html +0 -118
- edsl/templates/error_reporting/report.js +0 -25
- edsl-0.1.33.dist-info/RECORD +0 -295
- {edsl-0.1.33.dist-info → edsl-0.1.33.dev1.dist-info}/LICENSE +0 -0
- {edsl-0.1.33.dist-info → edsl-0.1.33.dev1.dist-info}/WHEEL +0 -0
@@ -2,27 +2,6 @@
|
|
2
2
|
|
3
3
|
from typing import Union, Optional
|
4
4
|
|
5
|
-
import subprocess
|
6
|
-
import platform
|
7
|
-
import os
|
8
|
-
import tempfile
|
9
|
-
|
10
|
-
|
11
|
-
def open_docx(file_path):
|
12
|
-
"""
|
13
|
-
Open a docx file using the default application in a cross-platform manner.
|
14
|
-
|
15
|
-
:param file_path: str, path to the docx file
|
16
|
-
"""
|
17
|
-
file_path = os.path.abspath(file_path)
|
18
|
-
|
19
|
-
if platform.system() == "Darwin": # macOS
|
20
|
-
subprocess.call(("open", file_path))
|
21
|
-
elif platform.system() == "Windows": # Windows
|
22
|
-
os.startfile(file_path)
|
23
|
-
else: # linux variants
|
24
|
-
subprocess.call(("xdg-open", file_path))
|
25
|
-
|
26
5
|
|
27
6
|
class SurveyExportMixin:
|
28
7
|
"""A mixin class for exporting surveys to different formats."""
|
@@ -46,12 +25,7 @@ class SurveyExportMixin:
|
|
46
25
|
)
|
47
26
|
return q.run().select("description").first()
|
48
27
|
|
49
|
-
def docx(
|
50
|
-
self,
|
51
|
-
return_document_object: bool = False,
|
52
|
-
filename: Optional[str] = None,
|
53
|
-
open_file: bool = False,
|
54
|
-
) -> Union["Document", None]:
|
28
|
+
def docx(self, filename=None) -> Union["Document", None]:
|
55
29
|
"""Generate a docx document for the survey."""
|
56
30
|
from docx import Document
|
57
31
|
|
@@ -71,55 +45,19 @@ class SurveyExportMixin:
|
|
71
45
|
if hasattr(question, "question_options"):
|
72
46
|
for option in getattr(question, "question_options", []):
|
73
47
|
doc.add_paragraph(str(option), style="ListBullet")
|
48
|
+
if filename:
|
49
|
+
doc.save(filename)
|
50
|
+
print("The survey has been saved to", filename)
|
51
|
+
return
|
52
|
+
return doc
|
74
53
|
|
75
|
-
|
76
|
-
return doc
|
77
|
-
|
78
|
-
if filename is None:
|
79
|
-
with tempfile.NamedTemporaryFile(
|
80
|
-
"w", delete=False, suffix=".docx", dir=os.getcwd()
|
81
|
-
) as f:
|
82
|
-
filename = f.name
|
83
|
-
|
84
|
-
doc.save(filename)
|
85
|
-
print("The survey has been saved to", filename)
|
86
|
-
if open_file:
|
87
|
-
open_docx(filename)
|
88
|
-
return
|
89
|
-
|
90
|
-
def show(self):
|
91
|
-
self.to_scenario_list(questions_only=False, rename=True).print(format="rich")
|
92
|
-
|
93
|
-
def to_scenario_list(
|
94
|
-
self, questions_only: bool = True, rename=False
|
95
|
-
) -> "ScenarioList":
|
54
|
+
def to_scenario_list(self) -> "ScenarioList":
|
96
55
|
from edsl import ScenarioList, Scenario
|
97
56
|
|
98
|
-
# from edsl.questions import QuestionBase
|
99
|
-
|
100
|
-
if questions_only:
|
101
|
-
to_iterate_over = self._questions
|
102
|
-
else:
|
103
|
-
to_iterate_over = self.recombined_questions_and_instructions()
|
104
|
-
|
105
|
-
if rename:
|
106
|
-
renaming_dict = {
|
107
|
-
"name": "identifier",
|
108
|
-
"question_name": "identifier",
|
109
|
-
"question_text": "text",
|
110
|
-
}
|
111
|
-
else:
|
112
|
-
renaming_dict = {}
|
113
|
-
|
114
57
|
all_keys = set([])
|
115
58
|
scenarios = ScenarioList()
|
116
|
-
for
|
117
|
-
d =
|
118
|
-
if item.__class__.__name__ == "Instruction":
|
119
|
-
d["question_type"] = "NA / instruction"
|
120
|
-
for key in renaming_dict:
|
121
|
-
if key in d:
|
122
|
-
d[renaming_dict[key]] = d.pop(key)
|
59
|
+
for q in self._questions:
|
60
|
+
d = q.to_dict()
|
123
61
|
all_keys.update(d.keys())
|
124
62
|
scenarios.append(Scenario(d))
|
125
63
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
"""A mixin for visualizing the flow of a survey."""
|
2
2
|
|
3
|
-
from typing import Optional
|
4
3
|
from edsl.surveys.base import RulePriority, EndOfSurvey
|
5
4
|
import tempfile
|
6
5
|
|
@@ -8,7 +7,7 @@ import tempfile
|
|
8
7
|
class SurveyFlowVisualizationMixin:
|
9
8
|
"""A mixin for visualizing the flow of a survey."""
|
10
9
|
|
11
|
-
def show_flow(self, filename:
|
10
|
+
def show_flow(self, filename: str = None):
|
12
11
|
"""Create an image showing the flow of users through the survey."""
|
13
12
|
# Create a graph object
|
14
13
|
import pydot
|
@@ -9,7 +9,7 @@ qualtrics_codes = {
|
|
9
9
|
"TE": "free_text",
|
10
10
|
"MC": "multiple_choice",
|
11
11
|
"Matrix": "matrix",
|
12
|
-
"DB": "
|
12
|
+
"DB": "free_text", # not quite right, but for now
|
13
13
|
"Timing": "free_text", # not quite right, but for now
|
14
14
|
}
|
15
15
|
# TE (Text Entry): Allows respondents to input a text response.
|
@@ -84,11 +84,6 @@ class QualtricsQuestion:
|
|
84
84
|
return None
|
85
85
|
|
86
86
|
def to_edsl(self):
|
87
|
-
if self.question_type == "instruction":
|
88
|
-
from edsl import Instruction
|
89
|
-
|
90
|
-
return [Instruction(text=self.question_text, name=self.question_name)]
|
91
|
-
|
92
87
|
if self.question_type == "free_text":
|
93
88
|
try:
|
94
89
|
q = Question(
|
@@ -192,14 +187,11 @@ class SurveyQualtricsImport:
|
|
192
187
|
questions.extend(qualtrics_questions.to_edsl())
|
193
188
|
return Survey(questions)
|
194
189
|
|
195
|
-
|
196
|
-
def survey_data(self):
|
190
|
+
def extract_questions_from_json(self):
|
197
191
|
with open(self.qsf_file_name, "r") as f:
|
198
192
|
survey_data = json.load(f)
|
199
|
-
return survey_data
|
200
193
|
|
201
|
-
|
202
|
-
questions = self.survey_data["SurveyElements"]
|
194
|
+
questions = survey_data["SurveyElements"]
|
203
195
|
|
204
196
|
extracted_questions = []
|
205
197
|
|
@@ -209,74 +201,11 @@ class SurveyQualtricsImport:
|
|
209
201
|
|
210
202
|
return extracted_questions
|
211
203
|
|
212
|
-
def extract_blocks_from_json(self):
|
213
|
-
blocks = []
|
214
|
-
|
215
|
-
for element in self.survey_data["SurveyElements"]:
|
216
|
-
if element["Element"] == "BL":
|
217
|
-
for block_payload in element["Payload"]:
|
218
|
-
block_elements = [
|
219
|
-
BlockElement(be["Type"], be["QuestionID"])
|
220
|
-
for be in block_payload["BlockElements"]
|
221
|
-
]
|
222
|
-
options_data = block_payload.get("Options", {})
|
223
|
-
options = BlockOptions(
|
224
|
-
options_data.get("BlockLocking", "false"),
|
225
|
-
options_data.get("RandomizeQuestions", "false"),
|
226
|
-
options_data.get("BlockVisibility", "Collapsed"),
|
227
|
-
)
|
228
|
-
|
229
|
-
block = SurveyBlock(
|
230
|
-
block_payload["Type"],
|
231
|
-
block_payload["Description"],
|
232
|
-
block_payload["ID"],
|
233
|
-
block_elements,
|
234
|
-
options,
|
235
|
-
)
|
236
|
-
blocks.append(block)
|
237
|
-
|
238
|
-
return blocks
|
239
|
-
|
240
|
-
|
241
|
-
class SurveyBlock:
|
242
|
-
def __init__(self, block_type, description, block_id, block_elements, options):
|
243
|
-
self.block_type = block_type
|
244
|
-
self.description = description
|
245
|
-
self.block_id = block_id
|
246
|
-
self.block_elements = block_elements
|
247
|
-
self.options = options
|
248
|
-
|
249
|
-
def __repr__(self):
|
250
|
-
return f"SurveyBlock(type={self.block_type}, description={self.description}, id={self.block_id})"
|
251
|
-
|
252
|
-
|
253
|
-
class BlockElement:
|
254
|
-
def __init__(self, element_type, question_id):
|
255
|
-
self.element_type = element_type
|
256
|
-
self.question_id = question_id
|
257
|
-
|
258
|
-
def __repr__(self):
|
259
|
-
return f"BlockElement(type={self.element_type}, question_id={self.question_id})"
|
260
|
-
|
261
|
-
|
262
|
-
class BlockOptions:
|
263
|
-
def __init__(self, block_locking, randomize_questions, block_visibility):
|
264
|
-
self.block_locking = block_locking
|
265
|
-
self.randomize_questions = randomize_questions
|
266
|
-
self.block_visibility = block_visibility
|
267
|
-
|
268
|
-
def __repr__(self):
|
269
|
-
return (
|
270
|
-
f"BlockOptions(block_locking={self.block_locking}, "
|
271
|
-
f"randomize_questions={self.randomize_questions}, "
|
272
|
-
f"block_visibility={self.block_visibility})"
|
273
|
-
)
|
274
|
-
|
275
204
|
|
276
205
|
if __name__ == "__main__":
|
277
206
|
survey_creator = SurveyQualtricsImport("example.qsf")
|
278
207
|
# print(survey_creator.question_data)
|
279
|
-
|
208
|
+
survey = survey_creator.create_survey()
|
280
209
|
# info = survey.push()
|
281
210
|
# print(info)
|
282
211
|
# questions = survey.extract_questions_from_json()
|
edsl/utilities/utilities.py
CHANGED
@@ -20,14 +20,6 @@ from html import escape
|
|
20
20
|
from typing import Callable, Union
|
21
21
|
|
22
22
|
|
23
|
-
class CustomEncoder(json.JSONEncoder):
|
24
|
-
def default(self, obj):
|
25
|
-
try:
|
26
|
-
return json.JSONEncoder.default(self, obj)
|
27
|
-
except TypeError:
|
28
|
-
return str(obj)
|
29
|
-
|
30
|
-
|
31
23
|
def time_it(func):
|
32
24
|
@wraps(func)
|
33
25
|
def wrapper(*args, **kwargs):
|
@@ -132,7 +124,7 @@ def data_to_html(data, replace_new_lines=False):
|
|
132
124
|
from pygments.formatters import HtmlFormatter
|
133
125
|
from IPython.display import HTML
|
134
126
|
|
135
|
-
json_str = json.dumps(data, indent=4
|
127
|
+
json_str = json.dumps(data, indent=4)
|
136
128
|
formatted_json = highlight(
|
137
129
|
json_str,
|
138
130
|
JsonLexer(),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: edsl
|
3
|
-
Version: 0.1.33
|
3
|
+
Version: 0.1.33.dev1
|
4
4
|
Summary: Create and analyze LLM-based surveys
|
5
5
|
Home-page: https://www.expectedparrot.com/
|
6
6
|
License: MIT
|
@@ -23,11 +23,9 @@ Requires-Dist: black[jupyter] (>=24.4.2,<25.0.0)
|
|
23
23
|
Requires-Dist: boto3 (>=1.34.161,<2.0.0)
|
24
24
|
Requires-Dist: groq (>=0.9.0,<0.10.0)
|
25
25
|
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
|
26
|
-
Requires-Dist: json-repair (>=0.28.4,<0.29.0)
|
27
26
|
Requires-Dist: jupyter (>=1.0.0,<2.0.0)
|
28
27
|
Requires-Dist: markdown2 (>=2.4.11,<3.0.0)
|
29
28
|
Requires-Dist: matplotlib (>=3.8,<3.9)
|
30
|
-
Requires-Dist: mistralai (>=1.0.2,<2.0.0)
|
31
29
|
Requires-Dist: nest-asyncio (>=1.5.9,<2.0.0)
|
32
30
|
Requires-Dist: numpy (>=1.22,<2.0)
|
33
31
|
Requires-Dist: openai (>=1.4.0,<2.0.0)
|
@@ -45,7 +43,6 @@ Requires-Dist: setuptools (<72.0)
|
|
45
43
|
Requires-Dist: simpleeval (>=0.9.13,<0.10.0)
|
46
44
|
Requires-Dist: sqlalchemy (>=2.0.23,<3.0.0)
|
47
45
|
Requires-Dist: tenacity (>=8.2.3,<9.0.0)
|
48
|
-
Requires-Dist: urllib3 (>=1.25.4,<1.27)
|
49
46
|
Project-URL: Documentation, https://docs.expectedparrot.com
|
50
47
|
Description-Content-Type: text/markdown
|
51
48
|
|
@@ -70,7 +67,7 @@ A quick example:
|
|
70
67
|
|
71
68
|
```python
|
72
69
|
# Import a question type
|
73
|
-
from edsl import QuestionMultipleChoice
|
70
|
+
from edsl.questions import QuestionMultipleChoice
|
74
71
|
|
75
72
|
# Construct a question using the question type template
|
76
73
|
q = QuestionMultipleChoice(
|
@@ -0,0 +1,209 @@
|
|
1
|
+
edsl/Base.py,sha256=ttNxUotSd9LSEJl2w6LdMtT78d0nMQvYDJ0q4JkqBfg,8945
|
2
|
+
edsl/BaseDiff.py,sha256=RoVEh52UJs22yMa7k7jv8se01G62jJNWnBzaZngo-Ug,8260
|
3
|
+
edsl/__init__.py,sha256=E6PkWI_owu8AUc4uJs2XWDVozqSbcRWzsIqf8_Kskho,1631
|
4
|
+
edsl/__version__.py,sha256=X6lFB08-Y7atQgG3fk8iymIvdiZo3YA8OnNvAv2d2Zc,28
|
5
|
+
edsl/agents/Agent.py,sha256=qNJsQkN6HuTKqJrQbuUEgRX3Wo7Dwukle0oNWPi0UIE,27191
|
6
|
+
edsl/agents/AgentList.py,sha256=_MsdeOEgaANAceLIXwuLC22mwlBn0ruGX4GEqz8_SSY,9467
|
7
|
+
edsl/agents/Invigilator.py,sha256=8nv98bjfal6Q-GVmsxj5Isqn-GLqXDXEijSai3KAbgQ,10923
|
8
|
+
edsl/agents/InvigilatorBase.py,sha256=ncha1HF2V1Dz4f50Gekg6AzUXCD2Af82ztfSJZbgOHY,7469
|
9
|
+
edsl/agents/PromptConstructionMixin.py,sha256=rC86neoY1-u5cIBozQalvVR8GUS6AMx76sSia8oz2Eg,17320
|
10
|
+
edsl/agents/__init__.py,sha256=a3H1lxDwu9HR8fwh79C5DgxPSFv_bE2rzQ6y1D8Ba5c,80
|
11
|
+
edsl/agents/descriptors.py,sha256=m8ND3-2-JbgNX1HGakBNLIeemwsgYa1mQxYO9GW33hw,2934
|
12
|
+
edsl/base/Base.py,sha256=DShsfI6A2ojg42muPFpVtUgTX33pnqT5vtN0SRlr-9Q,8866
|
13
|
+
edsl/config.py,sha256=CVdmS8L7nNAas_N9kLOVDUXqsKKLSUwvS62eFHd4xbw,6245
|
14
|
+
edsl/conjure/AgentConstructionMixin.py,sha256=qLLYJH02HotVwBUYzaHs4QW0t5nsC3NX15qxQLzEwLI,5702
|
15
|
+
edsl/conjure/Conjure.py,sha256=JaCuAm3rmqjh11_X8PXgvPsVHGql3yTn9JEzVlzOUVU,2019
|
16
|
+
edsl/conjure/InputData.py,sha256=RdFgkzzayddSTd6vcwBB8LC796YBj94pciwrQx9nBtg,22003
|
17
|
+
edsl/conjure/InputDataCSV.py,sha256=m4hHSQogxt7LNcGNxcGRkrbdGy8pIQu5KvXhIEt9i6k,1684
|
18
|
+
edsl/conjure/InputDataMixinQuestionStats.py,sha256=Jav5pqYCLSQ1pAbGV8O9VCBu0vL8Q6pteSEhRKrONuw,6256
|
19
|
+
edsl/conjure/InputDataPyRead.py,sha256=phGmzVi06jdbcxgngAp_lEawGkJr5dAC2B4ho5IrAy4,3064
|
20
|
+
edsl/conjure/InputDataSPSS.py,sha256=lv7NK8lpUfjsWh8h9MpqQrCjJX6Oyg3tIOrXcQYcS_4,223
|
21
|
+
edsl/conjure/InputDataStata.py,sha256=WbA7oUGHgHJgugKjakXzpFfzWxTI4bXGGSZLxM1-tEM,224
|
22
|
+
edsl/conjure/QuestionOptionMixin.py,sha256=RSLZ7AmA65MfwyxKKjqprR9FdkLP6MsCcmTbJoqu-MM,2870
|
23
|
+
edsl/conjure/QuestionTypeMixin.py,sha256=L2vU207aeezlI1OuJ4I4SdtFCWBZzE-mBk7VwnTghO8,892
|
24
|
+
edsl/conjure/RawQuestion.py,sha256=lo8k1aln4RfnfeS6OukzwC7P_cRe2LVZxcL6uwmim6A,2116
|
25
|
+
edsl/conjure/SurveyResponses.py,sha256=fdJNFasSXVf7S5KCsYE9WB6w17q7VRylzw0aD5zGO_M,191
|
26
|
+
edsl/conjure/__init__.py,sha256=1lPYFjV73GzYYSXiTyxopM4nKcXVHumEEo0fe06DbMo,535
|
27
|
+
edsl/conjure/examples/placeholder.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
|
+
edsl/conjure/naming_utilities.py,sha256=8uoGaCPZQKLwz2HudtsFSovivTGumQrFYxXxck5WUZQ,4964
|
29
|
+
edsl/conjure/utilities.py,sha256=yRdOJx9KIpWXMx41Bbfysx7Zd4v2ROwca5L4T1rmtQM,5539
|
30
|
+
edsl/conversation/Conversation.py,sha256=NdWH62XpcF6hoaG0ScMho_c3TO7PfBnbdlppUN-j07k,7627
|
31
|
+
edsl/conversation/car_buying.py,sha256=Quh2Q8O9YoCyTKJUy3li376QFIOcL1gX0y89w3wlSl4,1950
|
32
|
+
edsl/conversation/mug_negotiation.py,sha256=mjvAqErD4AjN3G2za2c-X-3axOShW-zAJUeiJqTxVPA,2616
|
33
|
+
edsl/conversation/next_speaker_utilities.py,sha256=bqr5JglCd6bdLc9IZ5zGOAsmN2F4ERiubSMYvZIG7qk,3629
|
34
|
+
edsl/coop/__init__.py,sha256=4iZCwJSzJVyjBYk8ggGxY2kZjq9dXVT1jhyPDNyew4I,115
|
35
|
+
edsl/coop/coop.py,sha256=p2JvhzUpjXEaiFWafCpkfsPIsH2BqV9ePAJCKsKfFOo,27138
|
36
|
+
edsl/coop/utils.py,sha256=UZwljKYW_Yjw7RYcjOg3SW7fn1pyHQfJ1fM48TBNoss,3601
|
37
|
+
edsl/data/Cache.py,sha256=aR9ydTFvUWiRJZd2G7SLFFtZaS2At8ArbQ1SAhYZBDs,15629
|
38
|
+
edsl/data/CacheEntry.py,sha256=_5UiFaJQu_U-Z1_lEPt-h6Gaidp2Eunk02wOd3Ni3MQ,7252
|
39
|
+
edsl/data/CacheHandler.py,sha256=DxbfeT2nZGRu8yQkbWr2tyEnhNiClevMsd5KZMCq2f0,4793
|
40
|
+
edsl/data/SQLiteDict.py,sha256=V5Nfnxctgh4Iblqcw1KmbnkjtfmWrrombROSQ3mvg6A,8979
|
41
|
+
edsl/data/__init__.py,sha256=KBNGGEuGHq--D-TlpAQmvv_If906dJc1Gsy028zOx78,170
|
42
|
+
edsl/data/orm.py,sha256=Jz6rvw5SrlxwysTL0QI9r68EflKxeEBmf6j6himHDS8,238
|
43
|
+
edsl/data_transfer_models.py,sha256=ORcI-g_oUE8EofLvHQKnWC5ar-IgZiXGY2bIpTGAZyQ,1157
|
44
|
+
edsl/enums.py,sha256=Ef-3pvC-uCMPYwdUrxeCo4Xx3zoOQiimU3W_vhKCir4,5077
|
45
|
+
edsl/exceptions/__init__.py,sha256=HVg-U-rJ0fRoG9Rws6gnK5S9B68SkPWDPsoD6KpMZ-A,1370
|
46
|
+
edsl/exceptions/agents.py,sha256=3SORFwFbMGrF6-vAL2GrKEVdPcXo7md_k2oYufnVXHA,673
|
47
|
+
edsl/exceptions/configuration.py,sha256=qH2sInNTndKlCLAaNgaXHyRFdKQHL7-dElB_j8wz9g4,351
|
48
|
+
edsl/exceptions/coop.py,sha256=xDr7k_Tir6L5AxO6GMmoFyUjZ3DIenPQflpUkaTqJl0,38
|
49
|
+
edsl/exceptions/data.py,sha256=K24CjgwFiMWxrF1Z2dF6F7Vfrge_y9kMK_wsYYSaroU,209
|
50
|
+
edsl/exceptions/general.py,sha256=zAyJnppPjjxQAn6X3A5fetmv5FUR7kQDU58vwBKvAks,1114
|
51
|
+
edsl/exceptions/jobs.py,sha256=sSUATmzBIN1oINWuwPExxPqIWmfCo0XYj_yR4dJzVjo,803
|
52
|
+
edsl/exceptions/language_models.py,sha256=KDChmr2rVGa1lj57i9-QGSLYTOeguRYyF2z8FyXEplA,1017
|
53
|
+
edsl/exceptions/prompts.py,sha256=vD_reI-RVKWYHYozenEmhmB7Rb1sIiXghgNUtbVGBUo,247
|
54
|
+
edsl/exceptions/questions.py,sha256=9z6RI7HRH-UMrnIlt28VTj9deCSbD1Frmpqi0H6YtF0,534
|
55
|
+
edsl/exceptions/results.py,sha256=cn6Zb86Y648ulN3RYXb52HGv1NT3ykBfE6g2Xu8TeIw,325
|
56
|
+
edsl/exceptions/surveys.py,sha256=lADtr-tvPmUYSfRy3TdkTV5SzZfShlMgCzm-ZGYRlGk,557
|
57
|
+
edsl/inference_services/AnthropicService.py,sha256=tjYRJRIvQ7Z6uCYdqxm5ZlVjZdVZCnHtQ6QGHT59PXs,2822
|
58
|
+
edsl/inference_services/AwsBedrock.py,sha256=shSh0QXyQC3c0KPfUi-y74TGFm1NxTSK6x9FtXi5ptI,3971
|
59
|
+
edsl/inference_services/AzureAI.py,sha256=9D_uZ_OakJY3JLIioCdpvX4jwerrfizLu86KDWnV_2g,8041
|
60
|
+
edsl/inference_services/DeepInfraService.py,sha256=fWlH5sCNxf8eHPHxPPxJMEVWpCM9sDenkC8IZYqtXfA,515
|
61
|
+
edsl/inference_services/GoogleService.py,sha256=IwSwXr7khvHjpDzgiW5PRVKMhI2wQ9D1_H1MRnHjefU,2732
|
62
|
+
edsl/inference_services/GroqService.py,sha256=vcHiMqdo4eryg2pOk2SfTNpTnvCrx8qkIwtJjVPDnZU,433
|
63
|
+
edsl/inference_services/InferenceServiceABC.py,sha256=H6jW2gDKTLC3xgmqiSBdX4pGY1oauEO8VqGZoB3qvnQ,1790
|
64
|
+
edsl/inference_services/InferenceServicesCollection.py,sha256=EDyxnoSjGXhWob_ost7U8WUYjn1jgL_noB0-VlXBnOo,2810
|
65
|
+
edsl/inference_services/OllamaService.py,sha256=oro9CRl8IUE2Ro-zE69Cr4Zaf6Gdw29XW5CFU-46E0k,498
|
66
|
+
edsl/inference_services/OpenAIService.py,sha256=_ikUPzyG3oe57NKfcCC7W20Ktis4kK1FWZ01zBbPa28,7719
|
67
|
+
edsl/inference_services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
|
+
edsl/inference_services/models_available_cache.py,sha256=aTJAYKjntQtb95jwmEB_QXjvwclydqZIqRhrkBw9CAM,3483
|
69
|
+
edsl/inference_services/rate_limits_cache.py,sha256=HYslviz7mxF9U4CUTPAkoyBsiXjSju-YCp4HHir6e34,1398
|
70
|
+
edsl/inference_services/registry.py,sha256=9bPIn6EJsStsNN_3bzkBDVoOLgwAtmUKle18mZskFJs,865
|
71
|
+
edsl/inference_services/write_available.py,sha256=NNwhATlaMp8IYY635MSx-oYxt5X15acjAfaqYCo_I1Y,285
|
72
|
+
edsl/jobs/Answers.py,sha256=z4TADN-iHIrbMtI1jVyiaetv0OkTv768dFBpREIQC6c,1799
|
73
|
+
edsl/jobs/Jobs.py,sha256=jnfMbz4VHdDJifGmn3wxEm1_NvYGT6L7LlD41pT9Rsk,33282
|
74
|
+
edsl/jobs/__init__.py,sha256=aKuAyd_GoalGj-k7djOoVwEbFUE2XLPlikXaA1_8yAg,32
|
75
|
+
edsl/jobs/buckets/BucketCollection.py,sha256=LA8DBVwMdeTFCbSDI0S2cDzfi_Qo6kRizwrG64tE8S4,1844
|
76
|
+
edsl/jobs/buckets/ModelBuckets.py,sha256=hxw_tzc0V42CiB7mh5jIxlgwDVJ-zFZhlLtKrHEg8ho,2419
|
77
|
+
edsl/jobs/buckets/TokenBucket.py,sha256=A4ZHDztlswRXlsdOmtAoyy9gBj3Y5rgOeKsy_U62sp4,6320
|
78
|
+
edsl/jobs/interviews/Interview.py,sha256=6CeWoHvhDqIbhBCrNubDvinBSa7K-Rks5ilGmJNFMg4,12028
|
79
|
+
edsl/jobs/interviews/InterviewExceptionEntry.py,sha256=N_-3_KwXTZLhGNwZSyTgUMS0lE-hikWRy2AzLOduTDQ,2772
|
80
|
+
edsl/jobs/interviews/InterviewStatistic.py,sha256=hY5d2EkIJ96NilPpZAvZZzZoxLXM7ss3xx5MIcKtTPs,1856
|
81
|
+
edsl/jobs/interviews/InterviewStatisticsCollection.py,sha256=_ZZ0fnZBQiIywP9Q_wWjpWhlfcPe2cn32GKut10t5RI,788
|
82
|
+
edsl/jobs/interviews/InterviewStatusDictionary.py,sha256=MSyys4hOWe1d8gfsUvAPbcKrs8YiPnz8jpufBSJL7SU,2485
|
83
|
+
edsl/jobs/interviews/InterviewStatusLog.py,sha256=6u0F8gf5tha39VQL-IK_QPkCsQAYVOx_IesX7TDDX_A,3252
|
84
|
+
edsl/jobs/interviews/InterviewStatusMixin.py,sha256=VV0Pel-crUsLoGpTifeIIkXsLGj0bfuO--UtpRnH-dU,1251
|
85
|
+
edsl/jobs/interviews/InterviewTaskBuildingMixin.py,sha256=O1XwX6QqhQ-M-b4fqy0XzopLna2A8BTrdjKcz3N0XHs,11505
|
86
|
+
edsl/jobs/interviews/ReportErrors.py,sha256=RSzDU2rWwtjfztj7sqaMab0quCiY-X2bG3AEOxhTim8,1745
|
87
|
+
edsl/jobs/interviews/interview_exception_tracking.py,sha256=GF5PIj601rZPa5XWx1vTbFRt662S0CEoHYpG4Wulxj8,5066
|
88
|
+
edsl/jobs/interviews/interview_status_enum.py,sha256=KJ-1yLAHdX-p8TiFnM0M3v1tnBwkq4aMCuBX6-ytrI8,229
|
89
|
+
edsl/jobs/interviews/retry_management.py,sha256=9Efn4B3aV45vbocnF6J5WQt88i2FgFjoi5ALzGUukEE,1375
|
90
|
+
edsl/jobs/runners/JobsRunnerAsyncio.py,sha256=U6_tJyTIxZmHNtJw7Gn4cpAU8Pzvfq3n9s39fVjsGkc,12802
|
91
|
+
edsl/jobs/runners/JobsRunnerStatusData.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
|
+
edsl/jobs/runners/JobsRunnerStatusMixin.py,sha256=MmVK2udusAbQ3KCkQPiQYjWVDfKprBk9Ecelgui__0k,13424
|
93
|
+
edsl/jobs/tasks/QuestionTaskCreator.py,sha256=f-hF7TMdMMjQ5AQMpMJXrFdBUNSLrLHHl1sun774f_U,10394
|
94
|
+
edsl/jobs/tasks/TaskCreators.py,sha256=XqAbNU33378Z4PQncokbfJwnKt3KHR9aqa5fKYRDpfg,2694
|
95
|
+
edsl/jobs/tasks/TaskHistory.py,sha256=PV1G1VdaZNV3GQ_m1L4a_7uPmrEGZw4K-hn8gJe_aDE,16220
|
96
|
+
edsl/jobs/tasks/TaskStatusLog.py,sha256=bqH36a32F12fjX-M-4lNOhHaK2-WLFzKE-r0PxZPRjI,546
|
97
|
+
edsl/jobs/tasks/task_management.py,sha256=KMToZuXzMlnHRHUF_VHL0-lHMTGhklf2GHVuwEEHtzA,301
|
98
|
+
edsl/jobs/tasks/task_status_enum.py,sha256=DOyrz61YlIS8R1W7izJNphcLrJ7I_ReUlfdRmk23h0Q,5333
|
99
|
+
edsl/jobs/tokens/InterviewTokenUsage.py,sha256=u_6-IHpGFwZ6qMEXr24-jyLVUSSp4dSs_4iAZsBv7O4,1100
|
100
|
+
edsl/jobs/tokens/TokenUsage.py,sha256=odj2-wDNEbHl9noyFAQ0DSKV0D9cv3aDOpmXufKZ8O4,1323
|
101
|
+
edsl/language_models/LanguageModel.py,sha256=klXlrI3Xty7EpT3MB1OUzbue38zRkvzA0vrZOLuQLmo,21569
|
102
|
+
edsl/language_models/ModelList.py,sha256=G8tzHqzz4exc28BGvGgVRk1Xwu8EDCiVWxMC5l8VnvI,2862
|
103
|
+
edsl/language_models/RegisterLanguageModelsMeta.py,sha256=2bvWrVau2BRo-Bb1aO-QATH8xxuW_tF7NmqBMGDOfSg,8191
|
104
|
+
edsl/language_models/__init__.py,sha256=bvY7Gy6VkX1gSbNkRbGPS-M1kUnb0EohL0FSagaEaTs,109
|
105
|
+
edsl/language_models/registry.py,sha256=h5eLN7lsqpK5vcEsxn3gsARb9Qyx-k3jq2MMnyuATcY,3727
|
106
|
+
edsl/language_models/repair.py,sha256=xaNunBRpMWgceSPOzk-ugp5WXtgLuuhj23TgXUeOobw,5963
|
107
|
+
edsl/language_models/unused/ReplicateBase.py,sha256=J1oqf7mEyyKhRwNUomnptVqAsVFYCbS3iTW0EXpKtXo,3331
|
108
|
+
edsl/notebooks/Notebook.py,sha256=xi9xkxmkQ6-DwhqbjjMLpYKB0VJV20AtwEonJ6mnqjo,7739
|
109
|
+
edsl/notebooks/__init__.py,sha256=VNUA3nNq04slWNbYaNrzOhQJu3AZANpvBniyCJSzJ7U,45
|
110
|
+
edsl/prompts/Prompt.py,sha256=12cbeQTKqfVQGpd1urqKZeXiDtKz2RAJqftoXS3q-DE,10070
|
111
|
+
edsl/prompts/QuestionInstructionsBase.py,sha256=xico6ob4cqWsHl-txj2RbY_4Ny5u9UqvIjmoTVgjUhk,348
|
112
|
+
edsl/prompts/__init__.py,sha256=Z0ywyJfnV0i-sR1SCdK4mHhgECT5cXpHVA-pKuBTifc,85
|
113
|
+
edsl/prompts/library/agent_instructions.py,sha256=_2kCDYvh3ZOF72VvcIH5jhmHjM6AAgQdkWrHvR52Yhg,1100
|
114
|
+
edsl/prompts/library/agent_persona.py,sha256=jEl1LjlOP67vOPiRW0S_-TRMz3n6Tp3mPRvltM2r2_k,516
|
115
|
+
edsl/prompts/library/question_budget.py,sha256=RAc7pmQRbs_-xksU52yYl8iqJ7HejPY4sQOlCSQLGWs,1190
|
116
|
+
edsl/prompts/library/question_checkbox.py,sha256=NIGcdnfkJ8_XbGsdq9toeWA_phQVx5FIBOAe0mReXJw,1462
|
117
|
+
edsl/prompts/library/question_extract.py,sha256=QxNiNBjUk25Ss_Pax0iDgmgTYXEycpWJk2z0evmqsP0,775
|
118
|
+
edsl/prompts/library/question_freetext.py,sha256=_I7hcniRfVwmZr2wXAasfbZ0GTu41ZIKfcoixGhzZUI,510
|
119
|
+
edsl/prompts/library/question_linear_scale.py,sha256=sQpgjSvqJU-uQti-DCxOzLzj05ENkpyxmH-qTFq39x0,778
|
120
|
+
edsl/prompts/library/question_list.py,sha256=KYi3gtcWyDzRLyAb2-k7C-QJ9TAfbLGPkWVvVmdT6xg,731
|
121
|
+
edsl/prompts/library/question_multiple_choice.py,sha256=_2LUM9bOInODoFyaTrKfMkcb5Z7RDj_odq5iAnD7KVQ,1617
|
122
|
+
edsl/prompts/library/question_numerical.py,sha256=ZdWnDbTU0gQdMMqcWHw_eIHEZkJ_kuE-XWrnCYFR07w,1456
|
123
|
+
edsl/prompts/library/question_rank.py,sha256=WDgXyph0EKWJrSgsW2eqcx3xdU-WA1LEvB2jvQFOQ8s,882
|
124
|
+
edsl/prompts/prompt_config.py,sha256=O3Y5EvBsCeKs9m9IjXiRXOcHWlWvQV0yqsNb2oSR1ow,974
|
125
|
+
edsl/prompts/registry.py,sha256=XOsqGsvNOmIG83jqoszqI72yNZkkszKR4FrEhwSzj_Q,8093
|
126
|
+
edsl/questions/AnswerValidatorMixin.py,sha256=U5i79HoEHpSoevgtx68TSg8a9tELq3R8xMtYyK1L7DQ,12106
|
127
|
+
edsl/questions/QuestionBase.py,sha256=XVB_G6ksX-rYq_mJlWlNHqaD68cJrG7iFymo7rWKGaU,19066
|
128
|
+
edsl/questions/QuestionBudget.py,sha256=aaRvSxBDzrQS8o4RBGsALZkSnKqGVJcHkDeEPAS2pd0,5974
|
129
|
+
edsl/questions/QuestionCheckBox.py,sha256=d-79SmqZgfPEHCMCzIdjDQJ2JSKJbFxEez05iguY3Ro,5958
|
130
|
+
edsl/questions/QuestionExtract.py,sha256=QxVGhgJHtxaPCOS0yqPdO4lsF5SIjjrIBlaiGXA0KjE,3818
|
131
|
+
edsl/questions/QuestionFreeText.py,sha256=b4V2lbj6L9AeIOMNlqrrUtZbuhxuUkbMum3NXaBOPZU,3004
|
132
|
+
edsl/questions/QuestionFunctional.py,sha256=jlC1eNE-kpp9o5CXKo-c3Re4PIq1_WmdJ66u9nD-W7w,4967
|
133
|
+
edsl/questions/QuestionList.py,sha256=jEOEnhlAz1rNc9uHzx8kTO5EkpSU3SDWcXtvoEmLIj8,3884
|
134
|
+
edsl/questions/QuestionMultipleChoice.py,sha256=7Lmy2gQ4ejeFenNQcaVXjE_TVyNAs3nizvn0zIS_d38,6455
|
135
|
+
edsl/questions/QuestionNumerical.py,sha256=dQkobQTXkmMUY4f-lSVAiTS33009cDy5qFCM1gJeCbs,3459
|
136
|
+
edsl/questions/QuestionRank.py,sha256=d_r9KE0v3PQs00ujIaloZZIb1FdcN6Wuak1og_0yNEQ,5709
|
137
|
+
edsl/questions/RegisterQuestionsMeta.py,sha256=unON0CKpW-mveyhg9V3_BF_GYYwytMYP9h2ZZPetVNM,1994
|
138
|
+
edsl/questions/SimpleAskMixin.py,sha256=YRLiHA6TPMKyLWvdAi7Mfnxcqtw7Kem6tH28YNb8n4U,2227
|
139
|
+
edsl/questions/__init__.py,sha256=U7t2dk_dHSaFRciHETXaGaJRnCobaik3mIKCpGRUuJo,1160
|
140
|
+
edsl/questions/compose_questions.py,sha256=ZcLkwNaofk-o0-skGXEDGZAj6DumOhVhyIUjqEnKrbg,3380
|
141
|
+
edsl/questions/derived/QuestionLikertFive.py,sha256=zKkjKI3HSt9ZGyBBNgXNsfXZ7gOoOknidLDPgMN_PcI,2475
|
142
|
+
edsl/questions/derived/QuestionLinearScale.py,sha256=7tybIaMaDTMkTFC6CymusW69so-zf5jUn8Aqf5pw__Y,2673
|
143
|
+
edsl/questions/derived/QuestionTopK.py,sha256=TouXKZt_h6Jd-2rAjkEOCJOzzei4Wa-3hjYq9CLxWws,2744
|
144
|
+
edsl/questions/derived/QuestionYesNo.py,sha256=KtMGuAPYWv-7-9WGa0fIS2UBxf6KKjFpuTk_h8FPZbg,2076
|
145
|
+
edsl/questions/derived/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
146
|
+
edsl/questions/descriptors.py,sha256=W0_mGZKKiXv2E2BKIy8-4n_QDILh9sun85Oev1YRoLs,14791
|
147
|
+
edsl/questions/question_registry.py,sha256=ZD7Y_towDdlnnmLq12vVewgQ3fEk9Ur0tCTWK8-WqeQ,5241
|
148
|
+
edsl/questions/settings.py,sha256=er_z0ZW_dgmC5CHLWkaqBJiuWgAYzIund85M5YZFQAI,291
|
149
|
+
edsl/results/Dataset.py,sha256=DZgb3vIj69ON7APQ6DimjBwAS1xZvZiXOg68CjW9E3I,8662
|
150
|
+
edsl/results/DatasetExportMixin.py,sha256=6Ky0CPxOOj6Og5nMMBQ-bhgJuzC6Ch_vHIquBbc_IdQ,25981
|
151
|
+
edsl/results/Result.py,sha256=53lz1mGqmnt2wHl-Ccimbla7cNlg_mLUgOBQa6Qd19k,14433
|
152
|
+
edsl/results/Results.py,sha256=IUHfmcBVtZ3me4VvVBQsdKKtuMXaZtLkzIrH5US7aUY,38155
|
153
|
+
edsl/results/ResultsDBMixin.py,sha256=Vs95zbSB4G7ENY4lU7OBdekg9evwTrtPH0IIL2NAFTk,7936
|
154
|
+
edsl/results/ResultsExportMixin.py,sha256=XizBsPNxziyffirMA4kS7UHpYM1WIE4s1K-B7TqTfDw,1266
|
155
|
+
edsl/results/ResultsFetchMixin.py,sha256=VEa0TKDcXbnTinSKs9YaE4WjOSLmlp9Po1_9kklFvSo,848
|
156
|
+
edsl/results/ResultsGGMixin.py,sha256=SAYz8p4wb1g8x6KhBVz9NHOGib2c2XsqtTclpADrFeM,4344
|
157
|
+
edsl/results/ResultsToolsMixin.py,sha256=mseEFxJCf9sjXdIxpjITt_UZBwdXxw2o2VLg5jMrALA,3017
|
158
|
+
edsl/results/__init__.py,sha256=2YcyiVtXi-3vIV0ZzOy1PqBLm2gaziufJVi4fdNrAt8,80
|
159
|
+
edsl/scenarios/FileStore.py,sha256=AevvU1qdLSmL4Q7cb1PhUiaJk1i5T0sgkTKBYf0KDN4,8722
|
160
|
+
edsl/scenarios/Scenario.py,sha256=VpQzY3169Z18ZoNOu_pjIf66TXngIVFZHvQXUJeRdQg,15254
|
161
|
+
edsl/scenarios/ScenarioHtmlMixin.py,sha256=EmugmbPJYW5eZS30rM6pDMDQD9yrrvHjmgZWB1qBfq4,1882
|
162
|
+
edsl/scenarios/ScenarioImageMixin.py,sha256=VJ5FqyPrL5-ieORlWMpnjmOAFIau8QFZCIZyEBKgb6I,3530
|
163
|
+
edsl/scenarios/ScenarioList.py,sha256=Atqjcrvhgvw0r25AimK2HEsuv7kCRjutZQwIb2DQkwI,27214
|
164
|
+
edsl/scenarios/ScenarioListExportMixin.py,sha256=nuBrSlkNogfVZzIV2vJai216ebWH3iJxiLJAJ_n0xg8,1410
|
165
|
+
edsl/scenarios/ScenarioListPdfMixin.py,sha256=dt7GzC2UZZpQjjilS7_eBm0BmqU6bDWWbBP7ejkhgHM,3830
|
166
|
+
edsl/scenarios/__init__.py,sha256=KRwZCLf2R0qyJvv1NGbd8M51Bt6Ia6Iylg-Xq_2Fa6M,98
|
167
|
+
edsl/shared.py,sha256=lgLa-mCk2flIhxXarXLtfXZjXG_6XHhC2A3O8yRTjXc,20
|
168
|
+
edsl/study/ObjectEntry.py,sha256=e3xRPH8wCN8Pum5HZsQRYgnSoauSvjXunIEH79wu5A8,5788
|
169
|
+
edsl/study/ProofOfWork.py,sha256=FaqYtLgeiTEQXWKukPgPUTWMcIN5t1FR7h7Re8QEtgc,3433
|
170
|
+
edsl/study/SnapShot.py,sha256=-5zoP4uTvnqtu3zRNMD-fKsNAVYX9psoKRADfotsF9E,2439
|
171
|
+
edsl/study/Study.py,sha256=zLy2mMvsX_QgZ6D4dcgYJoEacyajkRnARYjIFvyCO1o,16939
|
172
|
+
edsl/study/__init__.py,sha256=YAvPLTPG3hK_eN9Ar3d1_d-E3laXpSya879A25-JAxU,170
|
173
|
+
edsl/surveys/DAG.py,sha256=ozQuHo9ZQ8Eet5nDXtp7rFpiSocvvfxIHtyTnztvodg,2380
|
174
|
+
edsl/surveys/Memory.py,sha256=-ikOtkkQldGB_BkPCW3o7AYwV5B_pIwlREw7aVCSHaQ,1113
|
175
|
+
edsl/surveys/MemoryPlan.py,sha256=BeLuqS5Q8G2jSluHYFCAxVmj7cNPK-rDQ3mUsuDjikQ,7979
|
176
|
+
edsl/surveys/Rule.py,sha256=FnTCEWlbHDH_wOmnN1fiuqwrJzEEhPG4jibLXhRq03M,11104
|
177
|
+
edsl/surveys/RuleCollection.py,sha256=sN7aYDQJG3HmE-WxohgpctcQbHewjwE6NAqEVTxvFP8,13359
|
178
|
+
edsl/surveys/Survey.py,sha256=USU3cxJtflOAmDyxAljUUd45vU3j9XWtgSsBTZYkCaY,51355
|
179
|
+
edsl/surveys/SurveyCSS.py,sha256=NjJezs2sTlgFprN6IukjGKwNYmNdXnLjzV2w5K4z4RI,8415
|
180
|
+
edsl/surveys/SurveyExportMixin.py,sha256=vj9bZReHx0wBK9sVuS0alzPIUDdg6AFFMd7bl1RKWKI,6555
|
181
|
+
edsl/surveys/SurveyFlowVisualizationMixin.py,sha256=Z-YqeedMqWOtCFy003YJ9aneJ1n4bn70lDoILwLtTc0,3966
|
182
|
+
edsl/surveys/SurveyQualtricsImport.py,sha256=GG8usoPtG2_Ef-aIpwIEfCzOsjCFZHE6mtvof0cb7Z0,7238
|
183
|
+
edsl/surveys/__init__.py,sha256=vjMYVlP95fHVqqw2FfKXRuYbTArZkZr1nK4FnXzZWzs,129
|
184
|
+
edsl/surveys/base.py,sha256=n5PBx0BF0powzBXCsufpUekfNK_9huf3rohtU1mMCq0,1001
|
185
|
+
edsl/surveys/descriptors.py,sha256=3B-hBVvGpLlVBCyOnPuxkLjesvpr0QIuATbggp_MJ7o,2076
|
186
|
+
edsl/tools/__init__.py,sha256=4iRiX1K0Yh8RGwlUBuzipvFfRrofKqCRQ0SzNK_2oiQ,41
|
187
|
+
edsl/tools/clusters.py,sha256=uvDN76bfHIHS-ykB2iioXu0gKeP_UyD7Q9ee67w_fV4,6132
|
188
|
+
edsl/tools/embeddings.py,sha256=-mHqApiFbGzj_2Cr_VVl_7XiBBDyPB5-6ZO7IsXvaig,677
|
189
|
+
edsl/tools/embeddings_plotting.py,sha256=fznAqLnjF_K8PkJy1C4hBRObm3f8ebDIxQzrqRXlEJM,3564
|
190
|
+
edsl/tools/plotting.py,sha256=DbVNlm8rNCnWHXi5wDPnOviZ1Qxz-rHvtQM1zHWw1f8,3120
|
191
|
+
edsl/tools/summarize.py,sha256=YcdB0IjZn92qv2zVJuxsHfXou810APWYKeaHknsATqM,656
|
192
|
+
edsl/utilities/SystemInfo.py,sha256=qTP_aKwECPxtTnbEjJ7F1QqKU9U3rcEEbppg2ilQGuY,792
|
193
|
+
edsl/utilities/__init__.py,sha256=oUWx_h-8OFb1Of2SgIQZuIu7hX_bhDuwCSwksKGWZ6k,544
|
194
|
+
edsl/utilities/ast_utilities.py,sha256=49KDDu-PHYpzDN5cCaDf-ReQH-1dzjT5EG3WVSa8THk,868
|
195
|
+
edsl/utilities/data/Registry.py,sha256=q2DKc7CpG_7l47MxxsSi6DJOs4p1Z3qNx7PV-v8CUOE,176
|
196
|
+
edsl/utilities/data/__init__.py,sha256=pDjGnzC11q4Za8qX5zcg6plcQ_8Qjpb-sAKPwOlKmCY,62
|
197
|
+
edsl/utilities/data/scooter_results.json,sha256=tRtVAI5haLMh_-wjz9it_uk_I1bGe5qdFHsIRQMi_ks,250944
|
198
|
+
edsl/utilities/decorators.py,sha256=rlTSMItwmWUxHQBIEUDxX3lFzgtiT8PnfNavakuf-2M,2319
|
199
|
+
edsl/utilities/gcp_bucket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
200
|
+
edsl/utilities/gcp_bucket/cloud_storage.py,sha256=dStHsG181YP9ALW-bkyO-sgMWuLV5aaLsnsCOVD8jJw,3472
|
201
|
+
edsl/utilities/gcp_bucket/simple_example.py,sha256=pR_IH_Y640_-YnEyNpE7V_1MtBFC9nD3dg2NdSVcuXY,251
|
202
|
+
edsl/utilities/interface.py,sha256=AaKpWiwWBwP2swNXmnFlIf3ZFsjfsR5bjXQAW47tD-8,19656
|
203
|
+
edsl/utilities/repair_functions.py,sha256=tftmklAqam6LOQQu_-9U44N-llycffhW8LfO63vBmNw,929
|
204
|
+
edsl/utilities/restricted_python.py,sha256=5-_zUhrNbos7pLhDl9nr8d24auRlquR6w-vKkmNjPiA,2060
|
205
|
+
edsl/utilities/utilities.py,sha256=2KwKc1J0lu6_CjIAKaufvfLOJ4j3XGKyClwJ6TjKLxM,11157
|
206
|
+
edsl-0.1.33.dev1.dist-info/LICENSE,sha256=_qszBDs8KHShVYcYzdMz3HNMtH-fKN_p5zjoVAVumFc,1111
|
207
|
+
edsl-0.1.33.dev1.dist-info/METADATA,sha256=7-OQHBeU2oBSZ54VSVS8JDM3n4iMWSO0eoE5s_Ajq2s,4306
|
208
|
+
edsl-0.1.33.dev1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
209
|
+
edsl-0.1.33.dev1.dist-info/RECORD,,
|
edsl/TemplateLoader.py
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
from importlib import resources
|
2
|
-
from jinja2 import BaseLoader, TemplateNotFound
|
3
|
-
import os
|
4
|
-
|
5
|
-
|
6
|
-
class TemplateLoader(BaseLoader):
|
7
|
-
def __init__(self, package_name, templates_dir):
|
8
|
-
self.package_name = package_name
|
9
|
-
self.templates_dir = templates_dir
|
10
|
-
|
11
|
-
def get_source(self, environment, template):
|
12
|
-
try:
|
13
|
-
parts = [self.templates_dir] + template.split("/")
|
14
|
-
template_path = os.path.join(*parts)
|
15
|
-
|
16
|
-
# Use resources.files() to get a Traversable object
|
17
|
-
templates = resources.files(self.package_name).joinpath(self.templates_dir)
|
18
|
-
|
19
|
-
# Use the read_text() method of the Traversable object
|
20
|
-
content = templates.joinpath(template).read_text()
|
21
|
-
|
22
|
-
return content, None, lambda: True
|
23
|
-
except FileNotFoundError:
|
24
|
-
raise TemplateNotFound(template)
|
edsl/auto/AutoStudy.py
DELETED
@@ -1,117 +0,0 @@
|
|
1
|
-
from typing import Optional
|
2
|
-
|
3
|
-
from edsl import Model
|
4
|
-
from edsl.auto.StageQuestions import StageQuestions
|
5
|
-
from edsl.auto.StagePersona import StagePersona
|
6
|
-
from edsl.auto.StagePersonaDimensions import StagePersonaDimensions
|
7
|
-
from edsl.auto.StagePersonaDimensionValues import StagePersonaDimensionValues
|
8
|
-
from edsl.auto.StagePersonaDimensionValueRanges import (
|
9
|
-
StagePersonaDimensionValueRanges,
|
10
|
-
)
|
11
|
-
from edsl.auto.StageLabelQuestions import StageLabelQuestions
|
12
|
-
from edsl.auto.StageGenerateSurvey import StageGenerateSurvey
|
13
|
-
|
14
|
-
# from edsl.auto.StageBase import gen_pipeline
|
15
|
-
|
16
|
-
from edsl.auto.utilities import agent_generator, create_agents, gen_pipeline
|
17
|
-
|
18
|
-
|
19
|
-
class AutoStudy:
|
20
|
-
def __init__(
|
21
|
-
self,
|
22
|
-
overall_question: str,
|
23
|
-
population: str,
|
24
|
-
model: Optional["Model"] = None,
|
25
|
-
survey: Optional["Survey"] = None,
|
26
|
-
agent_list: Optional["AgentList"] = None,
|
27
|
-
default_num_agents=11,
|
28
|
-
):
|
29
|
-
self.overall_question = overall_question
|
30
|
-
self.population = population
|
31
|
-
self._survey = survey
|
32
|
-
self._agent_list = agent_list
|
33
|
-
self._agent_list_generator = None
|
34
|
-
self._persona_mapping = None
|
35
|
-
self._results = None
|
36
|
-
self.default_num_agents = default_num_agents
|
37
|
-
self.model = model or Model()
|
38
|
-
|
39
|
-
@property
|
40
|
-
def survey(self):
|
41
|
-
if self._survey is None:
|
42
|
-
self._survey = self._create_survey()
|
43
|
-
return self._survey
|
44
|
-
|
45
|
-
@property
|
46
|
-
def persona_mapping(self):
|
47
|
-
if self._persona_mapping is None:
|
48
|
-
self._persona_mapping = self._create_persona_mapping()
|
49
|
-
return self._persona_mapping
|
50
|
-
|
51
|
-
@property
|
52
|
-
def agent_list_generator(self):
|
53
|
-
if self._agent_list_generator is None:
|
54
|
-
self._agent_list_generator = self._create_agent_list_generator()
|
55
|
-
return self._agent_list_generator
|
56
|
-
|
57
|
-
@property
|
58
|
-
def results(self):
|
59
|
-
if self._results is None:
|
60
|
-
self._results = self._create_results()
|
61
|
-
return self._results
|
62
|
-
|
63
|
-
def _create_survey(self):
|
64
|
-
survey_pipline_stages = [
|
65
|
-
StageQuestions,
|
66
|
-
StageLabelQuestions,
|
67
|
-
StageGenerateSurvey,
|
68
|
-
]
|
69
|
-
survey_pipeline = gen_pipeline(survey_pipline_stages)
|
70
|
-
return survey_pipeline.process(
|
71
|
-
data=survey_pipeline.input(
|
72
|
-
overall_question=self.overall_question, population=self.population
|
73
|
-
)
|
74
|
-
).survey
|
75
|
-
|
76
|
-
def _create_persona_mapping(self):
|
77
|
-
persona_pipeline_stages = [
|
78
|
-
StageQuestions,
|
79
|
-
StagePersona,
|
80
|
-
StagePersonaDimensions,
|
81
|
-
StagePersonaDimensionValues,
|
82
|
-
StagePersonaDimensionValueRanges,
|
83
|
-
]
|
84
|
-
|
85
|
-
persona_pipeline = gen_pipeline(persona_pipeline_stages)
|
86
|
-
sample_agent_results = persona_pipeline.process(
|
87
|
-
persona_pipeline.input(
|
88
|
-
overall_question=overall_question, population=self.population
|
89
|
-
)
|
90
|
-
)
|
91
|
-
return sample_agent_results
|
92
|
-
|
93
|
-
def _create_agent_list_generator(self):
|
94
|
-
return agent_generator(
|
95
|
-
persona=self.persona_mapping.persona,
|
96
|
-
dimension_dict=self.persona_mapping.mapping,
|
97
|
-
)
|
98
|
-
|
99
|
-
def agent_list(self, num_agents):
|
100
|
-
return create_agents(
|
101
|
-
agent_generator=self.agent_list_generator,
|
102
|
-
survey=self.survey,
|
103
|
-
num_agents=num_agents,
|
104
|
-
)
|
105
|
-
|
106
|
-
def _create_results(self, num_agents=None):
|
107
|
-
if num_agents is None:
|
108
|
-
num_agents = self.default_num_agents
|
109
|
-
agent_list = self.agent_list(num_agents)
|
110
|
-
return self.survey.by(agent_list).by(self.model).run()
|
111
|
-
|
112
|
-
|
113
|
-
if __name__ == "__main__":
|
114
|
-
overall_question = "Should online platforms be regulated with respect to selling electric scooters?"
|
115
|
-
auto_study = AutoStudy(overall_question, population="US Adults")
|
116
|
-
|
117
|
-
results = auto_study.results
|