edsl 0.1.42__py3-none-any.whl → 0.1.43__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/__version__.py +1 -1
- edsl/agents/Invigilator.py +1 -1
- edsl/agents/PromptConstructor.py +92 -21
- edsl/agents/QuestionInstructionPromptBuilder.py +68 -9
- edsl/agents/prompt_helpers.py +2 -2
- edsl/coop/coop.py +65 -19
- edsl/enums.py +1 -2
- edsl/exceptions/coop.py +4 -0
- edsl/inference_services/AvailableModelFetcher.py +4 -1
- edsl/jobs/Jobs.py +54 -35
- edsl/jobs/JobsPrompts.py +54 -3
- edsl/jobs/JobsRemoteInferenceHandler.py +41 -25
- edsl/jobs/buckets/BucketCollection.py +30 -0
- edsl/jobs/data_structures.py +1 -0
- edsl/language_models/key_management/KeyLookupBuilder.py +47 -20
- edsl/language_models/key_management/models.py +10 -4
- edsl/prompts/Prompt.py +124 -61
- edsl/questions/descriptors.py +32 -18
- edsl/questions/question_base_gen_mixin.py +1 -0
- edsl/results/DatasetExportMixin.py +35 -6
- edsl/results/Results.py +179 -1
- edsl/results/ResultsGGMixin.py +117 -60
- edsl/scenarios/Scenario.py +33 -0
- edsl/scenarios/ScenarioList.py +22 -3
- edsl/scenarios/ScenarioListPdfMixin.py +9 -3
- {edsl-0.1.42.dist-info → edsl-0.1.43.dist-info}/METADATA +3 -4
- {edsl-0.1.42.dist-info → edsl-0.1.43.dist-info}/RECORD +29 -29
- {edsl-0.1.42.dist-info → edsl-0.1.43.dist-info}/LICENSE +0 -0
- {edsl-0.1.42.dist-info → edsl-0.1.43.dist-info}/WHEEL +0 -0
edsl/results/ResultsGGMixin.py
CHANGED
@@ -5,46 +5,113 @@ import tempfile
|
|
5
5
|
from typing import Optional
|
6
6
|
|
7
7
|
|
8
|
+
class GGPlot:
|
9
|
+
"""A class to handle ggplot2 plot display and saving."""
|
10
|
+
|
11
|
+
def __init__(self, r_code: str, width: float = 6, height: float = 4):
|
12
|
+
"""Initialize with R code and dimensions."""
|
13
|
+
self.r_code = r_code
|
14
|
+
self.width = width
|
15
|
+
self.height = height
|
16
|
+
self._svg_data = None
|
17
|
+
self._saved = False # Track if the plot was saved
|
18
|
+
|
19
|
+
def _execute_r_code(self, save_command: str = ""):
|
20
|
+
"""Execute R code with optional save command."""
|
21
|
+
full_r_code = self.r_code + save_command
|
22
|
+
|
23
|
+
result = subprocess.run(
|
24
|
+
["Rscript", "-"],
|
25
|
+
input=full_r_code,
|
26
|
+
text=True,
|
27
|
+
stdout=subprocess.PIPE,
|
28
|
+
stderr=subprocess.PIPE,
|
29
|
+
)
|
30
|
+
|
31
|
+
if result.returncode != 0:
|
32
|
+
if result.returncode == 127:
|
33
|
+
raise RuntimeError(
|
34
|
+
"Rscript is probably not installed. Please install R from https://cran.r-project.org/"
|
35
|
+
)
|
36
|
+
else:
|
37
|
+
raise RuntimeError(
|
38
|
+
f"An error occurred while running Rscript: {result.stderr}"
|
39
|
+
)
|
40
|
+
|
41
|
+
if result.stderr:
|
42
|
+
print("Error in R script:", result.stderr)
|
43
|
+
|
44
|
+
return result
|
45
|
+
|
46
|
+
def save(self, filename: str):
|
47
|
+
"""Save the plot to a file."""
|
48
|
+
format = filename.split('.')[-1].lower()
|
49
|
+
if format not in ['svg', 'png']:
|
50
|
+
raise ValueError("Only 'svg' and 'png' formats are supported")
|
51
|
+
|
52
|
+
save_command = f'\nggsave("{filename}", plot = last_plot(), width = {self.width}, height = {self.height}, device = "{format}")'
|
53
|
+
self._execute_r_code(save_command)
|
54
|
+
|
55
|
+
self._saved = True
|
56
|
+
print(f"File saved to: {filename}")
|
57
|
+
return None # Return None instead of self
|
58
|
+
|
59
|
+
def _repr_html_(self):
|
60
|
+
"""Display the plot in a Jupyter notebook."""
|
61
|
+
# Don't display if the plot was saved
|
62
|
+
if self._saved:
|
63
|
+
return None
|
64
|
+
|
65
|
+
import tempfile
|
66
|
+
|
67
|
+
# Generate SVG if we haven't already
|
68
|
+
if self._svg_data is None:
|
69
|
+
# Create temporary SVG file
|
70
|
+
with tempfile.NamedTemporaryFile(suffix='.svg') as tmp:
|
71
|
+
save_command = f'\nggsave("{tmp.name}", plot = last_plot(), width = {self.width}, height = {self.height}, device = "svg")'
|
72
|
+
self._execute_r_code(save_command)
|
73
|
+
with open(tmp.name, 'r') as f:
|
74
|
+
self._svg_data = f.read()
|
75
|
+
|
76
|
+
return self._svg_data
|
77
|
+
|
8
78
|
class ResultsGGMixin:
|
9
79
|
"""Mixin class for ggplot2 plotting."""
|
10
80
|
|
11
81
|
def ggplot2(
|
12
82
|
self,
|
13
83
|
ggplot_code: str,
|
14
|
-
filename: str = None,
|
15
84
|
shape="wide",
|
16
85
|
sql: str = None,
|
17
86
|
remove_prefix: bool = True,
|
18
87
|
debug: bool = False,
|
19
88
|
height=4,
|
20
89
|
width=6,
|
21
|
-
format="svg",
|
22
90
|
factor_orders: Optional[dict] = None,
|
23
91
|
):
|
24
92
|
"""Create a ggplot2 plot from a DataFrame.
|
25
93
|
|
94
|
+
Returns a GGPlot object that can be displayed in a notebook or saved to a file.
|
95
|
+
|
26
96
|
:param ggplot_code: The ggplot2 code to execute.
|
27
|
-
:param filename: The filename to save the plot to.
|
28
97
|
:param shape: The shape of the data in the DataFrame (wide or long).
|
29
98
|
:param sql: The SQL query to execute beforehand to manipulate the data.
|
30
99
|
:param remove_prefix: Whether to remove the prefix from the column names.
|
31
100
|
:param debug: Whether to print the R code instead of executing it.
|
32
101
|
:param height: The height of the plot in inches.
|
33
102
|
:param width: The width of the plot in inches.
|
34
|
-
:param format: The format to save the plot in (png or svg).
|
35
103
|
:param factor_orders: A dictionary of factor columns and their order.
|
36
104
|
"""
|
37
|
-
|
38
105
|
if sql == None:
|
39
106
|
sql = "select * from self"
|
40
107
|
|
41
108
|
if shape == "long":
|
42
109
|
df = self.sql(sql, shape="long")
|
43
110
|
elif shape == "wide":
|
44
|
-
df = self.sql(sql,
|
111
|
+
df = self.sql(sql, remove_prefix=remove_prefix)
|
45
112
|
|
46
113
|
# Convert DataFrame to CSV format
|
47
|
-
csv_data = df.to_csv(
|
114
|
+
csv_data = df.to_csv().text
|
48
115
|
|
49
116
|
# Embed the CSV data within the R script
|
50
117
|
csv_data_escaped = csv_data.replace("\n", "\\n").replace("'", "\\'")
|
@@ -52,70 +119,60 @@ class ResultsGGMixin:
|
|
52
119
|
|
53
120
|
if factor_orders is not None:
|
54
121
|
for factor, order in factor_orders.items():
|
55
|
-
# read_csv_code += f"""self${{{factor}}} <- factor(self${{{factor}}}, levels=c({','.join(['"{}"'.format(x) for x in order])}))"""
|
56
|
-
|
57
122
|
level_string = ", ".join([f'"{x}"' for x in order])
|
58
123
|
read_csv_code += (
|
59
124
|
f"self${factor} <- factor(self${factor}, levels=c({level_string}))"
|
60
125
|
)
|
61
126
|
read_csv_code += "\n"
|
62
127
|
|
63
|
-
# Load ggplot2 library
|
64
|
-
|
65
|
-
|
66
|
-
# Check if a filename is provided for the plot, if not create a temporary one
|
67
|
-
if not filename:
|
68
|
-
filename = tempfile.mktemp(suffix=f".{format}")
|
69
|
-
|
70
|
-
# Combine all R script parts
|
71
|
-
full_r_code = load_ggplot2 + read_csv_code + ggplot_code
|
72
|
-
|
73
|
-
# Add command to save the plot to a file
|
74
|
-
full_r_code += f'\nggsave("{filename}", plot = last_plot(), width = {width}, height = {height}, device = "{format}")'
|
128
|
+
# Load ggplot2 library and combine all R script parts
|
129
|
+
full_r_code = "library(ggplot2)\n" + read_csv_code + ggplot_code
|
75
130
|
|
76
131
|
if debug:
|
77
132
|
print(full_r_code)
|
78
133
|
return
|
79
134
|
|
80
|
-
|
81
|
-
["Rscript", "-"],
|
82
|
-
input=full_r_code,
|
83
|
-
text=True,
|
84
|
-
stdout=subprocess.PIPE,
|
85
|
-
stderr=subprocess.PIPE,
|
86
|
-
)
|
87
|
-
|
88
|
-
if result.returncode != 0:
|
89
|
-
if result.returncode == 127: # 'command not found'
|
90
|
-
raise RuntimeError(
|
91
|
-
"Rscript is probably not installed. Please install R from https://cran.r-project.org/"
|
92
|
-
)
|
93
|
-
else:
|
94
|
-
raise RuntimeError(
|
95
|
-
f"An error occurred while running Rscript: {result.stderr}"
|
96
|
-
)
|
97
|
-
|
98
|
-
if result.stderr:
|
99
|
-
print("Error in R script:", result.stderr)
|
100
|
-
else:
|
101
|
-
self._display_plot(filename, width, height)
|
135
|
+
return GGPlot(full_r_code, width=width, height=height)
|
102
136
|
|
103
137
|
def _display_plot(self, filename: str, width: float, height: float):
|
104
|
-
"""Display the plot in the notebook."""
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
138
|
+
"""Display the plot in the notebook or open in system viewer if running from terminal."""
|
139
|
+
try:
|
140
|
+
# Try to import IPython-related modules
|
141
|
+
import matplotlib.pyplot as plt
|
142
|
+
import matplotlib.image as mpimg
|
143
|
+
from IPython import get_ipython
|
144
|
+
|
145
|
+
# Check if we're in a notebook environment
|
146
|
+
if get_ipython() is not None:
|
147
|
+
if filename.endswith(".png"):
|
148
|
+
img = mpimg.imread(filename)
|
149
|
+
plt.figure(figsize=(width, height))
|
150
|
+
plt.imshow(img)
|
151
|
+
plt.axis("off")
|
152
|
+
plt.show()
|
153
|
+
elif filename.endswith(".svg"):
|
154
|
+
from IPython.display import SVG, display
|
155
|
+
display(SVG(filename=filename))
|
156
|
+
else:
|
157
|
+
print("Unsupported file format. Please provide a PNG or SVG file.")
|
158
|
+
return
|
159
|
+
|
160
|
+
except ImportError:
|
161
|
+
pass
|
162
|
+
|
163
|
+
# If we're not in a notebook or imports failed, open with system viewer
|
164
|
+
import platform
|
165
|
+
import os
|
166
|
+
|
167
|
+
system = platform.system()
|
168
|
+
if system == 'Darwin': # macOS
|
169
|
+
if filename.endswith('.svg'):
|
170
|
+
subprocess.run(['open', '-a', 'Preview', filename])
|
171
|
+
else:
|
172
|
+
subprocess.run(['open', filename])
|
173
|
+
elif system == 'Linux':
|
174
|
+
subprocess.run(['xdg-open', filename])
|
175
|
+
elif system == 'Windows':
|
176
|
+
os.startfile(filename)
|
120
177
|
else:
|
121
|
-
print("
|
178
|
+
print(f"File saved to: {filename}")
|
edsl/scenarios/Scenario.py
CHANGED
@@ -361,6 +361,39 @@ class Scenario(Base, UserDict, ScenarioHtmlMixin):
|
|
361
361
|
extractor = PdfExtractor(pdf_path)
|
362
362
|
return Scenario(extractor.get_pdf_dict())
|
363
363
|
|
364
|
+
@classmethod
|
365
|
+
def from_pdf_to_image(cls, pdf_path, image_format="jpeg"):
|
366
|
+
"""
|
367
|
+
Convert each page of a PDF into an image and create key/value for it.
|
368
|
+
|
369
|
+
:param pdf_path: Path to the PDF file.
|
370
|
+
:param image_format: Format of the output images (default is 'jpeg').
|
371
|
+
:return: ScenarioList instance containing the Scenario instances.
|
372
|
+
|
373
|
+
The scenario has a key "filepath" and one or more keys "page_{i}" for each page.
|
374
|
+
"""
|
375
|
+
import tempfile
|
376
|
+
from pdf2image import convert_from_path
|
377
|
+
from edsl.scenarios import Scenario
|
378
|
+
|
379
|
+
with tempfile.TemporaryDirectory() as output_folder:
|
380
|
+
# Convert PDF to images
|
381
|
+
images = convert_from_path(pdf_path)
|
382
|
+
|
383
|
+
scenario_dict = {"filepath":pdf_path}
|
384
|
+
|
385
|
+
# Save each page as an image and create Scenario instances
|
386
|
+
for i, image in enumerate(images):
|
387
|
+
image_path = os.path.join(output_folder, f"page_{i}.{image_format}")
|
388
|
+
image.save(image_path, image_format.upper())
|
389
|
+
|
390
|
+
from edsl import FileStore
|
391
|
+
scenario_dict[f"page_{i}"] = FileStore(image_path)
|
392
|
+
|
393
|
+
scenario = Scenario(scenario_dict)
|
394
|
+
|
395
|
+
return cls(scenario)
|
396
|
+
|
364
397
|
@classmethod
|
365
398
|
def from_docx(cls, docx_path: str) -> "Scenario":
|
366
399
|
"""Creates a scenario from the text of a docx file.
|
edsl/scenarios/ScenarioList.py
CHANGED
@@ -1135,7 +1135,7 @@ class ScenarioList(Base, UserList, ScenarioListMixin):
|
|
1135
1135
|
return cls(observations)
|
1136
1136
|
|
1137
1137
|
@classmethod
|
1138
|
-
def from_google_sheet(cls, url: str, sheet_name: str = None) -> ScenarioList:
|
1138
|
+
def from_google_sheet(cls, url: str, sheet_name: str = None, column_names: Optional[List[str]]= None) -> ScenarioList:
|
1139
1139
|
"""Create a ScenarioList from a Google Sheet.
|
1140
1140
|
|
1141
1141
|
This method downloads the Google Sheet as an Excel file, saves it to a temporary file,
|
@@ -1145,6 +1145,8 @@ class ScenarioList(Base, UserList, ScenarioListMixin):
|
|
1145
1145
|
url (str): The URL to the Google Sheet.
|
1146
1146
|
sheet_name (str, optional): The name of the sheet to load. If None, the method will behave
|
1147
1147
|
the same as from_excel regarding multiple sheets.
|
1148
|
+
column_names (List[str], optional): If provided, use these names for the columns instead
|
1149
|
+
of the default column names from the sheet.
|
1148
1150
|
|
1149
1151
|
Returns:
|
1150
1152
|
ScenarioList: An instance of the ScenarioList class.
|
@@ -1172,8 +1174,25 @@ class ScenarioList(Base, UserList, ScenarioListMixin):
|
|
1172
1174
|
temp_file.write(response.content)
|
1173
1175
|
temp_filename = temp_file.name
|
1174
1176
|
|
1175
|
-
#
|
1176
|
-
|
1177
|
+
# First create the ScenarioList with default column names
|
1178
|
+
scenario_list = cls.from_excel(temp_filename, sheet_name=sheet_name)
|
1179
|
+
|
1180
|
+
# If column_names is provided, create a new ScenarioList with the specified names
|
1181
|
+
if column_names is not None:
|
1182
|
+
if len(column_names) != len(scenario_list[0].keys()):
|
1183
|
+
raise ValueError(
|
1184
|
+
f"Number of provided column names ({len(column_names)}) "
|
1185
|
+
f"does not match number of columns in sheet ({len(scenario_list[0].keys())})"
|
1186
|
+
)
|
1187
|
+
|
1188
|
+
# Create a codebook mapping original keys to new names
|
1189
|
+
original_keys = list(scenario_list[0].keys())
|
1190
|
+
codebook = dict(zip(original_keys, column_names))
|
1191
|
+
|
1192
|
+
# Return new ScenarioList with renamed columns
|
1193
|
+
return scenario_list.rename(codebook)
|
1194
|
+
else:
|
1195
|
+
return scenario_list
|
1177
1196
|
|
1178
1197
|
@classmethod
|
1179
1198
|
def from_delimited_file(
|
@@ -148,13 +148,15 @@ class ScenarioListPdfMixin:
|
|
148
148
|
return False
|
149
149
|
|
150
150
|
@classmethod
|
151
|
-
def
|
151
|
+
def from_pdf_to_image(cls, pdf_path, image_format="jpeg"):
|
152
152
|
"""
|
153
153
|
Convert each page of a PDF into an image and create Scenario instances.
|
154
154
|
|
155
155
|
:param pdf_path: Path to the PDF file.
|
156
156
|
:param image_format: Format of the output images (default is 'jpeg').
|
157
157
|
:return: ScenarioList instance containing the Scenario instances.
|
158
|
+
|
159
|
+
The scenario list has keys "filepath", "page", "content".
|
158
160
|
"""
|
159
161
|
import tempfile
|
160
162
|
from pdf2image import convert_from_path
|
@@ -171,10 +173,14 @@ class ScenarioListPdfMixin:
|
|
171
173
|
image_path = os.path.join(output_folder, f"page_{i+1}.{image_format}")
|
172
174
|
image.save(image_path, image_format.upper())
|
173
175
|
|
174
|
-
|
176
|
+
from edsl import FileStore
|
177
|
+
scenario = Scenario({
|
178
|
+
"filepath":image_path,
|
179
|
+
"page":i,
|
180
|
+
"content":FileStore(image_path)
|
181
|
+
})
|
175
182
|
scenarios.append(scenario)
|
176
183
|
|
177
|
-
# print(f"Saved {len(images)} pages as images in {output_folder}")
|
178
184
|
return cls(scenarios)
|
179
185
|
|
180
186
|
@staticmethod
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: edsl
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.43
|
4
4
|
Summary: Create and analyze LLM-based surveys
|
5
5
|
Home-page: https://www.expectedparrot.com/
|
6
6
|
License: MIT
|
@@ -17,7 +17,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
18
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
19
19
|
Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
|
20
|
-
Requires-Dist: anthropic (>=0.
|
20
|
+
Requires-Dist: anthropic (>=0.45.0,<0.46.0)
|
21
21
|
Requires-Dist: azure-ai-inference (>=1.0.0b3,<2.0.0)
|
22
22
|
Requires-Dist: black[jupyter] (>=24.4.2,<25.0.0)
|
23
23
|
Requires-Dist: boto3 (>=1.34.161,<2.0.0)
|
@@ -37,7 +37,6 @@ Requires-Dist: pandas (>=2.1.4,<3.0.0)
|
|
37
37
|
Requires-Dist: platformdirs (>=4.3.6,<5.0.0)
|
38
38
|
Requires-Dist: pydot (>=2.0.0,<3.0.0)
|
39
39
|
Requires-Dist: pygments (>=2.17.2,<3.0.0)
|
40
|
-
Requires-Dist: pymupdf (>=1.24.4,<2.0.0)
|
41
40
|
Requires-Dist: pypdf2 (>=3.0.1,<4.0.0)
|
42
41
|
Requires-Dist: pyreadstat (>=1.2.7,<2.0.0)
|
43
42
|
Requires-Dist: python-docx (>=1.1.0,<2.0.0)
|
@@ -107,5 +106,5 @@ See instructions on [storing API keys](https://docs.expectedparrot.com/en/latest
|
|
107
106
|
|
108
107
|
## 💡 Contributions, feature requests & bugs
|
109
108
|
Interested in contributing? Want us to add a new feature? Found a bug for us to squash?
|
110
|
-
Please send us an email at [info@expectedparrot.com](mailto:info@expectedparrot.com) or message us at our [Discord channel](https://discord.com/invite/mxAYkjfy9m)
|
109
|
+
Please send us an email at [info@expectedparrot.com](mailto:info@expectedparrot.com) or message us at our [Discord channel](https://discord.com/invite/mxAYkjfy9m).
|
111
110
|
|
@@ -2,17 +2,17 @@ edsl/Base.py,sha256=-U6ngLZJDqImrAwF-TSmYzMESre0CG5rq9ZFxFh31sY,12864
|
|
2
2
|
edsl/BaseDiff.py,sha256=92BirXj2u3TEGHJWni9TBsvZjvq8wpb4wDL2vxX9Lb0,8253
|
3
3
|
edsl/TemplateLoader.py,sha256=sDBlSMt7EfOduM7w3h6v03gvh_Rzn9hVrlS-iLSQdZA,849
|
4
4
|
edsl/__init__.py,sha256=iB5q_P2pXDV6Wb5oHKsFDhi_rJXID0aaqio1I98dwXA,1936
|
5
|
-
edsl/__version__.py,sha256=
|
5
|
+
edsl/__version__.py,sha256=PwEipAcIgfEks4UpVgOERoR8Az-FCfCGocVnb0rkncM,23
|
6
6
|
edsl/agents/Agent.py,sha256=lF7GD_bCvRLP4hrtm3w451AUfuJln5jZHGYBH84CMVE,40741
|
7
7
|
edsl/agents/AgentList.py,sha256=iRfQfyUYtaJbJ3sRubPqPKRr77nKQgzhFEeZ0wcAEk0,18955
|
8
|
-
edsl/agents/Invigilator.py,sha256=
|
8
|
+
edsl/agents/Invigilator.py,sha256=SObe7PC08XoWNpOubZMFlVKPN8nfZplYBwY9LXJou8c,12084
|
9
9
|
edsl/agents/InvigilatorBase.py,sha256=Ene3qKWV7czdBp5lFOL4Q-s_p4zNb8UMWn10XRGb4Cs,8985
|
10
|
-
edsl/agents/PromptConstructor.py,sha256=
|
11
|
-
edsl/agents/QuestionInstructionPromptBuilder.py,sha256=
|
10
|
+
edsl/agents/PromptConstructor.py,sha256=WZpodlWC_HT0e6bT05FSvapVXH9vVHQVISmNw50NetY,13657
|
11
|
+
edsl/agents/QuestionInstructionPromptBuilder.py,sha256=3myBxREbIQ_1KtZBJEn9_Or2M4nmng-bUk2ubg3lLag,6666
|
12
12
|
edsl/agents/QuestionTemplateReplacementsBuilder.py,sha256=-VSCAX0uqpA1xNr62V3kLh9NACR9fY0nvdp6KAJqk3c,5471
|
13
13
|
edsl/agents/__init__.py,sha256=a3H1lxDwu9HR8fwh79C5DgxPSFv_bE2rzQ6y1D8Ba5c,80
|
14
14
|
edsl/agents/descriptors.py,sha256=JxM_ckzhDmfZT1igSUdCxgyQcCK0o9MhU5jbLIned9g,3189
|
15
|
-
edsl/agents/prompt_helpers.py,sha256=
|
15
|
+
edsl/agents/prompt_helpers.py,sha256=JkVRPrLQ1egPqbBKcgR22c6WYnTU4QjzZG5HwxDEHjs,5076
|
16
16
|
edsl/agents/question_option_processor.py,sha256=q6g5B3E4Q9gWBtFCRqcXHaSxaGfWLqbKB2EXxqzihRk,6345
|
17
17
|
edsl/auto/AutoStudy.py,sha256=XniD-g7jg19vbD5CWqq0QAiMsIz2CboKAAIluDODqzo,4326
|
18
18
|
edsl/auto/StageBase.py,sha256=7ZjV0T-8FQBL-r5LeAozNQY_0RJ_GySdX48ToM7-dLc,8254
|
@@ -36,7 +36,7 @@ edsl/coop/CoopFunctionsMixin.py,sha256=RS79ADEbYUK-frf_WY-YnozVbM3ZaBufv1jxjF96G
|
|
36
36
|
edsl/coop/ExpectedParrotKeyHandler.py,sha256=1lriainznM1FfQ7GEvTiI1EW8uNi8Sms3Vt5UDxso3U,4456
|
37
37
|
edsl/coop/PriceFetcher.py,sha256=J5EaM-bPqnd2B0ZBVVqXJ-UQK-D4SdjmddYepnN7jz4,1777
|
38
38
|
edsl/coop/__init__.py,sha256=4iZCwJSzJVyjBYk8ggGxY2kZjq9dXVT1jhyPDNyew4I,115
|
39
|
-
edsl/coop/coop.py,sha256
|
39
|
+
edsl/coop/coop.py,sha256=-O07b4zhhjfPGF_XjX8uiv1Cdc41R121Y1h-5kJEEkw,42631
|
40
40
|
edsl/coop/utils.py,sha256=SBV76sk5_2rhP3RKGkJsOkrx9Qr-jD0puqYhVR_MgSY,3900
|
41
41
|
edsl/data/Cache.py,sha256=ryMWLowyXa8VwWKru-0pF43JHh2UVyL5Zezst-26J6c,18510
|
42
42
|
edsl/data/CacheEntry.py,sha256=mTc-WG_dWc4s9s3MrOl3yUqao2Q_igCerNcluM4XCSQ,7376
|
@@ -46,13 +46,13 @@ edsl/data/SQLiteDict.py,sha256=V5Nfnxctgh4Iblqcw1KmbnkjtfmWrrombROSQ3mvg6A,8979
|
|
46
46
|
edsl/data/__init__.py,sha256=i_bbYBc-vrdASBpDMcpIcfhbLKYOkvqA57R3ysBcQ6o,177
|
47
47
|
edsl/data/orm.py,sha256=Jz6rvw5SrlxwysTL0QI9r68EflKxeEBmf6j6himHDS8,238
|
48
48
|
edsl/data_transfer_models.py,sha256=r7Nl2ZyR0FZhzqQg8tz2jxonTVBboK9W3qMicts69qc,1960
|
49
|
-
edsl/enums.py,sha256=
|
49
|
+
edsl/enums.py,sha256=3K-4xpOfORWOn-BzQVlMQyneSbORklaP39HB05YnXxY,6098
|
50
50
|
edsl/exceptions/BaseException.py,sha256=eP30DOYtssbKt0qarfDkNOKDW-aG0DLaHtx42bp5dVQ,811
|
51
51
|
edsl/exceptions/__init__.py,sha256=guZX0w_IGt-fYBuK_xVKACfJfQU6AYXM2kscbPp8Yrw,1532
|
52
52
|
edsl/exceptions/agents.py,sha256=E_r9bHUQEPWTjy5D-CmDvFMgFe34aPtwo4ApYN71mDg,1626
|
53
53
|
edsl/exceptions/cache.py,sha256=z4D4RHPtOV86xLsW5bl4JM8UtpH8D89gufrlpVu2mWM,178
|
54
54
|
edsl/exceptions/configuration.py,sha256=qH2sInNTndKlCLAaNgaXHyRFdKQHL7-dElB_j8wz9g4,351
|
55
|
-
edsl/exceptions/coop.py,sha256=
|
55
|
+
edsl/exceptions/coop.py,sha256=C4Et4K3paDpbxgOgO8jBo22jVk9KTnt_uoCXt_qi7hc,188
|
56
56
|
edsl/exceptions/data.py,sha256=K24CjgwFiMWxrF1Z2dF6F7Vfrge_y9kMK_wsYYSaroU,209
|
57
57
|
edsl/exceptions/general.py,sha256=zAyJnppPjjxQAn6X3A5fetmv5FUR7kQDU58vwBKvAks,1114
|
58
58
|
edsl/exceptions/inference_services.py,sha256=fU-HiPiIxR85qG3oDegI4e1kb_2nSih6pq8C-ObeaFc,156
|
@@ -65,7 +65,7 @@ edsl/exceptions/scenarios.py,sha256=j4OE9xrSrLKdRMwmr3webIRHBwBgvx0DL0uDThRW7yY,
|
|
65
65
|
edsl/exceptions/surveys.py,sha256=BJUKFVkj6nrsq3TyvaZfEE-zjy3BCAM-s1lsdcrv_MM,677
|
66
66
|
edsl/inference_services/AnthropicService.py,sha256=Xr1MQmBYYKKaMd9IRBYvK357i7vrxUm73nxxNZGCCCQ,3761
|
67
67
|
edsl/inference_services/AvailableModelCacheHandler.py,sha256=9zGT1Huz0VTOZyN5GpakcMAe6pZyYmZcdSzuqPUZ09g,6179
|
68
|
-
edsl/inference_services/AvailableModelFetcher.py,sha256=
|
68
|
+
edsl/inference_services/AvailableModelFetcher.py,sha256=2RjYftpSVbdxC_lE3U8G1Pn4m2UwY6WbxBHrrujMAFI,7894
|
69
69
|
edsl/inference_services/AwsBedrock.py,sha256=aOJ7n_05cdh2EkTWfd9mhOJiPdaqEtmBJBHKmT_Ds5A,4001
|
70
70
|
edsl/inference_services/AzureAI.py,sha256=8ymXCAWqa4NkYEGi6_AvcSRN1WLPXueAWk-W8w_T6AI,8817
|
71
71
|
edsl/inference_services/DeepInfraService.py,sha256=fWlH5sCNxf8eHPHxPPxJMEVWpCM9sDenkC8IZYqtXfA,515
|
@@ -92,22 +92,22 @@ edsl/jobs/Answers.py,sha256=lZpbGAqYqMQw7MUsmpivqMZkHjHHOmCY32s9Km284pQ,1445
|
|
92
92
|
edsl/jobs/FetchInvigilator.py,sha256=83tbrqY_1qK0biNF1x51N0sFx49FFmuOi3o5HmFuCIY,1785
|
93
93
|
edsl/jobs/InterviewTaskManager.py,sha256=I1GShC2CrBFnGOcWn3q2YUU0SJbesmeLrrM2_nkuhZo,3748
|
94
94
|
edsl/jobs/InterviewsConstructor.py,sha256=MyRgygmi4318PgERjhhZZXlNUju2lB1CBu8LJJjYNSs,1853
|
95
|
-
edsl/jobs/Jobs.py,sha256
|
95
|
+
edsl/jobs/Jobs.py,sha256=-UNknyXlO-3L06ljxukpZBay6IIQqHdCYNKHToiJftw,30776
|
96
96
|
edsl/jobs/JobsChecks.py,sha256=v1sgdjKQTYMoZu-uobM9USn1KaF6QBoOfNSGH7ueZjU,5403
|
97
97
|
edsl/jobs/JobsComponentConstructor.py,sha256=yzjBFQx1oK8CN2taniB82kpXo6W712dIG1E9ouwkujg,6969
|
98
|
-
edsl/jobs/JobsPrompts.py,sha256=
|
99
|
-
edsl/jobs/JobsRemoteInferenceHandler.py,sha256=
|
98
|
+
edsl/jobs/JobsPrompts.py,sha256=szbNRda8uewU1QrLynIxUIefK94dSMR2MBkTCb9H4hI,12835
|
99
|
+
edsl/jobs/JobsRemoteInferenceHandler.py,sha256=UC5LM7bedT9WabqspfdFo2HW6CRNJFNkjh-pSJqu3nU,11464
|
100
100
|
edsl/jobs/JobsRemoteInferenceLogger.py,sha256=rUaImMQWVZO24i8cXBeDpd4rMu3fUSbolfqBNbrG1ms,9265
|
101
101
|
edsl/jobs/RequestTokenEstimator.py,sha256=IF2sb1Tt_exzNyWnuvd8mm81gfyZsv-rUP-GUHBX32E,1183
|
102
102
|
edsl/jobs/__init__.py,sha256=aKuAyd_GoalGj-k7djOoVwEbFUE2XLPlikXaA1_8yAg,32
|
103
103
|
edsl/jobs/async_interview_runner.py,sha256=FdkfhazuRZjDUPjSYPqNGdfoYG538PzCa62rwdnKTmc,5226
|
104
|
-
edsl/jobs/buckets/BucketCollection.py,sha256=
|
104
|
+
edsl/jobs/buckets/BucketCollection.py,sha256=3rbeEPz6PppJ3YPpYlRGzCsiVOfYzjHyPtwA6TFdZLc,5062
|
105
105
|
edsl/jobs/buckets/ModelBuckets.py,sha256=hxw_tzc0V42CiB7mh5jIxlgwDVJ-zFZhlLtKrHEg8ho,2419
|
106
106
|
edsl/jobs/buckets/TokenBucket.py,sha256=DNv5aOO8kwq3PvCXg84HCBhYFkzSiOqLBLiEJRFuCGQ,10082
|
107
107
|
edsl/jobs/buckets/TokenBucketAPI.py,sha256=ht0b-xZvzaR9ymhjin4c1AZwapuLPOoJ2N9hViSPuA4,6847
|
108
108
|
edsl/jobs/buckets/TokenBucketClient.py,sha256=Jx20nDAdUSh3USUX9B4PHd1uAFMdyOHtRa2phzFnh-w,7095
|
109
109
|
edsl/jobs/check_survey_scenario_compatibility.py,sha256=dU1IUPb1FFm0P1ievzTmtgcRxH2soCdPaG5GZ1Zd4fA,3816
|
110
|
-
edsl/jobs/data_structures.py,sha256=
|
110
|
+
edsl/jobs/data_structures.py,sha256=VwMLmfAiajRzdy1ruJJC-v3gU2FkOVnbsC9NZjpystw,3756
|
111
111
|
edsl/jobs/decorators.py,sha256=vpeSgI3EP4RFz5V_OclFdnhiSrswihavAN8C9ygRhGE,1135
|
112
112
|
edsl/jobs/interviews/Interview.py,sha256=GTUS1yuz1dCtlHEVe2N76qTSpmk6OecR5PMkDAjRzsQ,15051
|
113
113
|
edsl/jobs/interviews/InterviewExceptionCollection.py,sha256=ZIe9nnI8pznxp1D0K2Ii9SHorc9-f0k_lQV-Giq41P8,3666
|
@@ -142,17 +142,17 @@ edsl/language_models/__init__.py,sha256=DkG3ZDEFOP1JQlhAuKTotxj4WfkWenzNJwr4WQpq
|
|
142
142
|
edsl/language_models/fake_openai_call.py,sha256=dxbL5e4NLF-eTk9IduPyGwLiVCX_-eGCJDaLYPlQTqc,364
|
143
143
|
edsl/language_models/fake_openai_service.py,sha256=2AAsAinELbMZRqiepwBkWhWcLuMe5ORXUBNarrdl1ug,1714
|
144
144
|
edsl/language_models/key_management/KeyLookup.py,sha256=bKmSrvivKtUrrSR2CX-uBi82mJKCwbhdRhPYTgLO4bs,2058
|
145
|
-
edsl/language_models/key_management/KeyLookupBuilder.py,sha256=
|
145
|
+
edsl/language_models/key_management/KeyLookupBuilder.py,sha256=HV21uTSYOuSKBIIoGIgyRje-CvWtsGjZHPwDRJUUHX4,10342
|
146
146
|
edsl/language_models/key_management/KeyLookupCollection.py,sha256=OU6jPZoJ54fAtkTfxwsD2lw_ZVha92G_T0LpCq1r-js,1205
|
147
147
|
edsl/language_models/key_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
148
|
-
edsl/language_models/key_management/models.py,sha256=
|
148
|
+
edsl/language_models/key_management/models.py,sha256=Rs7fjzFjPHXv4sKU9E-FnwZj2ul69sWDwhdIMhjjElE,2753
|
149
149
|
edsl/language_models/model.py,sha256=yWt3t3e1s0pt3zKJu450RFzhLfV7nA6CZYYzrrq7nyo,10389
|
150
150
|
edsl/language_models/repair.py,sha256=TnYY6-rTQFeZaeGOymT0UkIjfZrxs4JK0v2h9UY4m48,5401
|
151
151
|
edsl/language_models/utilities.py,sha256=0dXHl74OlGKf1224fo5wYsawdBvxqMAB87nY_tJ0VYY,2295
|
152
152
|
edsl/notebooks/Notebook.py,sha256=j1W_sGp5Oa6tY4FlR2KthOU_ZzCFlRShkHYcpciIt94,8217
|
153
153
|
edsl/notebooks/NotebookToLaTeX.py,sha256=94gewtyE9PHeZuMHkMm38Bv571vk0Scd5jmQFpVOBNY,4512
|
154
154
|
edsl/notebooks/__init__.py,sha256=VNUA3nNq04slWNbYaNrzOhQJu3AZANpvBniyCJSzJ7U,45
|
155
|
-
edsl/prompts/Prompt.py,sha256=
|
155
|
+
edsl/prompts/Prompt.py,sha256=gSpMneHIlfOr1_rxWKiMdFMC98w458dg0KEFQDJmLAA,14081
|
156
156
|
edsl/prompts/__init__.py,sha256=wrtkH7JW72U93_pnmTvqQx_NoadH5OPRNfrZ5AaD7Co,87
|
157
157
|
edsl/questions/ExceptionExplainer.py,sha256=BgM80FRPJjS_TrY6XaVmlT666MzY9DEagviGQj9-WEQ,2868
|
158
158
|
edsl/questions/HTMLQuestion.py,sha256=mRzVpfFLZ2RYBSDbLHeXTyAXbUHorpiwhNf-nuUSC5M,3431
|
@@ -181,7 +181,7 @@ edsl/questions/derived/QuestionLinearScale.py,sha256=oGxTOFITNrFofV468Gow9rtnBMW
|
|
181
181
|
edsl/questions/derived/QuestionTopK.py,sha256=IAmW1kUA1rvW_NH3yxroLfarhl6_QyTEwWZ54gbi6fg,3294
|
182
182
|
edsl/questions/derived/QuestionYesNo.py,sha256=KWJyaXSNPNxELtK0nWvIqNtpAF05MMAC0ILUjxXkVwo,2735
|
183
183
|
edsl/questions/derived/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
184
|
-
edsl/questions/descriptors.py,sha256=
|
184
|
+
edsl/questions/descriptors.py,sha256=B2JB3q5RpxSYdwP7HAuEpf3musZe1rhvI29GkzHn4Qw,18897
|
185
185
|
edsl/questions/loop_processor.py,sha256=h2t8Sn71JBBpim3MaVcZtPTcUsPCBR2aJIpzDFzam5k,4553
|
186
186
|
edsl/questions/prompt_templates/question_budget.jinja,sha256=-ekZYCa_KRc-xLcpf3j-YmXV0WSyIK_laOp2x3li-tA,737
|
187
187
|
edsl/questions/prompt_templates/question_checkbox.jinja,sha256=V-Dn2VJhfXyIILWIhMviTfQ5WuXh1YZerwicaA6Okzc,1136
|
@@ -191,7 +191,7 @@ edsl/questions/prompt_templates/question_linear_scale.jinja,sha256=VB9bFPeLGGb5a
|
|
191
191
|
edsl/questions/prompt_templates/question_list.jinja,sha256=MAkNv88E79jXK9TxKdnf5KgA77CWz9vXc2TZm2r-g-A,495
|
192
192
|
edsl/questions/prompt_templates/question_multiple_choice.jinja,sha256=sSyAhnexZF6oWqHL-45r7o69vrFcCbbYXLZ3zu7q76U,761
|
193
193
|
edsl/questions/prompt_templates/question_numerical.jinja,sha256=c20sp3HfFonfaRwwmnF7HjAEugU15QlgpNAIkNHasl0,1218
|
194
|
-
edsl/questions/question_base_gen_mixin.py,sha256=
|
194
|
+
edsl/questions/question_base_gen_mixin.py,sha256=Wpe0BMqICXM1fRDuHa8AQxL89tczGxaLscyUauI7I_o,6216
|
195
195
|
edsl/questions/question_registry.py,sha256=H4Q4JYMHn7-_5rU7Ap26N6Ruzz9WSZqOf1b89MScIDI,6352
|
196
196
|
edsl/questions/register_questions_meta.py,sha256=2h_9iZt3cjr_7JRmveTqbmEBBCvjtefMDfhM7Pgd_zg,2598
|
197
197
|
edsl/questions/response_validator_abc.py,sha256=410DIb8Z5uF_xu1lG32OF6X7aoOtL6gG3UIMY83kfeo,6838
|
@@ -243,14 +243,14 @@ edsl/questions/templates/yes_no/answering_instructions.jinja,sha256=UAcssfcYeW8z
|
|
243
243
|
edsl/questions/templates/yes_no/question_presentation.jinja,sha256=hoEVj4GQD3EYnR2AStXkMFOJeqISNoEVzBd8-cx2yWg,273
|
244
244
|
edsl/results/CSSParameterizer.py,sha256=vI3VTgTihJeCYGfmGp7fOhTitHZ17jrDGbq46Sa2rd8,3677
|
245
245
|
edsl/results/Dataset.py,sha256=5mpxMKUqqv-593lF5fEgi2aORUj2iIbIMEZnPrTP33M,20401
|
246
|
-
edsl/results/DatasetExportMixin.py,sha256=
|
246
|
+
edsl/results/DatasetExportMixin.py,sha256=eD3zifl8OU1BaNsZ3ho3P5Pe3-qqW3GflK_7OsRMg3U,22557
|
247
247
|
edsl/results/DatasetTree.py,sha256=nvNCF9psLcQ65qsxze7qkrhLn-U-N8OJ327Nf-sFskQ,10178
|
248
248
|
edsl/results/MarkdownToDocx.py,sha256=e8kdDPoqS6Zvd8OTldP9AXbjtmr8BZnro7f0-g1ENi4,4123
|
249
249
|
edsl/results/MarkdownToPDF.py,sha256=RgQ8V86AD_h0HlohUiTWcbL8zOpI8xFC4FK-aOh26HE,3608
|
250
250
|
edsl/results/Result.py,sha256=EQ2klw1vwFv3oih1I38AAJEOYOd7PKEk_oGwA3HTc4A,21404
|
251
|
-
edsl/results/Results.py,sha256=
|
251
|
+
edsl/results/Results.py,sha256=NmUq0162WpDlmDjR5xi5uJcBTu69XC2Zywvva5a-rho,48363
|
252
252
|
edsl/results/ResultsExportMixin.py,sha256=v9N4pUMrycmKIDzdWn1grmx7F8lxIPAOjfV6OScYSwc,1379
|
253
|
-
edsl/results/ResultsGGMixin.py,sha256
|
253
|
+
edsl/results/ResultsGGMixin.py,sha256=-E4vhljp53LSSdoURAZnkAb9ekoV4yF0ASv3S4tgnr8,6530
|
254
254
|
edsl/results/TableDisplay.py,sha256=xGJcotgUqWrmCkQLeD9YIwLrNv7su4VDce3EnllfrLQ,3725
|
255
255
|
edsl/results/TextEditor.py,sha256=8lG6Dh1PDE3Yq_oDvu2zOQHpcQEfLfflSzd04BjHciw,1370
|
256
256
|
edsl/results/__init__.py,sha256=cGvJx1BvGCspUPTKYxKwQDRIoWxFSwHUAfOfuVVti4E,82
|
@@ -268,11 +268,11 @@ edsl/scenarios/DocumentChunker.py,sha256=LZXh_yx507LMNQ-i2VnSHZiPpRI0XQUECO8e3xA
|
|
268
268
|
edsl/scenarios/DocxScenario.py,sha256=ul3nkX826m_T6LFptswqtnH5czP_yxMlLWgbTmFIZI4,482
|
269
269
|
edsl/scenarios/FileStore.py,sha256=onFZAqkdqzyQeQ9_2zn1qGY40SqmRG9X8DvtcbXW39o,17418
|
270
270
|
edsl/scenarios/PdfExtractor.py,sha256=AMTwEZY0pFzSqe3CYVWhijQDfj3qlZq0CoaHaYDnapM,1196
|
271
|
-
edsl/scenarios/Scenario.py,sha256=
|
271
|
+
edsl/scenarios/Scenario.py,sha256=9eP78TrIsxkvXYq7-aQCcqcW37v2M4MSh7EIk8l018E,18303
|
272
272
|
edsl/scenarios/ScenarioHtmlMixin.py,sha256=5H8MnPPWqlGZ0_Ojv1WjkFaNNRrr-JpCRwlABDBfPXs,2111
|
273
|
-
edsl/scenarios/ScenarioList.py,sha256=
|
273
|
+
edsl/scenarios/ScenarioList.py,sha256=xxbeaRuA-Bp3Ah8F78SImrXIk0rB2yYUYShXWqgXJ4Q,55372
|
274
274
|
edsl/scenarios/ScenarioListExportMixin.py,sha256=eghBPIi4CmvkPbHV2hpFyE08jtOzuHiKAlt4JC9D81w,1475
|
275
|
-
edsl/scenarios/ScenarioListPdfMixin.py,sha256=
|
275
|
+
edsl/scenarios/ScenarioListPdfMixin.py,sha256=6sGXgDYo7e5lv7sB685iq5DS7KSbXNav-k6y6MRYNLM,7725
|
276
276
|
edsl/scenarios/__init__.py,sha256=CQXwTNTIG9jg_pLkDPZgapUFY0_LwZFVQ8HaYvof0Nc,145
|
277
277
|
edsl/scenarios/directory_scanner.py,sha256=eJHPx6pc_No-I-old0vwrNRwNxmgnn3Fr6mht5mp8Fw,3312
|
278
278
|
edsl/scenarios/file_methods.py,sha256=HeusyoXOi2Bb0Bfp8MVDWKMFpe_ipP-cxENiRrSKZQU,2621
|
@@ -358,7 +358,7 @@ edsl/utilities/remove_edsl_version.py,sha256=3n2RoXvZ4pH3k-_lc7B-vkeUyHXHX6vKHQS
|
|
358
358
|
edsl/utilities/repair_functions.py,sha256=tftmklAqam6LOQQu_-9U44N-llycffhW8LfO63vBmNw,929
|
359
359
|
edsl/utilities/restricted_python.py,sha256=5-_zUhrNbos7pLhDl9nr8d24auRlquR6w-vKkmNjPiA,2060
|
360
360
|
edsl/utilities/utilities.py,sha256=FbI9QYGD4eaHrwZ6ePx51jjpatZqwSPHJhimx-h6HyA,12660
|
361
|
-
edsl-0.1.
|
362
|
-
edsl-0.1.
|
363
|
-
edsl-0.1.
|
364
|
-
edsl-0.1.
|
361
|
+
edsl-0.1.43.dist-info/LICENSE,sha256=_qszBDs8KHShVYcYzdMz3HNMtH-fKN_p5zjoVAVumFc,1111
|
362
|
+
edsl-0.1.43.dist-info/METADATA,sha256=GZMhoOS8tgU-eC7KkTr_kAM5nriLA7tCl3JzfpUvGhk,4719
|
363
|
+
edsl-0.1.43.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
364
|
+
edsl-0.1.43.dist-info/RECORD,,
|
File without changes
|
File without changes
|