Initial commit with model files
Browse files- README.md +450 -0
- config.json +24 -0
- config_sentence_transformers.json +10 -0
- config_setfit.json +8 -0
- model.safetensors +3 -0
- model_head.pkl +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +72 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,450 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: sentence-transformers/all-mpnet-base-v2
|
| 3 |
+
library_name: setfit
|
| 4 |
+
metrics:
|
| 5 |
+
- accuracy
|
| 6 |
+
pipeline_tag: text-classification
|
| 7 |
+
tags:
|
| 8 |
+
- setfit
|
| 9 |
+
- sentence-transformers
|
| 10 |
+
- text-classification
|
| 11 |
+
- generated_from_setfit_trainer
|
| 12 |
+
widget:
|
| 13 |
+
- text: "Bug: Radio button onChange not called in current React Canary <!--\r\n Please\
|
| 14 |
+
\ provide a clear and concise description of what the bug is. Include\r\n screenshots\
|
| 15 |
+
\ if needed. Please test using the latest version of the relevant\r\n React packages\
|
| 16 |
+
\ to make sure your issue has not already been fixed.\r\n-->\r\n\r\nReact version:\
|
| 17 |
+
\ 18.3.0-canary-a1f97589f-20230526\r\n\r\n\r\n## Steps To Reproduce\r\n\r\n1.\
|
| 18 |
+
\ Create radio buttons that toggle `disabled` in `onChange`\r\n2. After selecting\
|
| 19 |
+
\ each radio button, `onChange` is no longer called\r\n\r\n<!--\r\n Your bug\
|
| 20 |
+
\ will get fixed much faster if we can run your code and it doesn't\r\n have\
|
| 21 |
+
\ dependencies other than React. Issues without reproduction steps or\r\n code\
|
| 22 |
+
\ examples may be immediately closed as not actionable.\r\n-->\r\n\r\nLink to\
|
| 23 |
+
\ code example:\r\n\r\nThe following CodeSandbox demonstrates the issue with the\
|
| 24 |
+
\ current react canary version. The issue is not present when react & react-dom\
|
| 25 |
+
\ 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\
|
| 26 |
+
\n\r\n<!--\r\n Please provide a CodeSandbox (https://codesandbox.io/s/new), a\
|
| 27 |
+
\ link to a\r\n repository on GitHub, or provide a minimal code example that\
|
| 28 |
+
\ reproduces the\r\n problem. You may provide a screenshot of the application\
|
| 29 |
+
\ if you think it is\r\n relevant to your bug report. Here are some tips for\
|
| 30 |
+
\ providing a minimal\r\n example: https://stackoverflow.com/help/mcve.\r\n-->\r\
|
| 31 |
+
\n\r\n## The current behavior\r\n`<input type=\"radio\" />`'s `onChange` prop\
|
| 32 |
+
\ is not called on subsequent clicks of the input\r\n\r\n## The expected behavior\r\
|
| 33 |
+
\n`<input type=\"radio\" />`'s `onChange` prop should be called on subsequent\
|
| 34 |
+
\ clicks of the input\r\n"
|
| 35 |
+
- text: "Allow opting out of invokeGuardedCallbackDev At the moment, when in development\
|
| 36 |
+
\ mode, React uses a special workflow for callbacks, to avoid using `try...catch`.\r\
|
| 37 |
+
\n\r\nIt works well. So well that several testing frameworks also get their uncaught\
|
| 38 |
+
\ exception handling triggered.\r\n\r\n**Example with mocha:**\r\n```js\r\nimport\
|
| 39 |
+
\ React from 'react';\r\nimport { render } from '@testing-library/react';\r\n\r\
|
| 40 |
+
\nfunction MyComponent({ doThrow }) {\r\n if (doThrow) { throw new Error('I'm\
|
| 41 |
+
\ bad'); }\r\n return <div></div>;\r\n}\r\n\r\nit('should throw', function\
|
| 42 |
+
\ () {\r\n expect(() => {\r\n render(<MyComponent doThrow/>);\r\n \
|
| 43 |
+
\ }).to.throw();\r\n});\r\n```\r\n**Behavior:**\r\n- When running the test with\
|
| 44 |
+
\ the production build of react/react-dom, the test passes (with the usual warning\
|
| 45 |
+
\ of act being unsupported in prod build).\r\n- When running the test with the\
|
| 46 |
+
\ development build of react-/react-dom, the test fails with `Error: Uncaught\
|
| 47 |
+
\ Error: I'm bad`.\r\n\r\nThe root cause is `invokeGuardedCallbackDev` runs the\
|
| 48 |
+
\ callback in an event to avoid using a `try...catch` block… and trips Mocha.js\
|
| 49 |
+
\ uncaught exception detector.\r\n\r\n*Note: I am aware of error boundaries, I\
|
| 50 |
+
\ removed it from the example because the behavior is identical with it.*\r\n\r\
|
| 51 |
+
\n*Note: I used testing-library for clarity, but using `act` and `RenderDOM` manually\
|
| 52 |
+
\ yields the same result.*\r\n\r\n**Expected behavior:**\r\n- Either make it work\
|
| 53 |
+
\ out of the box, or have the possibility to opt out of `invokeGuardedCallbackDev`\
|
| 54 |
+
\ and force the use of the regular `try...catch` implementation in development\
|
| 55 |
+
\ too.\r\n"
|
| 56 |
+
- text: "Setting rendering mode to <Surface> component of react-art <!--\r\n Note:\
|
| 57 |
+
\ if the issue is about documentation or the website, please file it at:\r\n \
|
| 58 |
+
\ https://github.com/reactjs/reactjs.org/issues/new\r\n-->\r\n\r\n**Do you want\
|
| 59 |
+
\ to request a *feature* or report a *bug*?**\r\nfeature\r\n\r\n**What is the\
|
| 60 |
+
\ current behavior?**\r\n`<Surface>` of canvas mode and `<Surface>` of svg mode\
|
| 61 |
+
\ cannot be used in a document at the same time.\r\n\r\n**What is the expected\
|
| 62 |
+
\ behavior?**\r\nTwo more `<Surface>` components with each other modes can be\
|
| 63 |
+
\ used in a document at the same time.\r\n\r\n\r\nCurrently developers can set\
|
| 64 |
+
\ only one rending mode globally in react-art, using `setCurrent()` of `art/modes/current`\
|
| 65 |
+
\ module. So there is no way to use `<Surface>` of canvas mode and `<Surface>`\
|
| 66 |
+
\ of svg mode in a document together. On the other hand, `art.js` internally used\
|
| 67 |
+
\ in `react-art` provides a way to use each other modes together as directly importing\
|
| 68 |
+
\ their corresponding modules. (e.g. svg.js for svg mode, canvas.js for canvas\
|
| 69 |
+
\ mode in `art.js` lib). \r\n\r\nI would like to suggest a way to set own rendering\
|
| 70 |
+
\ mode per instance of `<Surface>` Component by new property `mode`. This feature\
|
| 71 |
+
\ makes `<Surface>` with canvas mode and `<Surface>` with svg mode to be used\
|
| 72 |
+
\ together in a document like the following.\r\n\r\n```javascript\r\nconst {\r\
|
| 73 |
+
\n Surface,\r\n Group,\r\n Shape\r\n} = require('react-art');\r\n\r\nclass\
|
| 74 |
+
\ TestComponent extends React.Component {\r\n render() {\r\n return (\r\n\
|
| 75 |
+
\ <React.Fragment>\r\n <Surface mode=\"svg\" width={100} height={100}>\r\
|
| 76 |
+
\n <Group>\r\n <Shape width={10} height={10} />\r\n \
|
| 77 |
+
\ </Group>\r\n </Surface>\r\n <Surface mode=\"canvas\" width={100}\
|
| 78 |
+
\ height={100}>\r\n <Group>\r\n <Shape width={10} height={10}\
|
| 79 |
+
\ />\r\n </Group>\r\n </Surface>\r\n </React.Fragment>\r\n\
|
| 80 |
+
\ );\r\n }\r\n};\r\n```\r\n\r\nIf `mode` property is not set, `<Surface>`\
|
| 81 |
+
\ works as canvas mode for compatibility.\r\n\r\nI have made a PR for this feature\
|
| 82 |
+
\ to show how to work and use it ([#13249](https://github.com/facebook/react/pull/13249)).\r\
|
| 83 |
+
\nAnd you can check this feature through `art` fixture of my PR.\r\n\r\nFeel free\
|
| 84 |
+
\ to discuss about this feature.\r\n\r\n\r\n\r\n"
|
| 85 |
+
- text: "[DevTools Bug]: Firefox and Edge show error in console about unrecognized\
|
| 86 |
+
\ installation on v4.20.0 ### Website or app\r\n\r\nreactjs.org\r\n\r\n### Repro\
|
| 87 |
+
\ steps\r\n\r\n1. Install React DevTools v4.20.0 in Firefox\r\n2. Load reactjs.org\
|
| 88 |
+
\ in Firefox\r\n3. Open Firefox DevTools\r\n4. Observe error in console\r\n\r\n\
|
| 89 |
+
\r\
|
| 90 |
+
\n\r\n\r\n### How often does this bug happen?\r\n\r\nEvery time\r\n"
|
| 91 |
+
- text: "componentWillUpdate discussion <!--\r\n Note: if the issue is about documentation\
|
| 92 |
+
\ or the website, please file it at:\r\n https://github.com/reactjs/reactjs.org/issues/new\r\
|
| 93 |
+
\n-->\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\n\r\n\
|
| 94 |
+
Feature : componentWillUpdate Discussion\r\n\r\n**What is the current behavior?**\r\
|
| 95 |
+
\n\r\nThe current behavior calls the function before re-rendering the render target\
|
| 96 |
+
\ however there is no indication for when the re-render method should be called\r\
|
| 97 |
+
\n\r\n**If the current behavior is a bug, please provide the steps to reproduce\
|
| 98 |
+
\ and if possible a minimal demo of the problem. Your bug will get fixed much\
|
| 99 |
+
\ faster if we can run your code and it doesn't have dependencies other than React.\
|
| 100 |
+
\ Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox\
|
| 101 |
+
\ (https://codesandbox.io/s/new) example below:**\r\n\r\n**What is the expected\
|
| 102 |
+
\ behavior?**\r\n\r\nThe expected behavior should call the function before re-rendering\
|
| 103 |
+
\ the render target if there is no returned conditional statement and if there\
|
| 104 |
+
\ is, true should trigger the re-render and false should not\r\n\r\n**Which versions\
|
| 105 |
+
\ of React, and which browser / OS are affected by this issue? Did this work in\
|
| 106 |
+
\ previous versions of React?**\r\n\r\n16.4.0\r\n\r\nI have a few questions before\
|
| 107 |
+
\ I try to solve this problem and it gets rejected. I'm assuming that the team\
|
| 108 |
+
\ has decided to move in the direction of removing \"Will-Updates\" from React\
|
| 109 |
+
\ all together and have labeled them \"Unsafe\". I've seen a lot of issues with\
|
| 110 |
+
\ those functionalities before as well. I was curious if providing a conditional\
|
| 111 |
+
\ statement inside those functions would satisfy the unexpected renders. \"shouldComponentUpdate\"\
|
| 112 |
+
\ does trigger when to call these functions however in those functions that \"\
|
| 113 |
+
will\" run before the render can always be controlled with a conditional statement\
|
| 114 |
+
\ of it's own. I'm getting comfortable with the code base however I'm curious\
|
| 115 |
+
\ if the team is removing that functionality all together and using the \"static\"\
|
| 116 |
+
\ function \"getDerivedStateFromProps\" instead. Has a React lover it is a little\
|
| 117 |
+
\ confusing and may break a lot of legacy code when updating versions. I believe\
|
| 118 |
+
\ that may solve the problem of unexpected renders after a \"will\" change lifecycle\
|
| 119 |
+
\ event.\r\n\r\nI was curious if that was the case, and removing \"will\" lifecycles\
|
| 120 |
+
\ is the next steps for React then how will the \"did\" lifecycles work instead?\r\
|
| 121 |
+
\n\r\nI love React and I'm just curious about the future for React as a whole.\
|
| 122 |
+
\ I'd love to tackle any bugs or feature requests when I have time. I will be\
|
| 123 |
+
\ writing clean code and create tests for new features or bugs as well."
|
| 124 |
+
inference: true
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
# SetFit with sentence-transformers/all-mpnet-base-v2
|
| 128 |
+
|
| 129 |
+
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.
|
| 130 |
+
|
| 131 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
| 132 |
+
|
| 133 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 134 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
| 135 |
+
|
| 136 |
+
## Model Details
|
| 137 |
+
|
| 138 |
+
### Model Description
|
| 139 |
+
- **Model Type:** SetFit
|
| 140 |
+
- **Sentence Transformer body:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
|
| 141 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
| 142 |
+
- **Maximum Sequence Length:** 384 tokens
|
| 143 |
+
- **Number of Classes:** 3 classes
|
| 144 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
| 145 |
+
<!-- - **Language:** Unknown -->
|
| 146 |
+
<!-- - **License:** Unknown -->
|
| 147 |
+
|
| 148 |
+
### Model Sources
|
| 149 |
+
|
| 150 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
| 151 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
| 152 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 153 |
+
|
| 154 |
+
### Model Labels
|
| 155 |
+
| Label | Examples |
|
| 156 |
+
|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 157 |
+
| 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> |
|
| 158 |
+
| 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> |
|
| 159 |
+
| 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> |
|
| 160 |
+
|
| 161 |
+
## Uses
|
| 162 |
+
|
| 163 |
+
### Direct Use for Inference
|
| 164 |
+
|
| 165 |
+
First install the SetFit library:
|
| 166 |
+
|
| 167 |
+
```bash
|
| 168 |
+
pip install setfit
|
| 169 |
+
```
|
| 170 |
+
|
| 171 |
+
Then you can load this model and run inference.
|
| 172 |
+
|
| 173 |
+
```python
|
| 174 |
+
from setfit import SetFitModel
|
| 175 |
+
|
| 176 |
+
# Download from the 🤗 Hub
|
| 177 |
+
model = SetFitModel.from_pretrained("setfit_model_id")
|
| 178 |
+
# Run inference
|
| 179 |
+
preds = model("[DevTools Bug]: Firefox and Edge show error in console about unrecognized installation on v4.20.0 ### Website or app
|
| 180 |
+
|
| 181 |
+
reactjs.org
|
| 182 |
+
|
| 183 |
+
### Repro steps
|
| 184 |
+
|
| 185 |
+
1. Install React DevTools v4.20.0 in Firefox
|
| 186 |
+
2. Load reactjs.org in Firefox
|
| 187 |
+
3. Open Firefox DevTools
|
| 188 |
+
4. Observe error in console
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
### How often does this bug happen?
|
| 194 |
+
|
| 195 |
+
Every time
|
| 196 |
+
")
|
| 197 |
+
```
|
| 198 |
+
|
| 199 |
+
<!--
|
| 200 |
+
### Downstream Use
|
| 201 |
+
|
| 202 |
+
*List how someone could finetune this model on their own dataset.*
|
| 203 |
+
-->
|
| 204 |
+
|
| 205 |
+
<!--
|
| 206 |
+
### Out-of-Scope Use
|
| 207 |
+
|
| 208 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 209 |
+
-->
|
| 210 |
+
|
| 211 |
+
<!--
|
| 212 |
+
## Bias, Risks and Limitations
|
| 213 |
+
|
| 214 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 215 |
+
-->
|
| 216 |
+
|
| 217 |
+
<!--
|
| 218 |
+
### Recommendations
|
| 219 |
+
|
| 220 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 221 |
+
-->
|
| 222 |
+
|
| 223 |
+
## Training Details
|
| 224 |
+
|
| 225 |
+
### Training Set Metrics
|
| 226 |
+
| Training set | Min | Median | Max |
|
| 227 |
+
|:-------------|:----|:-------|:-----|
|
| 228 |
+
| Word count | 11 | 190.23 | 1528 |
|
| 229 |
+
|
| 230 |
+
| Label | Training Sample Count |
|
| 231 |
+
|:---------|:----------------------|
|
| 232 |
+
| bug | 200 |
|
| 233 |
+
| feature | 200 |
|
| 234 |
+
| question | 200 |
|
| 235 |
+
|
| 236 |
+
### Training Hyperparameters
|
| 237 |
+
- batch_size: (16, 2)
|
| 238 |
+
- num_epochs: (1, 1)
|
| 239 |
+
- max_steps: -1
|
| 240 |
+
- sampling_strategy: oversampling
|
| 241 |
+
- num_iterations: 20
|
| 242 |
+
- body_learning_rate: (2e-05, 1e-05)
|
| 243 |
+
- head_learning_rate: 0.01
|
| 244 |
+
- loss: CosineSimilarityLoss
|
| 245 |
+
- distance_metric: cosine_distance
|
| 246 |
+
- margin: 0.25
|
| 247 |
+
- end_to_end: False
|
| 248 |
+
- use_amp: False
|
| 249 |
+
- warmup_proportion: 0.1
|
| 250 |
+
- seed: 42
|
| 251 |
+
- eval_max_steps: -1
|
| 252 |
+
- load_best_model_at_end: False
|
| 253 |
+
|
| 254 |
+
### Training Results
|
| 255 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
| 256 |
+
|:------:|:----:|:-------------:|:---------------:|
|
| 257 |
+
| 0.0007 | 1 | 0.2882 | - |
|
| 258 |
+
| 0.0067 | 10 | 0.1652 | - |
|
| 259 |
+
| 0.0133 | 20 | 0.2361 | - |
|
| 260 |
+
| 0.02 | 30 | 0.1886 | - |
|
| 261 |
+
| 0.0267 | 40 | 0.1705 | - |
|
| 262 |
+
| 0.0333 | 50 | 0.1868 | - |
|
| 263 |
+
| 0.04 | 60 | 0.1858 | - |
|
| 264 |
+
| 0.0467 | 70 | 0.1324 | - |
|
| 265 |
+
| 0.0533 | 80 | 0.1686 | - |
|
| 266 |
+
| 0.06 | 90 | 0.2588 | - |
|
| 267 |
+
| 0.0667 | 100 | 0.1911 | - |
|
| 268 |
+
| 0.0733 | 110 | 0.0388 | - |
|
| 269 |
+
| 0.08 | 120 | 0.0945 | - |
|
| 270 |
+
| 0.0867 | 130 | 0.1085 | - |
|
| 271 |
+
| 0.0933 | 140 | 0.1812 | - |
|
| 272 |
+
| 0.1 | 150 | 0.0593 | - |
|
| 273 |
+
| 0.1067 | 160 | 0.1169 | - |
|
| 274 |
+
| 0.1133 | 170 | 0.0294 | - |
|
| 275 |
+
| 0.12 | 180 | 0.0867 | - |
|
| 276 |
+
| 0.1267 | 190 | 0.0392 | - |
|
| 277 |
+
| 0.1333 | 200 | 0.0454 | - |
|
| 278 |
+
| 0.14 | 210 | 0.0316 | - |
|
| 279 |
+
| 0.1467 | 220 | 0.0834 | - |
|
| 280 |
+
| 0.1533 | 230 | 0.0075 | - |
|
| 281 |
+
| 0.16 | 240 | 0.0676 | - |
|
| 282 |
+
| 0.1667 | 250 | 0.0507 | - |
|
| 283 |
+
| 0.1733 | 260 | 0.0456 | - |
|
| 284 |
+
| 0.18 | 270 | 0.0174 | - |
|
| 285 |
+
| 0.1867 | 280 | 0.0093 | - |
|
| 286 |
+
| 0.1933 | 290 | 0.0029 | - |
|
| 287 |
+
| 0.2 | 300 | 0.0029 | - |
|
| 288 |
+
| 0.2067 | 310 | 0.0008 | - |
|
| 289 |
+
| 0.2133 | 320 | 0.0201 | - |
|
| 290 |
+
| 0.22 | 330 | 0.0072 | - |
|
| 291 |
+
| 0.2267 | 340 | 0.0055 | - |
|
| 292 |
+
| 0.2333 | 350 | 0.0041 | - |
|
| 293 |
+
| 0.24 | 360 | 0.0057 | - |
|
| 294 |
+
| 0.2467 | 370 | 0.0015 | - |
|
| 295 |
+
| 0.2533 | 380 | 0.0071 | - |
|
| 296 |
+
| 0.26 | 390 | 0.0017 | - |
|
| 297 |
+
| 0.2667 | 400 | 0.0283 | - |
|
| 298 |
+
| 0.2733 | 410 | 0.0093 | - |
|
| 299 |
+
| 0.28 | 420 | 0.001 | - |
|
| 300 |
+
| 0.2867 | 430 | 0.0026 | - |
|
| 301 |
+
| 0.2933 | 440 | 0.0011 | - |
|
| 302 |
+
| 0.3 | 450 | 0.0007 | - |
|
| 303 |
+
| 0.3067 | 460 | 0.0006 | - |
|
| 304 |
+
| 0.3133 | 470 | 0.0007 | - |
|
| 305 |
+
| 0.32 | 480 | 0.0009 | - |
|
| 306 |
+
| 0.3267 | 490 | 0.0002 | - |
|
| 307 |
+
| 0.3333 | 500 | 0.0015 | - |
|
| 308 |
+
| 0.34 | 510 | 0.0005 | - |
|
| 309 |
+
| 0.3467 | 520 | 0.0002 | - |
|
| 310 |
+
| 0.3533 | 530 | 0.0003 | - |
|
| 311 |
+
| 0.36 | 540 | 0.0023 | - |
|
| 312 |
+
| 0.3667 | 550 | 0.0003 | - |
|
| 313 |
+
| 0.3733 | 560 | 0.0003 | - |
|
| 314 |
+
| 0.38 | 570 | 0.0002 | - |
|
| 315 |
+
| 0.3867 | 580 | 0.0002 | - |
|
| 316 |
+
| 0.3933 | 590 | 0.0002 | - |
|
| 317 |
+
| 0.4 | 600 | 0.0002 | - |
|
| 318 |
+
| 0.4067 | 610 | 0.0004 | - |
|
| 319 |
+
| 0.4133 | 620 | 0.0004 | - |
|
| 320 |
+
| 0.42 | 630 | 0.0004 | - |
|
| 321 |
+
| 0.4267 | 640 | 0.0003 | - |
|
| 322 |
+
| 0.4333 | 650 | 0.0002 | - |
|
| 323 |
+
| 0.44 | 660 | 0.0011 | - |
|
| 324 |
+
| 0.4467 | 670 | 0.0003 | - |
|
| 325 |
+
| 0.4533 | 680 | 0.0002 | - |
|
| 326 |
+
| 0.46 | 690 | 0.0001 | - |
|
| 327 |
+
| 0.4667 | 700 | 0.0002 | - |
|
| 328 |
+
| 0.4733 | 710 | 0.0002 | - |
|
| 329 |
+
| 0.48 | 720 | 0.0002 | - |
|
| 330 |
+
| 0.4867 | 730 | 0.0002 | - |
|
| 331 |
+
| 0.4933 | 740 | 0.0001 | - |
|
| 332 |
+
| 0.5 | 750 | 0.0002 | - |
|
| 333 |
+
| 0.5067 | 760 | 0.0003 | - |
|
| 334 |
+
| 0.5133 | 770 | 0.0001 | - |
|
| 335 |
+
| 0.52 | 780 | 0.0001 | - |
|
| 336 |
+
| 0.5267 | 790 | 0.0001 | - |
|
| 337 |
+
| 0.5333 | 800 | 0.0002 | - |
|
| 338 |
+
| 0.54 | 810 | 0.0002 | - |
|
| 339 |
+
| 0.5467 | 820 | 0.0001 | - |
|
| 340 |
+
| 0.5533 | 830 | 0.0002 | - |
|
| 341 |
+
| 0.56 | 840 | 0.0001 | - |
|
| 342 |
+
| 0.5667 | 850 | 0.0001 | - |
|
| 343 |
+
| 0.5733 | 860 | 0.0001 | - |
|
| 344 |
+
| 0.58 | 870 | 0.0001 | - |
|
| 345 |
+
| 0.5867 | 880 | 0.0001 | - |
|
| 346 |
+
| 0.5933 | 890 | 0.0001 | - |
|
| 347 |
+
| 0.6 | 900 | 0.0003 | - |
|
| 348 |
+
| 0.6067 | 910 | 0.0002 | - |
|
| 349 |
+
| 0.6133 | 920 | 0.0001 | - |
|
| 350 |
+
| 0.62 | 930 | 0.0001 | - |
|
| 351 |
+
| 0.6267 | 940 | 0.0 | - |
|
| 352 |
+
| 0.6333 | 950 | 0.0001 | - |
|
| 353 |
+
| 0.64 | 960 | 0.0001 | - |
|
| 354 |
+
| 0.6467 | 970 | 0.0001 | - |
|
| 355 |
+
| 0.6533 | 980 | 0.0001 | - |
|
| 356 |
+
| 0.66 | 990 | 0.0001 | - |
|
| 357 |
+
| 0.6667 | 1000 | 0.0 | - |
|
| 358 |
+
| 0.6733 | 1010 | 0.0001 | - |
|
| 359 |
+
| 0.68 | 1020 | 0.0001 | - |
|
| 360 |
+
| 0.6867 | 1030 | 0.0001 | - |
|
| 361 |
+
| 0.6933 | 1040 | 0.0001 | - |
|
| 362 |
+
| 0.7 | 1050 | 0.0001 | - |
|
| 363 |
+
| 0.7067 | 1060 | 0.0001 | - |
|
| 364 |
+
| 0.7133 | 1070 | 0.0001 | - |
|
| 365 |
+
| 0.72 | 1080 | 0.0001 | - |
|
| 366 |
+
| 0.7267 | 1090 | 0.0 | - |
|
| 367 |
+
| 0.7333 | 1100 | 0.0001 | - |
|
| 368 |
+
| 0.74 | 1110 | 0.0 | - |
|
| 369 |
+
| 0.7467 | 1120 | 0.0001 | - |
|
| 370 |
+
| 0.7533 | 1130 | 0.0002 | - |
|
| 371 |
+
| 0.76 | 1140 | 0.0 | - |
|
| 372 |
+
| 0.7667 | 1150 | 0.0001 | - |
|
| 373 |
+
| 0.7733 | 1160 | 0.0 | - |
|
| 374 |
+
| 0.78 | 1170 | 0.0001 | - |
|
| 375 |
+
| 0.7867 | 1180 | 0.0001 | - |
|
| 376 |
+
| 0.7933 | 1190 | 0.0001 | - |
|
| 377 |
+
| 0.8 | 1200 | 0.0001 | - |
|
| 378 |
+
| 0.8067 | 1210 | 0.0001 | - |
|
| 379 |
+
| 0.8133 | 1220 | 0.0001 | - |
|
| 380 |
+
| 0.82 | 1230 | 0.0003 | - |
|
| 381 |
+
| 0.8267 | 1240 | 0.0 | - |
|
| 382 |
+
| 0.8333 | 1250 | 0.0 | - |
|
| 383 |
+
| 0.84 | 1260 | 0.0001 | - |
|
| 384 |
+
| 0.8467 | 1270 | 0.0 | - |
|
| 385 |
+
| 0.8533 | 1280 | 0.0002 | - |
|
| 386 |
+
| 0.86 | 1290 | 0.0001 | - |
|
| 387 |
+
| 0.8667 | 1300 | 0.0002 | - |
|
| 388 |
+
| 0.8733 | 1310 | 0.0001 | - |
|
| 389 |
+
| 0.88 | 1320 | 0.0001 | - |
|
| 390 |
+
| 0.8867 | 1330 | 0.0 | - |
|
| 391 |
+
| 0.8933 | 1340 | 0.0001 | - |
|
| 392 |
+
| 0.9 | 1350 | 0.0001 | - |
|
| 393 |
+
| 0.9067 | 1360 | 0.0001 | - |
|
| 394 |
+
| 0.9133 | 1370 | 0.0 | - |
|
| 395 |
+
| 0.92 | 1380 | 0.0001 | - |
|
| 396 |
+
| 0.9267 | 1390 | 0.0001 | - |
|
| 397 |
+
| 0.9333 | 1400 | 0.0 | - |
|
| 398 |
+
| 0.94 | 1410 | 0.0001 | - |
|
| 399 |
+
| 0.9467 | 1420 | 0.0001 | - |
|
| 400 |
+
| 0.9533 | 1430 | 0.0001 | - |
|
| 401 |
+
| 0.96 | 1440 | 0.0001 | - |
|
| 402 |
+
| 0.9667 | 1450 | 0.0001 | - |
|
| 403 |
+
| 0.9733 | 1460 | 0.0001 | - |
|
| 404 |
+
| 0.98 | 1470 | 0.0001 | - |
|
| 405 |
+
| 0.9867 | 1480 | 0.0 | - |
|
| 406 |
+
| 0.9933 | 1490 | 0.0001 | - |
|
| 407 |
+
| 1.0 | 1500 | 0.0001 | - |
|
| 408 |
+
|
| 409 |
+
### Framework Versions
|
| 410 |
+
- Python: 3.10.12
|
| 411 |
+
- SetFit: 1.0.3
|
| 412 |
+
- Sentence Transformers: 3.0.1
|
| 413 |
+
- Transformers: 4.39.0
|
| 414 |
+
- PyTorch: 2.3.0+cu121
|
| 415 |
+
- Datasets: 2.20.0
|
| 416 |
+
- Tokenizers: 0.15.2
|
| 417 |
+
|
| 418 |
+
## Citation
|
| 419 |
+
|
| 420 |
+
### BibTeX
|
| 421 |
+
```bibtex
|
| 422 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
| 423 |
+
doi = {10.48550/ARXIV.2209.11055},
|
| 424 |
+
url = {https://arxiv.org/abs/2209.11055},
|
| 425 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
| 426 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
| 427 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
| 428 |
+
publisher = {arXiv},
|
| 429 |
+
year = {2022},
|
| 430 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
| 431 |
+
}
|
| 432 |
+
```
|
| 433 |
+
|
| 434 |
+
<!--
|
| 435 |
+
## Glossary
|
| 436 |
+
|
| 437 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 438 |
+
-->
|
| 439 |
+
|
| 440 |
+
<!--
|
| 441 |
+
## Model Card Authors
|
| 442 |
+
|
| 443 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 444 |
+
-->
|
| 445 |
+
|
| 446 |
+
<!--
|
| 447 |
+
## Model Card Contact
|
| 448 |
+
|
| 449 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 450 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "sentence-transformers/all-mpnet-base-v2",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"MPNetModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 3072,
|
| 14 |
+
"layer_norm_eps": 1e-05,
|
| 15 |
+
"max_position_embeddings": 514,
|
| 16 |
+
"model_type": "mpnet",
|
| 17 |
+
"num_attention_heads": 12,
|
| 18 |
+
"num_hidden_layers": 12,
|
| 19 |
+
"pad_token_id": 1,
|
| 20 |
+
"relative_attention_num_buckets": 32,
|
| 21 |
+
"torch_dtype": "float32",
|
| 22 |
+
"transformers_version": "4.39.0",
|
| 23 |
+
"vocab_size": 30527
|
| 24 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "3.0.1",
|
| 4 |
+
"transformers": "4.39.0",
|
| 5 |
+
"pytorch": "2.3.0+cu121"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": null
|
| 10 |
+
}
|
config_setfit.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"normalize_embeddings": false,
|
| 3 |
+
"labels": [
|
| 4 |
+
"bug",
|
| 5 |
+
"feature",
|
| 6 |
+
"question"
|
| 7 |
+
]
|
| 8 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fda6423ae570394ff5643c64424588ec637c2dd3117bb6714fae2939fbd0571e
|
| 3 |
+
size 437967672
|
model_head.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fed2aac4db00b0be2c46d4fae1a4cfe2d753da4a9e63ce3da53730b4e18351c1
|
| 3 |
+
size 19375
|
modules.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.models.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.models.Pooling"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Normalize",
|
| 18 |
+
"type": "sentence_transformers.models.Normalize"
|
| 19 |
+
}
|
| 20 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 384,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"mask_token": {
|
| 24 |
+
"content": "<mask>",
|
| 25 |
+
"lstrip": true,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"pad_token": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "</s>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "[UNK]",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false
|
| 50 |
+
}
|
| 51 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<s>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<pad>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "<unk>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": true,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"104": {
|
| 36 |
+
"content": "[UNK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"30526": {
|
| 44 |
+
"content": "<mask>",
|
| 45 |
+
"lstrip": true,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": true
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
"bos_token": "<s>",
|
| 53 |
+
"clean_up_tokenization_spaces": true,
|
| 54 |
+
"cls_token": "<s>",
|
| 55 |
+
"do_lower_case": true,
|
| 56 |
+
"eos_token": "</s>",
|
| 57 |
+
"mask_token": "<mask>",
|
| 58 |
+
"max_length": 128,
|
| 59 |
+
"model_max_length": 384,
|
| 60 |
+
"pad_to_multiple_of": null,
|
| 61 |
+
"pad_token": "<pad>",
|
| 62 |
+
"pad_token_type_id": 0,
|
| 63 |
+
"padding_side": "right",
|
| 64 |
+
"sep_token": "</s>",
|
| 65 |
+
"stride": 0,
|
| 66 |
+
"strip_accents": null,
|
| 67 |
+
"tokenize_chinese_chars": true,
|
| 68 |
+
"tokenizer_class": "MPNetTokenizer",
|
| 69 |
+
"truncation_side": "right",
|
| 70 |
+
"truncation_strategy": "longest_first",
|
| 71 |
+
"unk_token": "[UNK]"
|
| 72 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|