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/guides/generating_mcq_datasets.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,19 @@ from datafast.schema.config import MCQDatasetConfig, PromptExpansionConfig
31
31
from datafast.llms import OpenAIProvider, AnthropicProvider, GeminiProvider
32
32
```
33
33
34
-
In addition, we'll use `dotenv` to load environment variables containing API keys.
34
+
In addition, we'll use `dotenv` to load environment variables containing API keys and configure logging to monitor the generation process.
35
35
```python
36
36
from dotenv import load_dotenv
37
+
from datafast.logger_config import configure_logger
37
38
38
39
# Load environment variables containing API keys
39
-
load_dotenv("secrets.env")
40
+
load_dotenv()
41
+
42
+
# Configure logger to see progress, warnings, and success messages
43
+
configure_logger()
40
44
```
41
45
42
-
Make sure you have created a `secrets.env` file with your API keys. HF token is needed if you want to push the dataset to your HF hub. Other keys depend on which LLM providers you use.
46
+
Make sure you have created a `.env` file with your API keys. HF token is needed if you want to push the dataset to your HF hub. Other keys depend on which LLM providers you use.
43
47
44
48
```
45
49
GEMINI_API_KEY=XXXX
@@ -253,10 +257,14 @@ Here's a complete example for creating an MCQ dataset from a local JSONL file:
253
257
from datafast.datasets import MCQDataset
254
258
from datafast.schema.config import MCQDatasetConfig, PromptExpansionConfig
255
259
from datafast.llms import OpenAIProvider, AnthropicProvider, GeminiProvider
260
+
from datafast.logger_config import configure_logger
Copy file name to clipboardExpand all lines: docs/guides/generating_text_classification_datasets.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,19 @@ from datafast.schema.config import ClassificationDatasetConfig, PromptExpansionC
26
26
from datafast.llms import OpenAIProvider, AnthropicProvider
27
27
```
28
28
29
-
In addition, we'll use `dotenv` to load environment variables containing API keys.
29
+
In addition, we'll use `dotenv` to load environment variables containing API keys and configure logging to monitor the generation process.
30
30
```python
31
31
from dotenv import load_dotenv
32
+
from datafast.logger_config import configure_logger
32
33
33
34
# Load environment variables containing API keys
34
-
load_dotenv("secrets.env")
35
+
load_dotenv()
36
+
37
+
# Configure logger to see progress, warnings, and success messages
38
+
configure_logger()
35
39
```
36
40
37
-
Make sure you have created a `secrets.env` file with your API keys. HF token is needed if you want to push the dataset to your HF hub. Other keys depends on which LLM providers you use. In our example, we use OpenAI and Anthropic.
41
+
Make sure you have created a `.env` file with your API keys. HF token is needed if you want to push the dataset to your HF hub. Other keys depends on which LLM providers you use. In our example, we use OpenAI and Anthropic.
38
42
39
43
```
40
44
GEMINI_API_KEY=XXXX
@@ -236,10 +240,14 @@ Here's a complete example for creating a trail conditions classification dataset
236
240
from datafast.datasets import ClassificationDataset
237
241
from datafast.schema.config import ClassificationDatasetConfig, PromptExpansionConfig
238
242
from datafast.llms import OpenAIProvider, AnthropicProvider
243
+
from datafast.logger_config import configure_logger
Copy file name to clipboardExpand all lines: docs/guides/generating_text_datasets.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,19 @@ from datafast.schema.config import RawDatasetConfig, PromptExpansionConfig
31
31
from datafast.llms import OpenAIProvider, AnthropicProvider, GeminiProvider
32
32
```
33
33
34
-
In addition, we'll use `dotenv` to load environment variables containing API keys.
34
+
In addition, we'll use `dotenv` to load environment variables containing API keys and configure logging to monitor the generation process.
35
35
```python
36
36
from dotenv import load_dotenv
37
+
from datafast.logger_config import configure_logger
37
38
38
39
# Load environment variables containing API keys
39
-
load_dotenv("secrets.env")
40
+
load_dotenv()
41
+
42
+
# Configure logger to see progress, warnings, and success messages
43
+
configure_logger()
40
44
```
41
45
42
-
Make sure you have created a secrets.env file with your API keys. HF token is needed if you want to push the dataset to your HF hub. Other keys depend on which LLM providers you use. In our example, we use OpenAI and Anthropic.
46
+
Make sure you have created a .env file with your API keys. HF token is needed if you want to push the dataset to your HF hub. Other keys depend on which LLM providers you use. In our example, we use OpenAI and Anthropic.
43
47
44
48
```
45
49
GEMINI_API_KEY=XXXX
@@ -239,6 +243,14 @@ Here's a complete example script that generates a text dataset across multiple d
239
243
from datafast.datasets import RawDataset
240
244
from datafast.schema.config import RawDatasetConfig, PromptExpansionConfig
241
245
from datafast.llms import OpenAIProvider, AnthropicProvider
246
+
from datafast.logger_config import configure_logger
Copy file name to clipboardExpand all lines: docs/guides/generating_ultrachat_datasets.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,19 @@ from datafast.schema.config import UltrachatDatasetConfig, PromptExpansionConfig
31
31
from datafast.llms import OpenAIProvider, AnthropicProvider, GeminiProvider
32
32
```
33
33
34
-
In addition, use `dotenv` to load environment variables containing API keys:
34
+
In addition, use `dotenv` to load environment variables containing API keys and configure logging to monitor the generation process:
35
35
```python
36
36
from dotenv import load_dotenv
37
+
from datafast.logger_config import configure_logger
37
38
38
39
# Load environment variables containing API keys
39
-
load_dotenv("secrets.env")
40
+
load_dotenv()
41
+
42
+
# Configure logger to see progress, warnings, and success messages
43
+
configure_logger()
40
44
```
41
45
42
-
Make sure you have created a `secrets.env` file with your API keys. A Hugging Face token (HF_TOKEN) is needed if you want to push the dataset to your HF hub. Other keys depend on which LLM providers you use.
46
+
Make sure you have created a `.env` file with your API keys. A Hugging Face token (HF_TOKEN) is needed if you want to push the dataset to your HF hub. Other keys depend on which LLM providers you use.
43
47
44
48
```
45
49
GEMINI_API_KEY=XXXX
@@ -231,10 +235,14 @@ Here's a complete example for creating an Ultrachat dataset:
231
235
from datafast.datasets import UltrachatDataset
232
236
from datafast.schema.config import UltrachatDatasetConfig
233
237
from datafast.llms import AnthropicProvider
238
+
from datafast.logger_config import configure_logger
0 commit comments