"Provide a testInstance.context property to facilitate context testing \r\n\r\nDo you want to request a feature or report a bug?\r\nFeature Request\r\n\r\nWhat is the current behavior?\r\ntestInstance provides a props property, but does not provide a context property allowing for context tests.\r\n\r\nWhat is the expected behavior?\r\ntestInstance.context should return an object containing the instance's current context\r\n\r\nWhich 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"
'Cursor jumps to end of input when onChange doesn't call setState [Edit]: I'm asking for a feature.\r\n\r\nCurrent 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 formally raised as a feature request. \r\n\r\nRepro sandbox: https://codesandbox.io/s/n4k3yx47j\r\nThat same code: \r\njavascript\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'
'Allow ReactNode as a type for the child of
bug
' 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\ntext\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_'
'[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\ntext\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\ntext\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'
'[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 hierarchy inside Navbar component. \r\n4. ActiveLink component from Next was used.\r\n5. Get uncaught error Screenshot\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\ntext\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\ntext\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'
question
'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\nWhat 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\nWhat 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\nWhich 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.'
'× 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\nWhat 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'
'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'
Uses
Direct Use for Inference
First install the SetFit library:
pip install setfit
Then you can load this model and run inference.
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 appreactjs.org### Repro steps1. Install React DevTools v4.20.0 in Firefox2. Load reactjs.org in Firefox3. Open Firefox DevTools4. 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")
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
@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}
}
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.