Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pages/docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tests:
from langtest import Harness

# Create test Harness with config file
h = Harness(task='text-classification', model='path/to/local_saved_model', hub='spacy', data='test.csv', config='config.yml')
h = Harness(task='text-classification', model={'model': 'path/to/local_saved_model', 'hub':'spacy'}, data={"data_source":'test.csv'}, config='config.yml')
```

#### Using the `.configure()` Method
Expand All @@ -46,7 +46,7 @@ h = Harness(task='text-classification', model='path/to/local_saved_model', hub='
from langtest import Harness

# Create test Harness without config file
h = Harness(task='text-classification', model='path/to/local_saved_model', hub='spacy', data='test.csv')
h = Harness(task='text-classification', model={'model': 'path/to/local_saved_model', 'hub':'spacy'}, data={"data_source":'test.csv'})

h.configure(
{
Expand Down
55 changes: 26 additions & 29 deletions docs/pages/docs/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ In the Harness, we specify the data input in the following way:
from langtest import Harness

harness = Harness(task='ner',
model='en_core_web_sm',
config='config.yml',
hub='spacy',
data='sample.conll') #Either of the two formats can be specified.
model={'model': 'en_core_web_sm', 'hub':'spacy'},
data={"data_source":'test.conll'},
config='config.yml') #Either of the two formats can be specified.
```

</div><div class="h3-box" markdown="1">
Expand Down Expand Up @@ -101,10 +100,9 @@ In the Harness, we specify the data input in the following way:
from langtest import Harness

harness = Harness(task='text-classification',
model='mrm8488/distilroberta-finetuned-tweets-hate-speech',
config='config.yml',
hub ='huggingface',
data='sample.csv')
model={'model': 'mrm8488/distilroberta-finetuned-tweets-hate-speech', 'hub':'huggingface'},
data={"data_source":'sample.csv'},
config='config.yml')
```

</div><div class="h3-box" markdown="1">
Expand All @@ -117,11 +115,12 @@ To handle text classification task for Hugging Face Datasets, the Harness class

```python
{
"name": "",
"data_source": "",
"subset": "",
"feature_column": "",
"target_column": "",
"split": ""
"split": "",
"source": "huggingface"
}
```

Expand All @@ -133,13 +132,14 @@ In the Harness, we specify the data input in the following way:
# Import Harness from the LangTest library
from langtest import Harness

harness = Harness(task="text-classification", hub="huggingface",
model="distilbert-base-uncased-finetuned-sst-2-english",
data={"name":'glue',
harness = Harness(task="text-classification",
model={'model': 'mrm8488/distilroberta-finetuned-tweets-hate-speech', 'hub':'huggingface'},
data={"data_source":'glue',
"subset":"sst2",
"feature_column":"sentence",
"target_column":'label',
"split":"train"
"split":"train",
"source": "huggingface"
})
```

Expand Down Expand Up @@ -209,10 +209,9 @@ In the Harness, we specify the data input in the following way:
from langtest import Harness

harness = Harness(task='question-answering',
model='gpt-3.5-turbo',
config='config.yml',
hub ='openai',
data='BoolQ-test')
model={'model': 'text-davinci-003', 'hub':'openai'},
data={"data_source":'BoolQ-test'},
config='config.yml')
```

</div><div class="h3-box" markdown="1">
Expand Down Expand Up @@ -249,10 +248,9 @@ In the Harness, we specify the data input in the following way:
from langtest import Harness

harness = Harness(task='summarization',
model='text-davinci-002',
config='config.yml',
hub ='openai',
data='XSum-test-tiny')
model={'model': 'text-davinci-003', 'hub':'openai'},
data={"data_source":'XSum-test-tiny'},
config='config.yml')
```

#### Passing a Hugging Face Dataset for Summarization to the Harness
Expand All @@ -264,12 +262,12 @@ In the Harness, we specify the data input in the following way:
from langtest import Harness

