nilcars's picture
Initial commit with model files
b620101
---
base_model: sentence-transformers/all-mpnet-base-v2
library_name: setfit
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: "Bug: Radio button onChange not called in current React Canary <!--\r\n Please\
\ provide a clear and concise description of what the bug is. Include\r\n screenshots\
\ if needed. Please test using the latest version of the relevant\r\n React packages\
\ to make sure your issue has not already been fixed.\r\n-->\r\n\r\nReact version:\
\ 18.3.0-canary-a1f97589f-20230526\r\n\r\n\r\n## Steps To Reproduce\r\n\r\n1.\
\ Create radio buttons that toggle `disabled` in `onChange`\r\n2. After selecting\
\ each radio button, `onChange` is no longer called\r\n\r\n<!--\r\n Your bug\
\ will get fixed much faster if we can run your code and it doesn't\r\n have\
\ dependencies other than React. Issues without reproduction steps or\r\n code\
\ examples may be immediately closed as not actionable.\r\n-->\r\n\r\nLink to\
\ code example:\r\n\r\nThe following CodeSandbox demonstrates the issue with the\
\ current react canary version. The issue is not present when react & react-dom\
\ versions are changed to stable 18.2.0\r\n\r\nhttps://codesandbox.io/s/react-canary-radio-buttons-deiqb3?file=/src/App.js\r\
\n\r\n<!--\r\n Please provide a CodeSandbox (https://codesandbox.io/s/new), a\
\ link to a\r\n repository on GitHub, or provide a minimal code example that\
\ reproduces the\r\n problem. You may provide a screenshot of the application\
\ if you think it is\r\n relevant to your bug report. Here are some tips for\
\ providing a minimal\r\n example: https://stackoverflow.com/help/mcve.\r\n-->\r\
\n\r\n## The current behavior\r\n`<input type=\"radio\" />`'s `onChange` prop\
\ is not called on subsequent clicks of the input\r\n\r\n## The expected behavior\r\
\n`<input type=\"radio\" />`'s `onChange` prop should be called on subsequent\
\ clicks of the input\r\n"
- text: "Allow opting out of invokeGuardedCallbackDev At the moment, when in development\
\ mode, React uses a special workflow for callbacks, to avoid using `try...catch`.\r\
\n\r\nIt works well. So well that several testing frameworks also get their uncaught\
\ exception handling triggered.\r\n\r\n**Example with mocha:**\r\n```js\r\nimport\
\ React from 'react';\r\nimport { render } from '@testing-library/react';\r\n\r\
\nfunction MyComponent({ doThrow }) {\r\n if (doThrow) { throw new Error('I'm\
\ bad'); }\r\n return <div></div>;\r\n}\r\n\r\nit('should throw', function\
\ () {\r\n expect(() => {\r\n render(<MyComponent doThrow/>);\r\n \
\ }).to.throw();\r\n});\r\n```\r\n**Behavior:**\r\n- When running the test with\
\ the production build of react/react-dom, the test passes (with the usual warning\
\ of act being unsupported in prod build).\r\n- When running the test with the\
\ development build of react-/react-dom, the test fails with `Error: Uncaught\
\ Error: I'm bad`.\r\n\r\nThe root cause is `invokeGuardedCallbackDev` runs the\
\ callback in an event to avoid using a `try...catch` block… and trips Mocha.js\
\ uncaught exception detector.\r\n\r\n*Note: I am aware of error boundaries, I\
\ removed it from the example because the behavior is identical with it.*\r\n\r\
\n*Note: I used testing-library for clarity, but using `act` and `RenderDOM` manually\
\ yields the same result.*\r\n\r\n**Expected behavior:**\r\n- Either make it work\
\ out of the box, or have the possibility to opt out of `invokeGuardedCallbackDev`\
\ and force the use of the regular `try...catch` implementation in development\
\ too.\r\n"
- text: "Setting rendering mode to <Surface> component of react-art <!--\r\n Note:\
\ if the issue is about documentation or the website, please file it at:\r\n \
\ https://github.com/reactjs/reactjs.org/issues/new\r\n-->\r\n\r\n**Do you want\
\ to request a *feature* or report a *bug*?**\r\nfeature\r\n\r\n**What is the\
\ current behavior?**\r\n`<Surface>` of canvas mode and `<Surface>` of svg mode\
\ cannot be used in a document at the same time.\r\n\r\n**What is the expected\
\ behavior?**\r\nTwo more `<Surface>` components with each other modes can be\
\ used in a document at the same time.\r\n\r\n\r\nCurrently developers can set\
\ only one rending mode globally in react-art, using `setCurrent()` of `art/modes/current`\
\ module. So there is no way to use `<Surface>` of canvas mode and `<Surface>`\
\ of svg mode in a document together. On the other hand, `art.js` internally used\
\ in `react-art` provides a way to use each other modes together as directly importing\
\ their corresponding modules. (e.g. svg.js for svg mode, canvas.js for canvas\
\ mode in `art.js` lib). \r\n\r\nI would like to suggest a way to set own rendering\
\ mode per instance of `<Surface>` Component by new property `mode`. This feature\
\ makes `<Surface>` with canvas mode and `<Surface>` with svg mode to be used\
\ together in a document like the following.\r\n\r\n```javascript\r\nconst {\r\
\n Surface,\r\n Group,\r\n Shape\r\n} = require('react-art');\r\n\r\nclass\
\ TestComponent extends React.Component {\r\n render() {\r\n return (\r\n\
\ <React.Fragment>\r\n <Surface mode=\"svg\" width={100} height={100}>\r\
\n <Group>\r\n <Shape width={10} height={10} />\r\n \
\ </Group>\r\n </Surface>\r\n <Surface mode=\"canvas\" width={100}\
\ height={100}>\r\n <Group>\r\n <Shape width={10} height={10}\
\ />\r\n </Group>\r\n </Surface>\r\n </React.Fragment>\r\n\
\ );\r\n }\r\n};\r\n```\r\n\r\nIf `mode` property is not set, `<Surface>`\
\ works as canvas mode for compatibility.\r\n\r\nI have made a PR for this feature\
\ to show how to work and use it ([#13249](https://github.com/facebook/react/pull/13249)).\r\
\nAnd you can check this feature through `art` fixture of my PR.\r\n\r\nFeel free\
\ to discuss about this feature.\r\n\r\n\r\n\r\n"
- text: "[DevTools Bug]: Firefox and Edge show error in console about unrecognized\
\ installation on v4.20.0 ### Website or app\r\n\r\nreactjs.org\r\n\r\n### Repro\
\ steps\r\n\r\n1. Install React DevTools v4.20.0 in Firefox\r\n2. Load reactjs.org\
\ in Firefox\r\n3. Open Firefox DevTools\r\n4. Observe error in console\r\n\r\n\
![image](https://user-images.githubusercontent.com/1271509/137547605-e6ad3045-c20a-4828-9895-af46b8bb4db1.png)\r\
\n\r\n\r\n### How often does this bug happen?\r\n\r\nEvery time\r\n"
- text: "componentWillUpdate discussion <!--\r\n Note: if the issue is about documentation\
\ or the website, please file it at:\r\n https://github.com/reactjs/reactjs.org/issues/new\r\
\n-->\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\n\r\n\
Feature : componentWillUpdate Discussion\r\n\r\n**What is the current behavior?**\r\
\n\r\nThe current behavior calls the function before re-rendering the render target\
\ however there is no indication for when the re-render method should be called\r\
\n\r\n**If the current behavior is a bug, please provide the steps to reproduce\
\ and if possible a minimal demo of the problem. Your bug will get fixed much\
\ faster if we can run your code and it doesn't have dependencies other than React.\
\ Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox\
\ (https://codesandbox.io/s/new) example below:**\r\n\r\n**What is the expected\
\ behavior?**\r\n\r\nThe expected behavior should call the function before re-rendering\
\ the render target if there is no returned conditional statement and if there\
\ is, true should trigger the re-render and false should not\r\n\r\n**Which versions\
\ of React, and which browser / OS are affected by this issue? Did this work in\
\ previous versions of React?**\r\n\r\n16.4.0\r\n\r\nI have a few questions before\
\ I try to solve this problem and it gets rejected. I'm assuming that the team\
\ has decided to move in the direction of removing \"Will-Updates\" from React\
\ all together and have labeled them \"Unsafe\". I've seen a lot of issues with\
\ those functionalities before as well. I was curious if providing a conditional\
\ statement inside those functions would satisfy the unexpected renders. \"shouldComponentUpdate\"\
\ does trigger when to call these functions however in those functions that \"\
will\" run before the render can always be controlled with a conditional statement\
\ of it's own. I'm getting comfortable with the code base however I'm curious\
\ if the team is removing that functionality all together and using the \"static\"\
\ function \"getDerivedStateFromProps\" instead. Has a React lover it is a little\
\ confusing and may break a lot of legacy code when updating versions. I believe\
\ that may solve the problem of unexpected renders after a \"will\" change lifecycle\
\ event.\r\n\r\nI was curious if that was the case, and removing \"will\" lifecycles\
\ is the next steps for React then how will the \"did\" lifecycles work instead?\r\
\n\r\nI love React and I'm just curious about the future for React as a whole.\
\ I'd love to tackle any bugs or feature requests when I have time. I will be\
\ writing clean code and create tests for new features or bugs as well."
inference: true
---
# SetFit with sentence-transformers/all-mpnet-base-v2
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
2. Training a classification head with features from the fine-tuned Sentence Transformer.
## Model Details
### Model Description
- **Model Type:** SetFit
- **Sentence Transformer body:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
- **Maximum Sequence Length:** 384 tokens
- **Number of Classes:** 3 classes
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### Model Sources
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
### Model Labels
| Label | Examples |
|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| feature | <ul><li>"Provide a `testInstance.context` property to facilitate context testing <!--\r\n Note: if the issue is about documentation or the website, please file it at:\r\n https://github.com/reactjs/reactjs.org/issues/new\r\n-->\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\nFeature Request\r\n\r\n**What is the current behavior?**\r\n`testInstance` provides a `props` property, but does not provide a `context` property allowing for context tests.\r\n\r\n**What is the expected behavior?**\r\n`testInstance.context` should return an object containing the instance's current context\r\n\r\n**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**\r\nAt least 16.4.1"</li><li>'Cursor jumps to end of input when onChange doesn\'t call setState [Edit]: **I\'m asking for a feature**.\r\n\r\n**Current Behaviour**\r\nAn input `onChange` function that returns a value equalling the prior value causes the cursor to jump to the end of the input. This is the same as [this comment from #995](https://github.com/facebook/react/issues/955#issuecomment-327069204) formally raised as a feature request. \r\n\r\nRepro sandbox: https://codesandbox.io/s/n4k3yx47j\r\nThat same code: \r\n```javascript\r\nimport React from "react";\r\nimport { render } from "react-dom";\r\n\r\nclass Input extends React.Component {\r\n state = { value: "TypeANumber" };\r\n\r\n onChange = e => {\r\n let nextValue = e.target.value;\r\n\r\n if (/[0-9]/.test(nextValue)) {\r\n nextValue = this.state.value;\r\n }\r\n this.setState({ value: nextValue });\r\n };\r\n\r\n render() {\r\n return (\r\n <input\r\n type="text"\r\n value={this.state.value}\r\n onChange={this.onChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\nrender(<Input />, document.getElementById("root"));\r\n```\r\n\r\n**What is the expected behavior?**\r\nI\'d like the cursor not to jump in the special case where the returned changed value is a rejected change i.e. the \'noop\' change. \r\n\r\nI understand fully that react cannot predict cursor position if the value is _changed_ in `onChange`, ~however I cannot currently find an npm module that allows free-length regex filters (vs a fixed length mask)~ or a way to implement a filter myself, without the cursor jumping in this case. \r\n\r\n[Edit]: \r\nSince raising I now fully see this as a feature request for handling a special case of a behaviour that indeed is not a bug, differently. It would be a nice to have as it would allow very straightforward implementation of filters. \r\n\r\nRegarding the non-clarity of how to deal with the general case of non-jumping cursors I think a modernized best practice example would be ideal, but that discussion still lives at #955. \r\n\r\nI\'d be totally fine with this issue being closed by assisting instead with the education of handling the general case. Though, this would still be a nice to have for the API, if possible. \r\n'</li><li>'Allow ReactNode as a type for the child of <option/> **Do you want to request a *feature* or report a *bug*?**\r\nFeature\r\n\r\n**What is the current behavior?**\r\nCurrently, the options element only allows types number and string. \r\n\r\n**What is the expected behavior?**\r\nAn option should allow for a ReactNode as a child in addition to a number + string. \r\n\r\n**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**\r\nAll versions.\r\nAll browser types.\r\nTo the best of my knowledge, no.\r\n\r\np.s. This is my first feature request here, so let me know if I need to adjust the feature request in any way. '</li></ul> |
| bug | <ul><li>' ERROR TypeError: Cannot read property \'createElement\' of undefined, js engine: hermes ### App\r\n\r\nusing flipper dor react devtools\r\n\r\n### Repro steps\r\n\r\nmigrate to current version of RN-0.71.1\r\nusing flipper \r\nenable hermes engine\r\nrun the app\r\n\r\n\r\n\r\n\r\n### How often does this bug happen?\r\n\r\nEvery time\r\n\r\n### DevTools package (automated)\r\n\r\n_No response_\r\n\r\n### DevTools version (automated)\r\n\r\n_No response_\r\n\r\n### Error message (automated)\r\n\r\nERROR TypeError: Cannot read property \'createElement\' of undefined, js engine: hermes \r\n\r\n### Error call stack (automated)\r\n\r\n```text\r\nERROR TypeError: Cannot read property \'createElement\' of undefined, js engine: hermes \r\n\r\nthis is related to --->> path: node_modules/react-devtools-core/dist/backend.js\r\nfunction initialize() {\r\n canvas = window.document.createElement(\'canvas\');\r\n canvas.style.cssText = "\\\\n xx-background-color: red;\\\\n xx-opacity: 0.5;\\\\n bottom: 0;\\\\n left: 0;\\\\n pointer-events: none;\\\\n position: fixed;\\\\n right: 0;\\\\n top: 0;\\\\n z-index: 1000000000;\\\\n ";\r\n var root = window.document.documentElement;\r\n root.insertBefore(canvas, root.firstChild);\r\n}\r\n```\r\n\r\n\r\n### Error component stack (automated)\r\n\r\n_No response_\r\n\r\n### GitHub query string (automated)\r\n\r\n_No response_'</li><li>'[DevTools Bug] Cannot remove node "0" because no matching node was found in the Store. ### Website or app\n\nReact Native App\n\n### Repro steps\n\n1. Run react native app\r\n2. npx react-devtools\r\n3. adb reverse tcp:8097 tcp:8097\r\n4. reload the app, this error should come as mentioned below\n\n### How often does this bug happen?\n\nEvery time\n\n### DevTools package (automated)\n\nreact-devtools-core\n\n### DevTools version (automated)\n\n4.24.7-7f673317f\n\n### Error message (automated)\n\nCannot remove node "0" because no matching node was found in the Store.\n\n### Error call stack (automated)\n\n```text\nat /Users/300037427/.npm/_npx/64332/lib/node_modules/react-devtools/node_modules/react-devtools-core/dist/standalone.js:48:333971\r\n at f.emit (/Users/300037427/.npm/_npx/64332/lib/node_modules/react-devtools/node_modules/react-devtools-core/dist/standalone.js:48:279464)\r\n at /Users/300037427/.npm/_npx/64332/lib/node_modules/react-devtools/node_modules/react-devtools-core/dist/standalone.js:48:281005\r\n at /Users/300037427/.npm/_npx/64332/lib/node_modules/react-devtools/node_modules/react-devtools-core/dist/standalone.js:48:667650\r\n at Array.forEach (<anonymous>)\r\n at A.e.onmessage (/Users/300037427/.npm/_npx/64332/lib/node_modules/react-devtools/node_modules/react-devtools-core/dist/standalone.js:48:667634)\r\n at A.t (/Users/300037427/.npm/_npx/64332/lib/node_modules/react-devtools/node_modules/react-devtools-core/dist/standalone.js:39:2838)\r\n at A.emit (events.js:315:20)\r\n at e.exports.L (/Users/300037427/.npm/_npx/64332/lib/node_modules/react-devtools/node_modules/react-devtools-core/dist/standalone.js:3:58322)\r\n at e.exports.emit (events.js:315:20)\n```\n\n\n### Error component stack (automated)\n\n_No response_\n\n### GitHub query string (automated)\n\n```text\nhttps://api.github.com/search/issues?q=Cannot remove node because no matching node was found in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react\n```\n'</li><li>'[DevTools Bug] Cannot add node "1" because a node with that id is already in the Store. ### Website or app\r\n\r\nhttps://pasteboard.co/6Ec3lSzDE4Yz.png\r\n\r\n### Repro steps\r\n\r\n1. Open Chrome with 50+ tabs.\r\n2. Run React-based website locally.\r\n3. Open Chrome Dev Tools to investigate [ActiveLink component](https://pasteboard.co/6Ec3lSzDE4Yz.png) hierarchy inside [Navbar component](https://pasteboard.co/ab8kgmDNgn1I.png). \r\n4. ActiveLink component from [Next](https://github.com/vercel/next.js/tree/canary/examples/active-class-name) was used.\r\n5. Get uncaught error [Screenshot](https://pasteboard.co/3ugPX34TF2Xr.png)\r\n\r\n### How often does this bug happen?\r\n\r\nSometimes\r\n\r\n### DevTools package (automated)\r\n\r\nreact-devtools-extensions\r\n\r\n### DevTools version (automated)\r\n\r\n4.21.0-2f8f60ca8\r\n\r\n### Error message (automated)\r\n\r\nCannot add node "1" because a node with that id is already in the Store.\r\n\r\n### Error call stack (automated)\r\n\r\n```text\r\nat chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26134:41\r\n at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24349:22)\r\n at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24509:12\r\n at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:53230:39)\r\n```\r\n\r\n\r\n### Error component stack (automated)\r\n\r\n_No response_\r\n\r\n### GitHub query string (automated)\r\n\r\n```text\r\nhttps://api.github.com/search/issues?q=Cannot add node because a node with that id is already in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react\r\n```\r\n'</li></ul> |
| question | <ul><li>'DevTools component filter does not work with location **Do you want to request a *feature* or report a *bug*?**\r\nReport a bug.\r\n\r\n**What is the current behavior?**\r\nIn DevTools when a component filter is added with field set to `location` and regex set to `.*`, nothing is filtered out. (BTW, no documentation in this subject is available anywhere.)\r\n\r\n**What is the expected behavior?**\r\nAt least some components be filtered out.\r\nIt would also be awesome if the `location` was shown somewhere for the selected component, so that users can know what kind of Regex they should put together.\r\n\r\n**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**\r\nReact DevTools 4.2.0 on Firefox 69.0.3.'</li><li>'× Maximum update depth exceeded in controled way **Do you want to request a *feature* or report a *bug*?**\r\n- maybe bug?\r\n\r\n**What is the current behavior?**\r\n\r\nMy case is that I want to update state n times by adding different types of fields to the state and then render them. \r\nEvery updating of dom(adding new field) I have to check whether I should do something more by checking the hight of added elements, for example, add a break between elements. \r\nFields are represented by the tree structure of data, so I created the class which helps me with going through the tree of fields and I keep it in the class property.\r\n\r\nI know how many times I have to modify the DOM so It will be a fully controlled way of state update and it will finish after all fields are added to DOM but before I render all fields I am getting the error "Maximum update depth exceeded".\r\n\r\nDo you know How I can handle with such a problem? \r\nI found a solution by adding setTimeout on the way but I am not sure that is the clean solution?(commented code)\r\nIs it ok that I keep in component class property more complex class to manage structure of data?\r\n\r\nI am providing a simple example in codepage which shows the problem and throw the error.\r\n\r\nhttps://codesandbox.io/s/93w2lp37xw\r\n'</li><li>'Bug: Nested setState and unstable_batchedUpdates (are they ignored?) Nested setState and unstable_batchedUpdates (are them ignored?)\r\n\r\nReact version: 16.12\r\n\r\n## Steps To Reproduce\r\nhttps://codesandbox.io/s/batchedupdates-uselayouteffect-evj8s\r\n\r\nopen profile after click, you will see 3 commit.\r\n\r\nit seems that even if we use unstable_batchedUpdates, nested setStates called on\r\ndidUpdate/layouteffect do not get batched.\r\n'</li></ul> |
## Uses
### Direct Use for Inference
First install the SetFit library:
```bash
pip install setfit
```
Then you can load this model and run inference.
```python
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("[DevTools Bug]: Firefox and Edge show error in console about unrecognized installation on v4.20.0 ### Website or app
reactjs.org
### Repro steps
1. Install React DevTools v4.20.0 in Firefox
2. Load reactjs.org in Firefox
3. Open Firefox DevTools
4. Observe error in console
![image](https://user-images.githubusercontent.com/1271509/137547605-e6ad3045-c20a-4828-9895-af46b8bb4db1.png)
### How often does this bug happen?
Every time
")
```
<!--
### Downstream Use
*List how someone could finetune this model on their own dataset.*
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
## Training Details
### Training Set Metrics
| Training set | Min | Median | Max |
|:-------------|:----|:-------|:-----|
| Word count | 11 | 190.23 | 1528 |
| Label | Training Sample Count |
|:---------|:----------------------|
| bug | 200 |
| feature | 200 |
| question | 200 |
### Training Hyperparameters
- batch_size: (16, 2)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 20
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: False
- use_amp: False
- warmup_proportion: 0.1
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
### Training Results
| Epoch | Step | Training Loss | Validation Loss |
|:------:|:----:|:-------------:|:---------------:|
| 0.0007 | 1 | 0.2882 | - |
| 0.0067 | 10 | 0.1652 | - |
| 0.0133 | 20 | 0.2361 | - |
| 0.02 | 30 | 0.1886 | - |
| 0.0267 | 40 | 0.1705 | - |
| 0.0333 | 50 | 0.1868 | - |
| 0.04 | 60 | 0.1858 | - |
| 0.0467 | 70 | 0.1324 | - |
| 0.0533 | 80 | 0.1686 | - |
| 0.06 | 90 | 0.2588 | - |
| 0.0667 | 100 | 0.1911 | - |
| 0.0733 | 110 | 0.0388 | - |
| 0.08 | 120 | 0.0945 | - |
| 0.0867 | 130 | 0.1085 | - |
| 0.0933 | 140 | 0.1812 | - |
| 0.1 | 150 | 0.0593 | - |
| 0.1067 | 160 | 0.1169 | - |
| 0.1133 | 170 | 0.0294 | - |
| 0.12 | 180 | 0.0867 | - |
| 0.1267 | 190 | 0.0392 | - |
| 0.1333 | 200 | 0.0454 | - |
| 0.14 | 210 | 0.0316 | - |
| 0.1467 | 220 | 0.0834 | - |
| 0.1533 | 230 | 0.0075 | - |
| 0.16 | 240 | 0.0676 | - |
| 0.1667 | 250 | 0.0507 | - |
| 0.1733 | 260 | 0.0456 | - |
| 0.18 | 270 | 0.0174 | - |
| 0.1867 | 280 | 0.0093 | - |
| 0.1933 | 290 | 0.0029 | - |
| 0.2 | 300 | 0.0029 | - |
| 0.2067 | 310 | 0.0008 | - |
| 0.2133 | 320 | 0.0201 | - |
| 0.22 | 330 | 0.0072 | - |
| 0.2267 | 340 | 0.0055 | - |
| 0.2333 | 350 | 0.0041 | - |
| 0.24 | 360 | 0.0057 | - |
| 0.2467 | 370 | 0.0015 | - |
| 0.2533 | 380 | 0.0071 | - |
| 0.26 | 390 | 0.0017 | - |
| 0.2667 | 400 | 0.0283 | - |
| 0.2733 | 410 | 0.0093 | - |
| 0.28 | 420 | 0.001 | - |
| 0.2867 | 430 | 0.0026 | - |
| 0.2933 | 440 | 0.0011 | - |
| 0.3 | 450 | 0.0007 | - |
| 0.3067 | 460 | 0.0006 | - |
| 0.3133 | 470 | 0.0007 | - |
| 0.32 | 480 | 0.0009 | - |
| 0.3267 | 490 | 0.0002 | - |
| 0.3333 | 500 | 0.0015 | - |
| 0.34 | 510 | 0.0005 | - |
| 0.3467 | 520 | 0.0002 | - |
| 0.3533 | 530 | 0.0003 | - |
| 0.36 | 540 | 0.0023 | - |
| 0.3667 | 550 | 0.0003 | - |
| 0.3733 | 560 | 0.0003 | - |
| 0.38 | 570 | 0.0002 | - |
| 0.3867 | 580 | 0.0002 | - |
| 0.3933 | 590 | 0.0002 | - |
| 0.4 | 600 | 0.0002 | - |
| 0.4067 | 610 | 0.0004 | - |
| 0.4133 | 620 | 0.0004 | - |
| 0.42 | 630 | 0.0004 | - |
| 0.4267 | 640 | 0.0003 | - |
| 0.4333 | 650 | 0.0002 | - |
| 0.44 | 660 | 0.0011 | - |
| 0.4467 | 670 | 0.0003 | - |
| 0.4533 | 680 | 0.0002 | - |
| 0.46 | 690 | 0.0001 | - |
| 0.4667 | 700 | 0.0002 | - |
| 0.4733 | 710 | 0.0002 | - |
| 0.48 | 720 | 0.0002 | - |
| 0.4867 | 730 | 0.0002 | - |
| 0.4933 | 740 | 0.0001 | - |
| 0.5 | 750 | 0.0002 | - |
| 0.5067 | 760 | 0.0003 | - |
| 0.5133 | 770 | 0.0001 | - |
| 0.52 | 780 | 0.0001 | - |
| 0.5267 | 790 | 0.0001 | - |
| 0.5333 | 800 | 0.0002 | - |
| 0.54 | 810 | 0.0002 | - |
| 0.5467 | 820 | 0.0001 | - |
| 0.5533 | 830 | 0.0002 | - |
| 0.56 | 840 | 0.0001 | - |
| 0.5667 | 850 | 0.0001 | - |
| 0.5733 | 860 | 0.0001 | - |
| 0.58 | 870 | 0.0001 | - |
| 0.5867 | 880 | 0.0001 | - |
| 0.5933 | 890 | 0.0001 | - |
| 0.6 | 900 | 0.0003 | - |
| 0.6067 | 910 | 0.0002 | - |
| 0.6133 | 920 | 0.0001 | - |
| 0.62 | 930 | 0.0001 | - |
| 0.6267 | 940 | 0.0 | - |
| 0.6333 | 950 | 0.0001 | - |
| 0.64 | 960 | 0.0001 | - |
| 0.6467 | 970 | 0.0001 | - |
| 0.6533 | 980 | 0.0001 | - |
| 0.66 | 990 | 0.0001 | - |
| 0.6667 | 1000 | 0.0 | - |
| 0.6733 | 1010 | 0.0001 | - |
| 0.68 | 1020 | 0.0001 | - |
| 0.6867 | 1030 | 0.0001 | - |
| 0.6933 | 1040 | 0.0001 | - |
| 0.7 | 1050 | 0.0001 | - |
| 0.7067 | 1060 | 0.0001 | - |
| 0.7133 | 1070 | 0.0001 | - |
| 0.72 | 1080 | 0.0001 | - |
| 0.7267 | 1090 | 0.0 | - |
| 0.7333 | 1100 | 0.0001 | - |
| 0.74 | 1110 | 0.0 | - |
| 0.7467 | 1120 | 0.0001 | - |
| 0.7533 | 1130 | 0.0002 | - |
| 0.76 | 1140 | 0.0 | - |
| 0.7667 | 1150 | 0.0001 | - |
| 0.7733 | 1160 | 0.0 | - |
| 0.78 | 1170 | 0.0001 | - |
| 0.7867 | 1180 | 0.0001 | - |
| 0.7933 | 1190 | 0.0001 | - |
| 0.8 | 1200 | 0.0001 | - |
| 0.8067 | 1210 | 0.0001 | - |
| 0.8133 | 1220 | 0.0001 | - |
| 0.82 | 1230 | 0.0003 | - |
| 0.8267 | 1240 | 0.0 | - |
| 0.8333 | 1250 | 0.0 | - |
| 0.84 | 1260 | 0.0001 | - |
| 0.8467 | 1270 | 0.0 | - |
| 0.8533 | 1280 | 0.0002 | - |
| 0.86 | 1290 | 0.0001 | - |
| 0.8667 | 1300 | 0.0002 | - |
| 0.8733 | 1310 | 0.0001 | - |
| 0.88 | 1320 | 0.0001 | - |
| 0.8867 | 1330 | 0.0 | - |
| 0.8933 | 1340 | 0.0001 | - |
| 0.9 | 1350 | 0.0001 | - |
| 0.9067 | 1360 | 0.0001 | - |
| 0.9133 | 1370 | 0.0 | - |
| 0.92 | 1380 | 0.0001 | - |
| 0.9267 | 1390 | 0.0001 | - |
| 0.9333 | 1400 | 0.0 | - |
| 0.94 | 1410 | 0.0001 | - |
| 0.9467 | 1420 | 0.0001 | - |
| 0.9533 | 1430 | 0.0001 | - |
| 0.96 | 1440 | 0.0001 | - |
| 0.9667 | 1450 | 0.0001 | - |
| 0.9733 | 1460 | 0.0001 | - |
| 0.98 | 1470 | 0.0001 | - |
| 0.9867 | 1480 | 0.0 | - |
| 0.9933 | 1490 | 0.0001 | - |
| 1.0 | 1500 | 0.0001 | - |
### Framework Versions
- Python: 3.10.12
- SetFit: 1.0.3
- Sentence Transformers: 3.0.1
- Transformers: 4.39.0
- PyTorch: 2.3.0+cu121
- Datasets: 2.20.0
- Tokenizers: 0.15.2
## Citation
### BibTeX
```bibtex
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->