You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/exceptions.rst
+2-2
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Help debugging
12
12
13
13
If you would like help debugging an error that you are encountering, please feel free to share your code, objects and exceptions report with us.
14
14
15
-
An easy way to do this is to post a notebook with your code to the :ref:`coop` and share the link with us at [email protected].
15
+
An easy way to do this is to post a notebook with your code to the :ref:`coop` and **share the link with us at [email protected]**.
16
16
You can use the following code to generate a link to your notebook:
17
17
18
18
.. code-block:: python
@@ -36,7 +36,7 @@ For example, you may intend for the answer to be formatted as a list but receive
36
36
Or a question may be unanswered and the model has returned `None`.
37
37
These exceptions are typically raised by the `Question` class and are subclassed from `QuestionAnswerValidationError`.
38
38
39
-
A useful starting point for debugging these exceptions is to check the `Settings` class for the `Questions` model.
39
+
A useful starting point for debugging these exceptions is to check the `Settings` class for the `Questions` model (https://github.com/expectedparrot/edsl/blob/main/edsl/questions/settings.py).
40
40
The default settings (which can be modified) are as follows:
Copy file name to clipboardexpand all lines: docs/filestore.rst
+30-24
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,30 @@
3
3
File Store
4
4
==========
5
5
6
-
`FileStore` is a module for storing and sharing data on the Coop that you want to use in your EDSL projects, such as survey data, PDFs, CSVs or images.
7
-
It can be particularly useful for storing files to be used as as `Scenario` objects with a survey, and allows you to include code for retrieving and processing the files in your EDSL project.
6
+
`FileStore` is a module for storing and sharing data on the Coop to use in EDSL projects, such as survey data, PDFs, CSVs, docs or images.
7
+
It can be particularly useful for storing data intended to be used with surveys as `Scenario` objects, such as in data labeling tasks,
8
+
and allows you to include code for retrieving and processing the data files in your EDSL project to facilitate collaboration and replication of results.
8
9
9
10
10
11
File types
11
12
----------
12
13
13
-
The following file types are supported by the FileStore:
14
+
The following file types are currently supported by the FileStore:
14
15
15
-
- CSV
16
-
- PDF
17
-
- PNG
16
+
* CSV
17
+
* PDF
18
+
* PNG (image)
18
19
19
20
20
21
Posting a file
21
22
--------------
22
23
23
-
To store a file, you need to create a `FileStore` object with the path to the file you want to store.
24
-
You can then use the `push` method to store the file on the Coop and get a URL for accessing the file.
24
+
To post a file, import the `FileStore` type (`CSVFileStore`, `PDFFileStore` or `PNGFileStore`) and create an object with the path to the file.
25
+
Then call the `push` method to store the file on the Coop and get a URL and uuid for accessing it.
26
+
You can optionally pass a `description` and `visibility` parameter to the `push` method (Coop objects can be *public*, *private* or *unlisted* by default).
25
27
26
-
CSV example:
28
+
CSV example
29
+
^^^^^^^^^^^
27
30
28
31
.. code-block:: python
29
32
@@ -34,7 +37,7 @@ CSV example:
34
37
print(info) # display the URL and Coop uuid of the stored file for retrieving it later
35
38
36
39
37
-
Example output:
40
+
Example output (showing the default description and visibility setting):
38
41
39
42
.. code-block:: python
40
43
@@ -46,7 +49,8 @@ Example output:
46
49
'visibility': 'unlisted'}
47
50
48
51
49
-
PDF example:
52
+
PDF example
53
+
^^^^^^^^^^^
50
54
51
55
.. code-block:: python
52
56
@@ -69,7 +73,8 @@ Example output:
69
73
'visibility': 'unlisted'}
70
74
71
75
72
-
PNG example:
76
+
PNG example
77
+
^^^^^^^^^^^
73
78
74
79
.. code-block:: python
75
80
@@ -95,22 +100,22 @@ Example output:
95
100
Retrieving and using a file
96
101
---------------------------
97
102
98
-
To retrieve a file, you need to create a `FileStore` object with the Coop uuid of the file you want to retrieve.
99
-
You can then use the `pull` method to retrieve the file from the Coop.
103
+
To retrieve a file, create a `FileStore` object (`CSVFileStore`, `PDFFileStore` or `PNGFileStore`)
104
+
and pass it the Coop uuid of the file you want to retrieve and the Expected Parrot URL.
105
+
Then call the `pull` method to retrieve the file from the Coop.
100
106
101
-
Once you have retrieved a file, you can use it in your EDSL project as a `Scenario` object.
102
-
Each file type has a method for converting the file into a scenario:
107
+
Once retrieved, a file can be converted into scenarios by calling the relevant method on a `ScenarioList` object:
103
108
104
-
- `from_csv` for CSV files
105
-
- `from_pdf` for PDF files
106
-
- `from_image` for PNG files
109
+
* `ScenarioList.from_csv()` for CSV files
110
+
* `ScenarioList.from_pdf()` for PDF files
111
+
* `ScenarioList.from_image()` for PNG files
107
112
108
113
109
114
CSV example
110
115
^^^^^^^^^^^
111
116
112
-
For CSV files we use the `from_csv` method of the `ScenarioList` class.
113
-
They keys are the column names of the CSV file, which can be modified with the `rename` method.
117
+
Here we retrieve the CSV file posted above and then convert it into a `ScenarioList` object with the `from_csv()` method.
118
+
The keys are the column names of the CSV file, which can be modified with the `rename` method.
114
119
115
120
.. code-block:: python
116
121
@@ -125,7 +130,7 @@ They keys are the column names of the CSV file, which can be modified with the `
125
130
PDF example
126
131
^^^^^^^^^^^
127
132
128
-
For PDF files we use the `from_pdf` method of the `ScenarioList` class.
133
+
Here we retrieve the PDF file posted above and then convert it into a `ScenarioList` object with the `from_pdf()` method.
129
134
The default keys are `filename`, `page`, `text`, which can be modified with the `rename` method.
130
135
131
136
.. code-block:: python
@@ -155,7 +160,8 @@ Output:
155
160
PNG example
156
161
^^^^^^^^^^^
157
162
158
-
For PNG files we use the `from_image` method which takes the PNG file and (optionally) the name of a key to use for the scenario object.
163
+
Here we retrieve the PNG file posted above and then convert it into a `ScenarioList` object with the `from_image()` method.
164
+
We can optionally pass the name of a key to use for the scenario object, or edit the key later.
159
165
160
166
.. code-block:: python
161
167
@@ -170,7 +176,7 @@ For PNG files we use the `from_image` method which takes the PNG file and (optio
170
176
Working with scenarios
171
177
----------------------
172
178
173
-
Before using the scenario, verify the key and value of the scenario object (e.g., by printing), and rename the key as desired to use in survey questions.
179
+
Before using the scenario, we can verify the key and value of the scenario object (e.g., by printing), and rename the key as desired to use in survey questions.
Copy file name to clipboardexpand all lines: docs/index.rst
+16-4
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,27 @@ EDSL: AI-Powered Research
8
8
EDSL is developed by `Expected Parrot <https://www.expectedparrot.com>`_ and available under the MIT License.
9
9
10
10
This page provides documentation, tutorials and demo notebooks for the EDSL package and the `Coop <https://www.expectedparrot.com/explore>`_: a platform for creating, storing and sharing AI research.
11
-
The contents are organized into key sections to help you get started:
11
+
The contents are organized into key sections to help you get started.
12
+
13
+
14
+
Researchers
15
+
-----------
16
+
17
+
**Are you using EDSL for a research project? We'd love to hear about your experience!**
18
+
19
+
Send us an email at [email protected] and we'll provide credits to run your project or a gift card for your time.
12
20
13
21
14
22
Links
15
23
-----
16
24
17
25
- Download the current version of EDSL at `PyPI <https://pypi.org/project/edsl>`_.
18
26
- Get the latest EDSL updates at `GitHub <https://github.com/expectedparrot/edsl>`_.
19
-
- Create a `Coop account <https://www.expectedparrot.com/login>`_ to store and share your research, and access special features:
27
+
- Create a `Coop account <https://www.expectedparrot.com/login>`_ to store and share your research and access special features, including:
20
28
21
29
* :ref:`survey_builder`: An interface for launching hybrid human-AI surveys
22
-
* :ref:`remote_inference` and :ref:`remote_caching`: Work with EDSL on the Expected Parrot server
30
+
* :ref:`remote_inference`: Run surveys on the Expected Parrot server
31
+
* :ref:`remote_caching`: Automatically store results and API calls on the Expected Parrot server
23
32
* :ref:`filestore`: Store and share files for use in EDSL projects
24
33
25
34
- Explore research at the `Coop <https://www.expectedparrot.com/explore>`_.
@@ -33,14 +42,15 @@ Introduction
33
42
- :ref:`overview`: An overview of the purpose, concepts and goals of the EDSL package.
34
43
- :ref:`whitepaper`: A whitepaper about the EDSL package (*in progress*).
35
44
- :ref:`citation`: How to cite the package in your work.
45
+
- :ref:`papers`: Research papers and articles that use EDSL.
36
46
37
47
38
48
Technical Setup
39
49
---------------
40
50
41
51
- :ref:`installation`: Instructions for installing the EDSL package.
42
52
- :ref:`coop`: Create, store and share research on the Expected Parrot server.
43
-
- :ref:`api_keys`: Instructions for storing API keys to use EDSL locally.
53
+
- :ref:`api_keys`: Instructions for storing API keys to use EDSL locally (*optional*).
44
54
45
55
46
56
Getting Started
@@ -125,7 +135,9 @@ Information about additional functionality for developers.
0 commit comments