harness = Harness(task="summarization",
hub="openai",
model="text-davinci-003",
data={"name":'samsum',
model={'model': 'text-davinci-003', 'hub':'openai'},
data={"data_source":'samsum',
"feature_column":"dialogue",
"target_column":'summary',
"split":"test"
"split":"test",
"source": "huggingface"
})
```
</div><div class="h3-box" markdown="1">
Expand Down Expand Up @@ -305,9 +303,8 @@ In the Harness, we specify the data input in the following way:
from langtest import Harness

harness = Harness(task='toxicity',
model='text-davinci-002',
hub='openai',
data='toxicity-test-tiny')
model={'model': 'text-davinci-003', 'hub':'openai'},
data={"data_source":'toxicity-test-tiny'})
```

</div></div>
4 changes: 2 additions & 2 deletions docs/pages/docs/generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tests:
from langtest import Harness

# Create test Harness with config file
h = Harness(task='text-classification', model='path/to/local_saved_model', hub='spacy', data='test.csv', config='config.yml')
h = Harness(task='text-classification', model={'model': 'path/to/local_saved_model', 'hub':'spacy'}, data={"data_source":'test.csv'}, config='config.yml')
```

#### Using the `.configure()` Method
Expand All @@ -53,7 +53,7 @@ h = Harness(task='text-classification', model='path/to/local_saved_model', hub='
from langtest import Harness

# Create test Harness without config file
h = Harness(task='text-classification', model='path/to/local_saved_model', hub='spacy', data='test.csv')
h = Harness(task='text-classification', model={'model': 'path/to/local_saved_model', 'hub':'spacy'}, data={"data_source":'test.csv'})

h.configure(
{
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/docs/generate_augmentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ data_kwargs = {
"subset": "sst2",
"feature_column": "sentence",
"target_column": "label",
"split": "train"
"split": "train",
"source": "huggingface"
}

h.augment(
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/tutorials/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The following table gives an overview of the different tutorial notebooks. We ha
|NQ open |OpenAI |Question-Answering |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/llm_notebooks/dataset-notebooks/NQ_open_dataset.ipynb)|
|BoolQ |OpenAI |Question-Answering |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/llm_notebooks/dataset-notebooks/BoolQ_dataset.ipynb)|
|XSum |OpenAI |Summarization |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/llm_notebooks/dataset-notebooks/XSum_dataset.ipynb)|
|HuggingFaceDataset-Support |Hugging Face/OpenAI |Text-Classification/Summarization |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/misc/HuggingFace_Dataset_Notebook.ipynb)|
|HuggingFaceDataset-Support |Hugging Face/OpenAI |Text-Classification/NER/Summarization |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/misc/HuggingFace_Dataset_Notebook.ipynb)|
|Augmentation-Control |/John Snow Labs |NER |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/misc/Augmentation_Control_Notebook.ipynb)|
|Comparing Models |Hugging Face/John Snow Labs/Spacy |NER/Text-Classification |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/misc/Comparing_Models_Notebook.ipynb)|
|Runtime Test |Hugging Face/John Snow Labs/Spacy |NER |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/misc/RuntimeTest_Notebook.ipynb)|
Expand All @@ -62,7 +62,7 @@ The following table gives an overview of the different tutorial notebooks. We ha
|Templatic-Augmentation |John Snow Labs |NER |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/misc/Templatic_Augmentation_Notebook.ipynb)|
|Clinical-Tests-Notebook |OpenAI |Clinical-Tests |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/llm_notebooks/Clinical_Tests.ipynb)|
|Prompt-Injection-Notebook |OpenAI |Security |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/llm_notebooks/Prompt_Injections_Tests.ipynb)|

|Loading-Data-with-Custom-Columns |Hugging Face/OpenAI |NER/Text-Classification/Question-Answering/Summarization |[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/main/demo/tutorials/misc/custom_column_csv.ipynb)|

<style>
.heading {
Expand Down