-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path300-medium-bugs.json
More file actions
7978 lines (7978 loc) · 729 KB
/
300-medium-bugs.json
File metadata and controls
7978 lines (7978 loc) · 729 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[
{
"repo": "microsoft/vscode",
"prNumber": 218357,
"prTitle": "Fix two bugs in #214589 fixing #213535.",
"prLink": "https://github.com/microsoft/vscode/pull/218357",
"commentAuthor": "alexr00",
"commentBody": "I think now `this._commentThreadWidget` is never disposed. It can be added to the object's disposables by doing this when it's created:\n\n```ts\n\tprivate readonly _commentThreadWidget = this._register(new MutableDisposable<CommentThreadWidget<ICellRange>>);\n```",
"commentBodyIncludesCodeSnippet": true,
"commentLink": "https://github.com/microsoft/vscode/pull/218357#discussion_r1654875519",
"filePath": "src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.ts",
"diffHunk": "@@ -108,7 +107,7 @@ export class CellComments extends CellContentPart {\n \t\tif (this._commentThreadWidget.value) {\n \t\t\tif (!info) {\n \t\t\t\tthis._commentThreadDisposables.clear();\n-\t\t\t\tthis._commentThreadWidget.dispose();\n+\t\t\t\tthis._commentThreadWidget.value = undefined;",
"line": 30,
"reactionCount": 0,
"timestamp": "2024-06-26T13:43:44Z",
"isReviewComment": true,
"pullRequestReviewId": 2141902990,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "rehmsen",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:07.772Z"
},
{
"repo": "microsoft/vscode",
"prNumber": 213252,
"prTitle": "Fixes #44237: Add `columnNumber` variable",
"prLink": "https://github.com/microsoft/vscode/pull/213252",
"commentAuthor": "alexr00",
"commentBody": "Just getting the end character doesn't actually give the column if there are characters that span more than one column, like tabs.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/microsoft/vscode/pull/213252#discussion_r1696728024",
"filePath": "src/vs/workbench/api/common/extHostVariableResolverService.ts",
"diffHunk": "@@ -100,20 +107,24 @@ class ExtHostVariableResolverService extends AbstractVariableResolverService {\n \t\t\t\treturn undefined;\n \t\t\t},\n \t\t\tgetSelectedText: (): string | undefined => {\n-\t\t\t\tif (editorService) {\n-\t\t\t\t\tconst activeEditor = editorService.activeEditor();\n-\t\t\t\t\tif (activeEditor && !activeEditor.selection.isEmpty) {\n-\t\t\t\t\t\treturn activeEditor.document.getText(activeEditor.selection);\n-\t\t\t\t\t}\n+\t\t\t\tconst selection = getSelection(editorService);\n+\t\t\t\tif (selection && !selection.isEmpty) {\n+\t\t\t\t\treturn editorService?.activeEditor()?.document.getText(selection);\n+\n \t\t\t\t}\n \t\t\t\treturn undefined;\n \t\t\t},\n \t\t\tgetLineNumber: (): string | undefined => {\n-\t\t\t\tif (editorService) {\n-\t\t\t\t\tconst activeEditor = editorService.activeEditor();\n-\t\t\t\t\tif (activeEditor) {\n-\t\t\t\t\t\treturn String(activeEditor.selection.end.line + 1);\n-\t\t\t\t\t}\n+\t\t\t\tconst selection = getSelection(editorService);\n+\t\t\t\tif (selection) {\n+\t\t\t\t\treturn String(selection.end.line + 1);\n+\t\t\t\t}\n+\t\t\t\treturn undefined;\n+\t\t\t},\n+\t\t\tgetColumnNumber: (): string | undefined => {\n+\t\t\t\tconst selection = getSelection(editorService);\n+\t\t\t\tif (selection) {\n+\t\t\t\t\treturn String(selection.end.character + 1);",
"line": 45,
"reactionCount": 1,
"timestamp": "2024-07-30T10:29:01Z",
"isReviewComment": true,
"pullRequestReviewId": 2207303007,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "keithel",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:08.405Z"
},
{
"repo": "microsoft/vscode",
"prNumber": 199220,
"prTitle": "show tooltip on icon label keyboard focus ",
"prLink": "https://github.com/microsoft/vscode/pull/199220",
"commentAuthor": "Tyriar",
"commentBody": "This doesn't get disposed",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/microsoft/vscode/pull/199220#discussion_r1406722403",
"filePath": "src/vs/base/browser/ui/iconLabel/iconLabelHover.ts",
"diffHunk": "@@ -219,6 +219,21 @@ export function setupCustomHover(hoverDelegate: IHoverDelegate, htmlElement: HTM\n \t\thoverPreparation = toDispose;\n \t};\n \tconst mouseOverDomEmitter = dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_OVER, onMouseOver, true);\n+\n+\tconst onFocus = () => {\n+\t\tif (hoverPreparation) {\n+\t\t\treturn;\n+\t\t}\n+\t\tconst target: IHoverDelegateTarget = {\n+\t\t\ttargetElements: [htmlElement],\n+\t\t\tdispose: () => { }\n+\t\t};\n+\t\tconst toDispose: DisposableStore = new DisposableStore();",
"line": 13,
"reactionCount": 1,
"timestamp": "2023-11-27T20:44:06Z",
"isReviewComment": true,
"pullRequestReviewId": 1751323437,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "meganrogge",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:07.784Z"
},
{
"repo": "microsoft/vscode",
"prNumber": 179214,
"prTitle": "Suggest uses aria-describedby for description",
"prLink": "https://github.com/microsoft/vscode/pull/179214",
"commentAuthor": "jrieken",
"commentBody": " `_details.getId()` is unique only per editor instance so theoretically we have two different `ariaDescribedBy` attributes using the same id (of different dom nodes). Tho, practically this shouldn't happen because suggest needs focus but we could add an instance id to the details widget",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/microsoft/vscode/pull/179214#discussion_r1193676472",
"filePath": "src/vs/editor/contrib/suggest/browser/suggestWidget.ts",
"diffHunk": "@@ -708,6 +708,7 @@ export class SuggestWidget implements IDisposable {\n \t\tthis._pendingShowDetails.value = dom.runAtThisOrScheduleAtNextAnimationFrame(() => {\n \t\t\tthis._pendingShowDetails.clear();\n \t\t\tthis._details.show();\n+\t\t\tthis._list.ariaDescribedBy = this._details.getId();",
"line": 4,
"reactionCount": 0,
"timestamp": "2023-05-15T11:01:01Z",
"isReviewComment": true,
"pullRequestReviewId": 1426301855,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "jjaeggli",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:07.963Z"
},
{
"repo": "microsoft/vscode",
"prNumber": 191138,
"prTitle": "Re #183449. Roaming kernel history.",
"prLink": "https://github.com/microsoft/vscode/pull/191138",
"commentAuthor": "rzhao271",
"commentBody": "Should `linkedMap` get saved back to `this._mostRecentKernelsMap`?",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/microsoft/vscode/pull/191138#discussion_r1303602713",
"filePath": "src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.ts",
"diffHunk": "@@ -79,12 +82,28 @@ export class NotebookKernelHistoryService extends Disposable implements INoteboo\n \n \t\tif (notEmpty) {\n \t\t\tconst serialized = this._serialize();\n-\t\t\tthis._storageService.store(NotebookKernelHistoryService.STORAGE_KEY, JSON.stringify(serialized), StorageScope.WORKSPACE, StorageTarget.MACHINE);\n+\t\t\tthis._storageService.store(NotebookKernelHistoryService.STORAGE_KEY, JSON.stringify(serialized), StorageScope.WORKSPACE, StorageTarget.USER);\n \t\t} else {\n \t\t\tthis._storageService.remove(NotebookKernelHistoryService.STORAGE_KEY, StorageScope.WORKSPACE);\n \t\t}\n \t}\n \n+\tprivate _restoreState(): void {\n+\t\tconst serialized = this._storageService.get(NotebookKernelHistoryService.STORAGE_KEY, StorageScope.WORKSPACE);\n+\t\tif (serialized) {\n+\t\t\ttry {\n+\t\t\t\tfor (const [viewType, kernels] of JSON.parse(serialized)) {\n+\t\t\t\t\tconst linkedMap = this._mostRecentKernelsMap[viewType] ?? new LinkedMap<string, string>();\n+\t\t\t\t\tfor (const entry of kernels.entries) {\n+\t\t\t\t\t\tlinkedMap.set(entry, entry, Touch.AsOld);\n+\t\t\t\t\t}",
"line": 38,
"reactionCount": 0,
"timestamp": "2023-08-23T22:32:16Z",
"isReviewComment": true,
"pullRequestReviewId": 1592500545,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "rebornix",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:07.750Z"
},
{
"repo": "microsoft/vscode",
"prNumber": 180527,
"prTitle": "innosetup to start/stop tunnel service",
"prLink": "https://github.com/microsoft/vscode/pull/180527",
"commentAuthor": "joaomoreno",
"commentBody": "Not setting the `StartTunnelService` variable in this `else` condition.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/microsoft/vscode/pull/180527#discussion_r1193927372",
"filePath": "build/win32/code.iss",
"diffHunk": "@@ -1359,14 +1375,50 @@ begin\n end;\n \n // Updates\n-function IsBackgroundUpdate(): Boolean;\n+\n+var\n+\tStartTunnelService: Boolean;\n+\n+procedure StopTunnelServiceIfNeeded();\n+var\n+\tStopServiceResultCode: Integer;\n+\tKillServiceResultCode: Integer;\n+\tWaitCounter: Integer;\n begin\n- Result := ExpandConstant('{param:update|false}') <> 'false';\n+ \tif CheckForMutexes('{#TunnelServiceMutex}') then begin\n+\t\t// stop the tunnel service\n+\t\tLog('Stopping the tunnel service using ' + ExpandConstant('\"{app}\\bin\\{#ApplicationName}.cmd\"'));\n+\t\tShellExec('', ExpandConstant('\"{app}\\bin\\{#ApplicationName}.cmd\"'), 'tunnel service uninstall', '', SW_HIDE, ewWaitUntilTerminated, StopServiceResultCode);\n+\n+\t\t// issue 175268\n+\t\tShellExec('', ExpandConstant('\"{app}\\bin\\{#ApplicationName}.cmd\"'), 'tunnel kill', '', SW_HIDE, ewWaitUntilTerminated, KillServiceResultCode);\n+\n+\t\tLog('Stopping the tunnel service completed with result codes ' + IntToStr(StopServiceResultCode) + ' (uninstall) ' + IntToStr(KillServiceResultCode) + ' (kill) ');\n+\n+\t\tWaitCounter := 10\n+\t\twhile (WaitCounter > 0) and CheckForMutexes('{#TunnelServiceMutex}') do\n+\t\tbegin\n+\t\t\tLog('Tunnel service is still running, waiting');\n+\t\t\tSleep(500);\n+\t\t\tWaitCounter := WaitCounter - 1\n+\t\tend;\n+\t\tif (WaitCounter = 0) then\n+\t\t\tLog('Unable to stop tunnel service')\n+\t\telse",
"line": 84,
"reactionCount": 0,
"timestamp": "2023-05-15T14:29:12Z",
"isReviewComment": true,
"pullRequestReviewId": 1426693766,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "aeschli",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:10.205Z"
},
{
"repo": "microsoft/vscode",
"prNumber": 200775,
"prTitle": "fix: don't reshow remote source picker after it's been cancelled",
"prLink": "https://github.com/microsoft/vscode/pull/200775",
"commentAuthor": "TylerLeonhardt",
"commentBody": "this function has a few events that aren't getting disposed.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/microsoft/vscode/pull/200775#discussion_r1425766964",
"filePath": "extensions/git-base/src/remoteSource.ts",
"diffHunk": "@@ -70,12 +89,17 @@ class RemoteSourceProviderQuickPick {\n \t\t\tthis.quickpick!.items = [{ label: l10n.t('{0} Error: {1}', '$(error)', err.message), alwaysShow: true }];\n \t\t\tconsole.error(err);\n \t\t} finally {\n-\t\t\tthis.quickpick!.busy = false;\n+\t\t\tif (!this.isDisposed) {\n+\t\t\t\tthis.quickpick!.busy = false;\n+\t\t\t}\n \t\t}\n \t}\n \n \tasync pick(): Promise<RemoteSource | undefined> {\n \t\tawait this.query();\n+\t\tif (this.isDisposed) {\n+\t\t\treturn;\n+\t\t}\n \t\tconst result = await getQuickPickResult(this.quickpick!);",
"line": 92,
"reactionCount": 0,
"timestamp": "2023-12-13T19:00:28Z",
"isReviewComment": true,
"pullRequestReviewId": 1780299983,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "joyceerhl",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:10.060Z"
},
{
"repo": "facebook/react-native",
"prNumber": 41715,
"prTitle": "Add `NDEBUG` flag for Release builds for both architectures",
"prLink": "https://github.com/facebook/react-native/pull/41715",
"commentAuthor": "cipolleschi",
"commentBody": "The problem with the test is that, by removing these lines, the function `modify_flags_for_new_architecture` does not alter the `OTHER_CFLAGS` attribute anymore.\r\n\r\nSo, now, when we execute `modify_flags_for_new_architecture`, nothing access the `attribute[\"OTHER_CFLAGS\"]` which remains `nil`. Instead, the test that is failing expect to find the `\"$(inherithed)\"` string.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react-native/pull/41715#discussion_r1410709003",
"filePath": "packages/react-native/scripts/cocoapods/new_architecture.rb",
"diffHunk": "@@ -49,18 +49,11 @@ def self.modify_flags_for_new_architecture(installer, is_new_arch_enabled)\n unless is_new_arch_enabled\n return\n end\n- ndebug_flag = \" -DNDEBUG\"\n # Add RCT_NEW_ARCH_ENABLED to Target pods xcconfig\n installer.aggregate_targets.each do |aggregate_target|\n aggregate_target.xcconfigs.each do |config_name, config_file|\n config_file.attributes['OTHER_CPLUSPLUSFLAGS'] = @@new_arch_cpp_flags\n \n- if config_name == \"Release\"\n- config_file.attributes['OTHER_CPLUSPLUSFLAGS'] = config_file.attributes['OTHER_CPLUSPLUSFLAGS'] + ndebug_flag\n- other_cflags = config_file.attributes['OTHER_CFLAGS'] != nil ? config_file.attributes['OTHER_CFLAGS'] : \"$(inherited)\"\n- config_file.attributes['OTHER_CFLAGS'] = other_cflags + ndebug_flag\n- end",
"line": 23,
"reactionCount": 0,
"timestamp": "2023-11-30T13:55:38Z",
"isReviewComment": true,
"pullRequestReviewId": 1757525643,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "tjzel",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:09.868Z"
},
{
"repo": "facebook/react-native",
"prNumber": 41715,
"prTitle": "Add `NDEBUG` flag for Release builds for both architectures",
"prLink": "https://github.com/facebook/react-native/pull/41715",
"commentAuthor": "cipolleschi",
"commentBody": "The problem with the test is that, by removing these lines, the function `modify_flags_for_new_architecture` does not alter the `OTHER_CFLAGS` attribute anymore.\r\n\r\nSo, now, when we execute `modify_flags_for_new_architecture`, nothing access the `attribute[\"OTHER_CFLAGS\"]` which remains `nil`. Instead, the test that is failing expect to find the `\"$(inherithed)\"` string.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react-native/pull/41715#discussion_r1410709003",
"filePath": "packages/react-native/scripts/cocoapods/new_architecture.rb",
"diffHunk": "@@ -49,18 +49,11 @@ def self.modify_flags_for_new_architecture(installer, is_new_arch_enabled)\n unless is_new_arch_enabled\n return\n end\n- ndebug_flag = \" -DNDEBUG\"\n # Add RCT_NEW_ARCH_ENABLED to Target pods xcconfig\n installer.aggregate_targets.each do |aggregate_target|\n aggregate_target.xcconfigs.each do |config_name, config_file|\n config_file.attributes['OTHER_CPLUSPLUSFLAGS'] = @@new_arch_cpp_flags\n \n- if config_name == \"Release\"\n- config_file.attributes['OTHER_CPLUSPLUSFLAGS'] = config_file.attributes['OTHER_CPLUSPLUSFLAGS'] + ndebug_flag\n- other_cflags = config_file.attributes['OTHER_CFLAGS'] != nil ? config_file.attributes['OTHER_CFLAGS'] : \"$(inherited)\"\n- config_file.attributes['OTHER_CFLAGS'] = other_cflags + ndebug_flag\n- end",
"line": 23,
"reactionCount": 0,
"timestamp": "2023-11-30T13:55:38Z",
"isReviewComment": true,
"pullRequestReviewId": 1757525643,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "tjzel",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:09.868Z"
},
{
"repo": "pandas-dev/pandas",
"prNumber": 55764,
"prTitle": "REGR: fix return class in _constructor_from_mgr for simple subclasses",
"prLink": "https://github.com/pandas-dev/pandas/pull/55764",
"commentAuthor": "jorisvandenbossche",
"commentBody": "Although we have a `check_frame_type` (\"Whether to check the DataFrame class is identical.\") that defaults to True, that seems to only check that the left frame is an instance of the class of the right frame. So that won't actually catch the issue if `result` was still a subclass instead of a DataFrame.\r\n\r\nSo in addition I would add an explicit:\r\n```suggestion\r\n assert type(result) is DataFrame\r\n tm.assert_frame_equal(result, expected)\r\n```",
"commentBodyIncludesCodeSnippet": true,
"commentLink": "https://github.com/pandas-dev/pandas/pull/55764#discussion_r1386865607",
"filePath": "pandas/tests/frame/test_subclass.py",
"diffHunk": "@@ -773,3 +773,31 @@ def test_constructor_with_metadata():\n )\n subset = df[[\"A\", \"B\"]]\n assert isinstance(subset, MySubclassWithMetadata)\n+\n+\n+class SimpleDataFrameSubClass(DataFrame):\n+ \"\"\"A subclass of DataFrame that does not define a constructor.\"\"\"\n+\n+\n+class SimpleSeriesSubClass(Series):\n+ \"\"\"A subclass of Series that does not define a constructor.\"\"\"\n+\n+\n+class TestSubclassWithoutConstructor:\n+ def test_copy_df(self):\n+ expected = DataFrame({\"a\": [1, 2, 3]})\n+ result = SimpleDataFrameSubClass(expected).copy()\n+\n+ tm.assert_frame_equal(result, expected)",
"line": 22,
"reactionCount": 0,
"timestamp": "2023-11-08T16:04:51Z",
"isReviewComment": true,
"pullRequestReviewId": 1720733857,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "ivirshup",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T01:53:46.613Z"
},
{
"repo": "microsoft/vscode",
"prNumber": 179178,
"prTitle": "Add support for attachment cleaning on notebook save",
"prLink": "https://github.com/microsoft/vscode/pull/179178",
"commentAuthor": "rebornix",
"commentBody": "It seems we didn't dipose the delayer on AttachmentCleaner.dispose",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/microsoft/vscode/pull/179178#discussion_r1157637645",
"filePath": "extensions/ipynb/src/notebookAttachmentCleaner.ts",
"diffHunk": "@@ -32,15 +32,10 @@ export class AttachmentCleaner implements vscode.CodeActionProvider {\n \n \tprivate _disposables: vscode.Disposable[];\n \tprivate _imageDiagnosticCollection: vscode.DiagnosticCollection;\n+\tprivate readonly _delayer = new Delayer(750);\n+",
"line": 14,
"reactionCount": 0,
"timestamp": "2023-04-04T18:46:32Z",
"isReviewComment": true,
"pullRequestReviewId": 1371568339,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "Yoyokrazy",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:11.812Z"
},
{
"repo": "pandas-dev/pandas",
"prNumber": 54527,
"prTitle": "BUG: Special-case setting nan into integer series",
"prLink": "https://github.com/pandas-dev/pandas/pull/54527",
"commentAuthor": "jorisvandenbossche",
"commentBody": "So one thing that this doesn't yet do, is checking for the proper range for lower bitwidth integers. \r\n\r\nFor example setting [1000.0, np.nan] into a int8 Series should still raise the warning because 1000 is too big, but this helper function will now say it are only integers or NaN.\r\n",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/pandas-dev/pandas/pull/54527#discussion_r1300156497",
"filePath": "pandas/_libs/lib.pyx",
"diffHunk": "@@ -530,6 +530,22 @@ def has_infs(floating[:] arr) -> bool:\n return ret\n \n \n+@cython.boundscheck(False)\n+@cython.wraparound(False)\n+def has_only_ints_or_nan(floating[:] arr) -> bool:\n+ cdef:\n+ floating val\n+ intp_t i\n+\n+ for i in range(len(arr)):\n+ val = arr[i]\n+ if (val != val) or (val == <int64_t>val):\n+ continue\n+ else:\n+ return False\n+ return True",
"line": 17,
"reactionCount": 0,
"timestamp": "2023-08-21T14:01:09Z",
"isReviewComment": true,
"pullRequestReviewId": 1587066600,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "MarcoGorelli",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:11.995Z"
},
{
"repo": "facebook/react",
"prNumber": 15998,
"prTitle": "Slightly improve performance of hydration.",
"prLink": "https://github.com/facebook/react/pull/15998",
"commentAuthor": "sebmarkbage",
"commentBody": "This should actually have been `if (nodeType !== COMMENT_NODE) continue`. Logic is hard. :)",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/15998#discussion_r310397709",
"filePath": "packages/react-dom/src/client/ReactDOMHostConfig.js",
"diffHunk": "@@ -670,44 +670,40 @@ export function registerSuspenseInstanceRetry(\n instance._reactRetry = callback;\n }\n \n-export function getNextHydratableSibling(\n- instance: HydratableInstance,\n-): null | HydratableInstance {\n- let node = instance.nextSibling;\n+function getNextHydratable(node) {\n // Skip non-hydratable nodes.\n- while (\n- node &&\n- node.nodeType !== ELEMENT_NODE &&\n- node.nodeType !== TEXT_NODE &&\n- (!enableSuspenseServerRenderer ||\n- node.nodeType !== COMMENT_NODE ||\n- ((node: any).data !== SUSPENSE_START_DATA &&\n- (node: any).data !== SUSPENSE_PENDING_START_DATA &&\n- (node: any).data !== SUSPENSE_FALLBACK_START_DATA))\n- ) {\n- node = node.nextSibling;\n+ for (; node != null; node = node.nextSibling) {\n+ const nodeType = node.nodeType;\n+ if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n+ break;\n+ }\n+ if (enableSuspenseServerRenderer) {\n+ if (nodeType === COMMENT_NODE) {\n+ break;",
"line": 28,
"reactionCount": 1,
"timestamp": "2019-08-04T18:05:53Z",
"isReviewComment": true,
"pullRequestReviewId": 270508436,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "bmeurer",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:12.043Z"
},
{
"repo": "facebook/react",
"prNumber": 13767,
"prTitle": "Suspense settles even if timeout and ping coincide",
"prLink": "https://github.com/facebook/react/pull/13767",
"commentAuthor": "sebmarkbage",
"commentBody": ":'( We compared mode to effect? Should've been `!== NoContext`.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/13767#discussion_r222691101",
"filePath": "packages/react-reconciler/src/ReactFiberBeginWork.js",
"diffHunk": "@@ -949,27 +949,19 @@ function updatePlaceholderComponent(\n \n // Check if we already attempted to render the normal state. If we did,\n // and we timed out, render the placeholder state.\n- const alreadyCaptured =\n- (workInProgress.effectTag & DidCapture) === NoEffect;\n+ const nextDidTimeout = workInProgress.updateQueue !== null;\n \n- let nextDidTimeout;\n- if (current !== null && workInProgress.updateQueue !== null) {\n- if (enableSchedulerTracing) {\n+ if ((workInProgress.mode & StrictMode) === NoEffect) {\n+ if (enableSchedulerTracing && nextDidTimeout) {\n // Handle special case of rendering a Placeholder for a sync, suspended tree.\n // We flag this to properly trace and count interactions.\n // Otherwise interaction pending count will be decremented too many times.\n captureWillSyncRenderPlaceholder();\n }\n-\n- // We're outside strict mode. Something inside this Placeholder boundary\n- // suspended during the last commit. Switch to the placholder.\n+ // The next time we render, we try the primary children again even if no\n+ // promise has timed out.\n workInProgress.updateQueue = null;\n- nextDidTimeout = true;\n } else {\n- nextDidTimeout = !alreadyCaptured;\n- }\n-\n- if ((workInProgress.mode & StrictMode) !== NoEffect) {",
"line": 29,
"reactionCount": 0,
"timestamp": "2018-10-04T14:26:24Z",
"isReviewComment": true,
"pullRequestReviewId": 161639065,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "sophiebits",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:13.870Z"
},
{
"repo": "facebook/react",
"prNumber": 13534,
"prTitle": "Make IE 11 not complain about non-crucial style attribute hydration mismatch",
"prLink": "https://github.com/facebook/react/pull/13534",
"commentAuthor": "gaearon",
"commentBody": "This should be in try-finally. Even if test fails you want to delete it to avoid breaking other tests",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/13534#discussion_r214876413",
"filePath": "packages/react-dom/src/__tests__/ReactServerRenderingHydration.js",
"diffHunk": "@@ -258,6 +258,67 @@ describe('ReactDOMServerHydration', () => {\n expect(element.firstChild.focus).not.toHaveBeenCalled();\n });\n \n+ it('should warn when the style property differs', () => {\n+ const element = document.createElement('div');\n+ element.innerHTML = ReactDOMServer.renderToString(\n+ <div style={{textDecoration: 'none', color: 'black', height: '10px'}} />,\n+ );\n+ expect(element.firstChild.style.textDecoration).toBe('none');\n+ expect(element.firstChild.style.color).toBe('black');\n+\n+ expect(() =>\n+ ReactDOM.hydrate(\n+ <div\n+ style={{textDecoration: 'none', color: 'white', height: '10px'}}\n+ />,\n+ element,\n+ ),\n+ ).toWarnDev(\n+ 'Warning: Prop `style` did not match. Server: ' +\n+ '\"text-decoration:none;color:black;height:10px\" Client: ' +\n+ '\"text-decoration:none;color:white;height:10px\"',\n+ {withoutStack: true},\n+ );\n+ });\n+\n+ it('should not warn when the style property differs on whitespace or order in IE', () => {\n+ document.documentMode = 11;\n+ const element = document.createElement('div');\n+\n+ // Simulate IE normalizing the style attribute. IE makes it equal to\n+ // what's available under `node.style.cssText`.\n+ element.innerHTML =\n+ '<div style=\"height: 10px; color: black; text-decoration: none;\" data-reactroot=\"\"></div>';\n+\n+ ReactDOM.hydrate(\n+ <div style={{textDecoration: 'none', color: 'black', height: '10px'}} />,\n+ element,\n+ );\n+\n+ delete document.documentMode;",
"line": 41,
"reactionCount": 1,
"timestamp": "2018-09-04T11:16:51Z",
"isReviewComment": true,
"pullRequestReviewId": 152017407,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "mgol",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:13.537Z"
},
{
"repo": "facebook/react",
"prNumber": 13745,
"prTitle": "Remove useless code",
"prLink": "https://github.com/facebook/react/pull/13745",
"commentAuthor": "acdlite",
"commentBody": "If `currentFirstChild !== null && currentFirstChild.tag !== HostText`, then yes we do need to delete the remaining children.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/13745#discussion_r221139072",
"filePath": "packages/react-reconciler/src/ReactChildFiber.js",
"diffHunk": "@@ -1095,9 +1095,7 @@ function ChildReconciler(shouldTrackSideEffects) {\n existing.return = returnFiber;\n return existing;\n }\n- // The existing first child is not a text node so we need to create one\n- // and delete the existing ones.\n- deleteRemainingChildren(returnFiber, currentFirstChild);\n+ // The existing first child is not a text node so we need to create one.",
"line": 7,
"reactionCount": 0,
"timestamp": "2018-09-28T04:32:06Z",
"isReviewComment": true,
"pullRequestReviewId": 159716863,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "NE-SmallTown",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:13.748Z"
},
{
"repo": "facebook/react",
"prNumber": 11332,
"prTitle": "(WIP) Use only public api for SyntheticEvent-test.js",
"prLink": "https://github.com/facebook/react/pull/11332",
"commentAuthor": "gaearon",
"commentBody": "This is not testing anything in React. You are creating a jsdom event (equivalent to a browser event) and then check that jsdom was dispatched. Even if the entire React source code was deleted, this test would still pass.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/11332#discussion_r150282926",
"filePath": "packages/react-dom/src/events/__tests__/SyntheticEvent-test.js",
"diffHunk": "@@ -18,63 +17,122 @@ describe('SyntheticEvent', () => {\n var createEvent;\n \n beforeEach(() => {\n- // TODO: can we express this test with only public API?\n- SyntheticEvent = require('SyntheticEvent');\n React = require('react');\n ReactDOM = require('react-dom');\n ReactTestUtils = require('react-dom/test-utils');\n-\n- createEvent = function(nativeEvent) {\n- var target = require('getEventTarget')(nativeEvent);\n- return SyntheticEvent.getPooled({}, '', nativeEvent, target);\n+ createEvent = (eventInit, eventOptions) => {\n+ const defaultEventInit = {\n+ bubbles: true,\n+ cancelable: true,\n+ ...eventOptions,\n+ };\n+ var event = new Event(eventInit, defaultEventInit);\n+ event.initEvent(\n+ eventInit,\n+ defaultEventInit.bubbles,\n+ defaultEventInit.cancelable,\n+ );\n+ return event;\n };\n });\n \n it('should normalize `target` from the nativeEvent', () => {\n- var target = document.createElement('div');\n- var syntheticEvent = createEvent({srcElement: target});\n+ var click = jest.fn();\n+ var container = document.createElement('div');\n+\n+ var onClick = e => click(e.target);\n+\n+ var instance = ReactDOM.render(<div onClick={onClick} />, container);\n \n- expect(syntheticEvent.target).toBe(target);\n- expect(syntheticEvent.type).toBe(undefined);\n+ document.body.appendChild(container);\n+\n+ var event = createEvent('click');\n+\n+ instance.dispatchEvent(event);\n+ expect(click).toBeCalledWith(instance);\n+ document.body.removeChild(container);\n });\n \n it('should be able to `preventDefault`', () => {\n- var nativeEvent = {};\n- var syntheticEvent = createEvent(nativeEvent);\n+ var click = jest.fn();\n+ var container = document.createElement('div');\n+\n+ var onClick = e => {\n+ click(e.isDefaultPrevented());\n+ e.preventDefault();\n+ click(e.isDefaultPrevented());\n+ click(e.defaultPrevented);\n+ click(e.nativeEvent.returnValue);\n+ };\n \n- expect(syntheticEvent.isDefaultPrevented()).toBe(false);\n- syntheticEvent.preventDefault();\n- expect(syntheticEvent.isDefaultPrevented()).toBe(true);\n+ var instance = ReactDOM.render(<div onClick={onClick} />, container);\n \n- expect(syntheticEvent.defaultPrevented).toBe(true);\n+ document.body.appendChild(container);\n \n- expect(nativeEvent.returnValue).toBe(false);\n+ var event = createEvent('click');\n+ instance.dispatchEvent(event);\n+ expect(click.mock.calls[0][0]).toBe(false);",
"line": 83,
"reactionCount": 0,
"timestamp": "2017-11-10T16:41:24Z",
"isReviewComment": true,
"pullRequestReviewId": 75814686,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "dleitee",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:15.665Z"
},
{
"repo": "facebook/react",
"prNumber": 10707,
"prTitle": "[Gatsby Docs Update] Initial version of new sidebar",
"prLink": "https://github.com/facebook/react/pull/10707",
"commentAuthor": "bvaughn",
"commentBody": "This line causes errors for me.\r\n\r\n`yarn build` fails with:\r\n> WebpackError: Cannot read property 'items' of null\r\n\r\n`yarn dev` shows a runtime redbox with:\r\n> TypeError: Cannot read property 'items' of undefined",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/10707#discussion_r139535135",
"filePath": "www/src/components/StickyResponsiveSidebar/StickyResponsiveSidebar.js",
"diffHunk": "@@ -0,0 +1,149 @@\n+/**\n+ * Copyright 2015-present, Facebook, Inc.\n+ * All rights reserved.\n+ *\n+ * This source code is licensed under the BSD-style license found in the\n+ * LICENSE file in the root directory of this source tree. An additional grant\n+ * of patent rights can be found in the PATENTS file in the same directory.\n+ *\n+ * @emails react-core\n+*/\n+\n+'use strict';\n+\n+import Container from 'components/Container';\n+import {Component, React} from 'react';\n+import isItemActive from 'utils/isItemActive';\n+import {Sticky} from 'react-sticky';\n+import Sidebar from 'templates/components/Sidebar';\n+import {colors, media} from 'theme';\n+\n+// TODO: memoize to save doing O(n) on the active section items + subitems every\n+// time.\n+function findActiveItemTitle(location, defaultActiveSection) {\n+ const {items} = defaultActiveSection;",
"line": 24,
"reactionCount": 0,
"timestamp": "2017-09-18T20:44:35Z",
"isReviewComment": true,
"pullRequestReviewId": 63481907,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "flarnie",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:15.584Z"
},
{
"repo": "facebook/react",
"prNumber": 9293,
"prTitle": "WIP - convert public React core properties to strings so uglify/gcc can mangle",
"prLink": "https://github.com/facebook/react/pull/9293",
"commentAuthor": "simonkberg",
"commentBody": "This will throw in environments without Symbol",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/9293#discussion_r113985382",
"filePath": "src/shared/utils/ReactElementSymbol.js",
"diffHunk": "@@ -14,9 +14,9 @@\n \n // The Symbol used to tag the ReactElement type. If there is no native Symbol\n // nor polyfill, then a plain number is used for performance.\n-var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n- Symbol.for &&\n- Symbol.for('react.element')) ||\n+const SymbolFor = Symbol.for;",
"line": 7,
"reactionCount": 0,
"timestamp": "2017-04-28T17:53:36Z",
"isReviewComment": true,
"pullRequestReviewId": 35422260,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "trueadm",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:15.530Z"
},
{
"repo": "facebook/react",
"prNumber": 7800,
"prTitle": "Fix for #7767",
"prLink": "https://github.com/facebook/react/pull/7800",
"commentAuthor": "jimfb",
"commentBody": "The fact that a component is disabled does not mean it is uncontrolled. This logic is not correct. You could imagine a controlled component becoming temporarily disabled if some background action is being performed; that doesn't mean the component becomes uncontrolled at that point.\n",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/7800#discussion_r80352945",
"filePath": "src/renderers/dom/client/wrappers/ReactDOMInput.js",
"diffHunk": "@@ -34,8 +34,12 @@ function forceUpdateIfMounted() {\n }\n \n function isControlled(props) {\n- var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n- return usesChecked ? props.checked != null : props.value != null;\n+ if (props.disabled) return false;",
"line": 6,
"reactionCount": 0,
"timestamp": "2016-09-24T04:44:05Z",
"isReviewComment": true,
"pullRequestReviewId": 1428253,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "troydemonbreun",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:15.768Z"
},
{
"repo": "facebook/react",
"prNumber": 6255,
"prTitle": "Fix #6153: Warn for PropTypes that don't exist but do exist with a di…",
"prLink": "https://github.com/facebook/react/pull/6255",
"commentAuthor": "gaearon",
"commentBody": "Please don’t use `for of` syntax as it relies on ES6 `Symbol` being available, and we don’t polyfill it.\n",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/6255#discussion_r68508373",
"filePath": "src/isomorphic/devtools/ReactMiscapitalizedPropNameWarningDevTool.js",
"diffHunk": "@@ -0,0 +1,61 @@\n+/**\n+ * Copyright 2016-present, Facebook, Inc.\n+ * All rights reserved.\n+ *\n+ * This source code is licensed under the BSD-style license found in the\n+ * LICENSE file in the root directory of this source tree. An additional grant\n+ * of patent rights can be found in the PATENTS file in the same directory.\n+ *\n+ * @providesModule ReactMiscapitalizedPropNameWarningDevTool\n+ */\n+\n+'use strict';\n+\n+var warning = require('warning');\n+\n+if (__DEV__) {\n+\n+ var warnedProperties = {};\n+\n+ var warnMiscapitalizedPropName = function(\n+ componentName,\n+ allPropNames,\n+ missingPropName\n+ ) {\n+ var missingPropNameLowerCase = missingPropName.toLowerCase();\n+ var incorrectlyCapitalizedPropName;\n+\n+ for (var propName of allPropNames) {",
"line": 28,
"reactionCount": 0,
"timestamp": "2016-06-26T19:43:27Z",
"isReviewComment": true,
"pullRequestReviewId": null,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "ghost",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:17.400Z"
},
{
"repo": "facebook/react",
"prNumber": 6158,
"prTitle": "Warn if the included mixin is undefined",
"prLink": "https://github.com/facebook/react/pull/6158",
"commentAuthor": "gaearon",
"commentBody": "As far as I can see, this will print `Expected object but got object.` for arrays.\n",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/facebook/react/pull/6158#discussion_r59251936",
"filePath": "src/isomorphic/classic/class/ReactClass.js",
"diffHunk": "@@ -437,6 +437,21 @@ function validateMethodOverride(isAlreadyDefined, name) {\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n+ if (__DEV__) {\n+ var typeofSpec = typeof spec;\n+ var isMixinValid = typeofSpec === 'object' && spec !== null;\n+\n+ warning(\n+ isMixinValid,\n+ '%s: You\\'re attempting to include a mixin that is either null ' +\n+ 'or not an object. Check the mixins included by the component, ' +\n+ 'as well as any mixins they include themselves. ' +\n+ 'Expected object but got %s.',",
"line": 13,
"reactionCount": 0,
"timestamp": "2016-04-11T18:05:06Z",
"isReviewComment": true,
"pullRequestReviewId": null,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "swaroopsm",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:17.398Z"
},
{
"repo": "facebook/react",
"prNumber": 725,
"prTitle": "Add invariant to check getInitialState return value. Fixes #397",
"prLink": "https://github.com/facebook/react/pull/725",
"commentAuthor": "vjeux",
"commentBody": "`undefined` should also be valid. Otherwise a function like this would fatal:\n\n```\ngetInitialState: function() {\n if (something) {\n return {some: 'abc'};\n }\n}\n```\n",
"commentBodyIncludesCodeSnippet": true,
"commentLink": "https://github.com/facebook/react/pull/725#discussion_r8573802",
"filePath": "src/core/ReactCompositeComponent.js",
"diffHunk": "@@ -686,6 +686,12 @@ var ReactCompositeComponentMixin = {\n }\n \n this.state = this.getInitialState ? this.getInitialState() : null;\n+ invariant(\n+ typeof this.state === 'object' && !Array.isArray(this.state),",
"line": 5,
"reactionCount": 0,
"timestamp": "2013-12-27T22:38:47Z",
"isReviewComment": true,
"pullRequestReviewId": null,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "cpojer",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:19.830Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 62409,
"prTitle": "Register complex dtypes for TruncateDiv Op",
"prLink": "https://github.com/tensorflow/tensorflow/pull/62409",
"commentAuthor": "cantonios",
"commentBody": "Complex types are _not_ supported. This breaks a bunch of stuff, and as you can see from the functor, is only supported by _real_ values. Floor/truncation doesn't make much sense for complex inputs.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/62409#discussion_r1442110876",
"filePath": "tensorflow/core/kernels/cwise_op_div.cc",
"diffHunk": "@@ -23,8 +23,8 @@ REGISTER8(BinaryOp, CPU, \"Div\", functor::safe_div, uint8, uint16, uint32,\n uint64, int8, int16, int32, int64_t);\n REGISTER8(BinaryOp, CPU, \"TruncateDiv\", functor::safe_div, uint8, uint16,\n uint32, uint64, int8, int16, int32, int64_t);\n-REGISTER4(BinaryOp, CPU, \"TruncateDiv\", functor::truncate_div_real, Eigen::half,\n- bfloat16, float, double);\n+REGISTER6(BinaryOp, CPU, \"TruncateDiv\", functor::truncate_div_real, Eigen::half,\n+ bfloat16, float, double, complex64, complex128);",
"line": 7,
"reactionCount": 0,
"timestamp": "2024-01-04T18:21:45Z",
"isReviewComment": true,
"pullRequestReviewId": 1804746910,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "SuryanarayanaY",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:24.390Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 59755,
"prTitle": "Update image_ops_impl.convert_image_dtype.py",
"prLink": "https://github.com/tensorflow/tensorflow/pull/59755",
"commentAuthor": "cantonios",
"commentBody": "This is not correct.\r\n\r\nThe case covered here is the input being floating-point and the output being an integer type.\r\n\r\nLet's say you start with an image in the range [0, 1.0], then you are converting to uint8. You want 1.0 to map to 255. That's why the scale factor is by 255.5 - so that 255.5 * 1.0, rounded, is 255.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/59755#discussion_r1113396504",
"filePath": "tensorflow/python/ops/image_ops_impl.py",
"diffHunk": "@@ -2531,7 +2531,7 @@ def convert_image_dtype(image, dtype, saturate=False, name=None):\n return math_ops.multiply(cast, scale, name=name)\n else:\n # Converting from float: first scale, then cast\n- scale = dtype.max + 0.5 # avoid rounding problems in the cast\n+ scale = 1./(dtype.max + 0.5) # avoid rounding problems in the cast",
"line": 5,
"reactionCount": 0,
"timestamp": "2023-02-21T17:52:28Z",
"isReviewComment": true,
"pullRequestReviewId": 1307917624,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "SuryanarayanaY",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:24.413Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 59266,
"prTitle": "Correct index check for Tensor::SubSlice() method accordingly to documentation and SubBuffer() checks",
"prLink": "https://github.com/tensorflow/tensorflow/pull/59266",
"commentAuthor": "cantonios",
"commentBody": "The case of `dim0_size == 0` but `index > 0` should fail. It looks like it returns an invalid tensor. \r\n Consider a tensor with shape `[0, 5, 5, 5]`. This is empty and the buffer pointer would be `nullptr`. This code as written will return a tensor of size `[5, 5, 5]` but a `nullptr` buffer.\r\n\r\nIn fact, whenever `index >= dim0_size`, we would get an invalid tensor, even if `dim0_size > 0`. It's an invalid index, so we can't chip away a subtensor.\r\n\r\nThe original check should be `CHECK_LT(index, dim0_size)`.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/59266#discussion_r1072424857",
"filePath": "tensorflow/core/framework/tensor.cc",
"diffHunk": "@@ -1016,13 +1016,13 @@ Tensor Tensor::SubSlice(int64_t index) const {\n CHECK_GE(dims(), 1); // Crash ok.\n CHECK_LE(0, index); // Crash ok.\n int64_t dim0_size = shape_.dim_size(0);\n- CHECK_LE(index, dim0_size); // Crash ok.\n Tensor ret;\n ret.shape_ = shape_;\n ret.shape_.RemoveDim(0);\n ret.set_dtype(dtype());\n ret.buf_ = nullptr;\n if (dim0_size > 0) {\n+ CHECK_LT(index, dim0_size); // Crash ok.",
"line": 11,
"reactionCount": 0,
"timestamp": "2023-01-17T16:23:49Z",
"isReviewComment": true,
"pullRequestReviewId": 1251918158,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "avoskoboinyk-lohika",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:24.216Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 53627,
"prTitle": "Xla const output cache on GPU ",
"prLink": "https://github.com/tensorflow/tensorflow/pull/53627",
"commentAuthor": "akuegel",
"commentBody": "The race seems to be between this line and the assignment of cache_ in rm_->LookupOrCreate.\r\nSo I think you need a mutex lock here around this block (and I guess everywhere where cache_ is accessed).",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/53627#discussion_r800513010",
"filePath": "tensorflow/compiler/jit/kernels/xla_ops.cc",
"diffHunk": "@@ -562,12 +605,26 @@ void XlaRunOp::Compute(OpKernelContext* ctx) {\n ctx, *closure.compilation_result(), closure.num_constant_args());\n OP_REQUIRES_OK(ctx, variable_infos.status());\n OP_REQUIRES_OK(ctx, LockVariables(absl::MakeSpan(*variable_infos)));\n+\n+ if (cache_ == nullptr) {",
"line": 79,
"reactionCount": 0,
"timestamp": "2022-02-07T10:27:35Z",
"isReviewComment": true,
"pullRequestReviewId": 874467703,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "zhaozheng09",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:26.774Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 43900,
"prTitle": "[TF-TRT] Cast now supports more conversions if TRT >= 7.0.0.11",
"prLink": "https://github.com/tensorflow/tensorflow/pull/43900",
"commentAuthor": "bixia1",
"commentBody": "I am getting this error with I run and the tests with --test_env=TF2_BEHAVIOR=1:\r\n\r\n\r\n File \"/build/work/fa3a0e10bc497b211fc2e1e6537b38cd4e12/google3/runfiles/google3/third_party/tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py\", line 895, in _VerifyGraphDefV2\r\n expected_engines = set(expected_engines.keys())\r\nAttributeError: 'list' object has no attribute 'keys'",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/43900#discussion_r535770905",
"filePath": "tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py",
"diffHunk": "@@ -879,12 +879,31 @@ def _VerifyGraphDefV2(self, run_params, original_gdef, gdef_to_verify,\n # 2.0, but we still make sure that the converted ops are gone from the\n # graph.\n unexpected_names = set(nest.flatten(expected_engines.values()))\n- self.assertEmpty(\n- [name for name in unexpected_names if name in all_op_names])\n- expected_engines = set(expected_engines.keys())\n-\n- self.assertEqual(set(expected_engines), trt_op_names)\n-\n+ try:\n+ self.assertEmpty(\n+ [name for name in unexpected_names if name in all_op_names])\n+ except AssertionError:\n+ raise RuntimeError(\"\"\"Unexpected TF-TRT Engines returned:,\n+All Op Names: {},\n+TRT Op Names: {},\n+Expected: {}\"\"\".format(\n+ all_op_names,\n+ trt_op_names,\n+ unexpected_names,\n+ ))\n+\n+ expected_engines = set(expected_engines.keys())\n+ try:\n+ self.assertEqual(expected_engines, trt_op_names)\n+ except AssertionError:\n+ raise RuntimeError(\"\"\"Unexpected TF-TRT Engines returned:,\n+ All Op Names: {},\n+ TRT Op Names: {},\n+ Expected Engines: {}\"\"\".format(\n+ all_op_names,\n+ trt_op_names,\n+ expected_engines,",
"line": 34,
"reactionCount": 1,
"timestamp": "2020-12-04T01:35:09Z",
"isReviewComment": true,
"pullRequestReviewId": 544595052,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "DEKHTIARJonathan",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:28.446Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 37668,
"prTitle": "TFLu: replace old cmsis scratch buffer",
"prLink": "https://github.com/tensorflow/tensorflow/pull/37668",
"commentAuthor": "wangtz",
"commentBody": "That's a good point. I should check if buf_size is 0.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/37668#discussion_r398600460",
"filePath": "tensorflow/lite/micro/kernels/cmsis-nn/conv.cc",
"diffHunk": "@@ -111,12 +110,59 @@ TfLiteStatus CalculateOpData(TfLiteContext* context, TfLiteNode* node,\n }\n \n void* Init(TfLiteContext* context, const char* buffer, size_t length) {\n- return nullptr;\n+ void* raw;\n+ context->AllocatePersistentBuffer(\n+ context, sizeof(int), &raw);\n+ return raw;\n }\n \n void Free(TfLiteContext* context, void* buffer) {}\n \n TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {\n+#if defined(__ARM_FEATURE_DSP)\n+ OpData data;\n+ int32_t buf_size;\n+\n+ auto* params = reinterpret_cast<TfLiteConvParams*>(node->builtin_data);\n+\n+ const TfLiteTensor* input = GetInput(context, node, kInputTensor);\n+ const TfLiteTensor* filter = GetInput(context, node, kFilterTensor);\n+ const TfLiteTensor* output = GetOutput(context, node, kOutputTensor);\n+\n+ RuntimeShape input_shape = GetTensorShape(input);\n+\n+ const int input_depth = input_shape.Dims(3);\n+ const int input_width = input->dims->data[2];\n+ const int input_height = input->dims->data[1];\n+ const int filter_width = filter->dims->data[2];\n+ const int filter_height = filter->dims->data[1];\n+ const int output_width = output->dims->data[2];\n+ const int output_height = output->dims->data[1];\n+\n+ int* buffer_idx = reinterpret_cast<int*>(node->user_data);\n+\n+ TF_LITE_ENSURE_STATUS(CalculateOpData(\n+ context, node, params, input_width, input_height, filter_width,\n+ filter_height, output_width, output_height, input->type, &data));\n+\n+ if (data.padding.width == 0 &&\n+ data.padding.height == 0 && (input_depth % 4 == 0) &&\n+ params->stride_width == 1 &&\n+ params->stride_height == 1 && filter_width == 1 && filter_height == 1) {\n+ buf_size = arm_convolve_1x1_s8_fast_get_buffer_size(input_depth);\n+ }\n+ else\n+ {\n+ buf_size = arm_convolve_s8_get_buffer_size(input_depth, filter_width, filter_height);\n+ }\n+\n+ node->user_data = buffer_idx;\n+ if (buf_size > 0) {",
"line": 60,
"reactionCount": 0,
"timestamp": "2020-03-26T14:08:14Z",
"isReviewComment": true,
"pullRequestReviewId": 382043640,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "mansnils",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:28.697Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 37020,
"prTitle": "Modified metric_utils.py to fix conflicts with floatx and float32",
"prLink": "https://github.com/tensorflow/tensorflow/pull/37020",
"commentAuthor": "MarkDaoust",
"commentBody": "This doesn't look right.\r\n\r\n`logical_and` only works if both inputs are dtype `bool`, it returns tensor with dtype `bool`. so here you're casting a bool to type bool.\r\n\r\nIt needs to be cast to a floating type so the rest of the function works (`*` and `reduce_sum` don't work on bool).",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/37020#discussion_r383401165",
"filePath": "tensorflow/python/keras/utils/metrics_utils.py",
"diffHunk": "@@ -424,7 +424,7 @@ def update_confusion_matrix_variables(variables_to_update,\n \n def weighted_assign_add(label, pred, weights, var):\n label_and_pred = math_ops.cast(\n- math_ops.logical_and(label, pred), dtype=dtypes.float32)\n+ math_ops.logical_and(label, pred), dtype=pred.dtype)",
"line": 5,
"reactionCount": 0,
"timestamp": "2020-02-24T17:18:40Z",
"isReviewComment": true,
"pullRequestReviewId": 363561361,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "ashutosh1919",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:32.678Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 33368,
"prTitle": "Fix missing activation methods",
"prLink": "https://github.com/tensorflow/tensorflow/pull/33368",
"commentAuthor": "lrdxgm",
"commentBody": "Note that in C++ (std::)signbit returns true if the parameter is *negative*, false if it's positive, so this is a totally useless activation function.\r\n\r\nIt's even worse in C: it returns *any* nonzero value if the value is negative. It can be 1, 255, -128, etc..",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/33368#discussion_r349359159",
"filePath": "tensorflow/lite/experimental/micro/kernels/activation_utils.h",
"diffHunk": "@@ -33,9 +33,18 @@ inline float ActivationValFloat(TfLiteFusedActivation act, float a) {\n return a;\n case kTfLiteActRelu:\n return a < 0.f ? 0.f : a;\n+ case kTfLiteActRelu1:\n+ return a < 0.f ? 0.f : ((a > 1.f) ? 1.f : a);\n+ case kTfLiteActRelu6:\n+ return a < 0.f ? 0.f : ((a > 6.f) ? 6.f : a);\n+ case kTfLiteActTanh:\n+ return (expf(a) - expf(-a)) / (expf(a) + expf(-a));\n+ case kTfLiteActSignBit:\n+ return signbit(a);",
"line": 11,
"reactionCount": 0,
"timestamp": "2019-11-21T22:53:57Z",
"isReviewComment": true,
"pullRequestReviewId": 321241925,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "kwagyeman",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:34.388Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 34537,
"prTitle": "[tflite] add int8 input/output to label_image",
"prLink": "https://github.com/tensorflow/tensorflow/pull/34537",
"commentAuthor": "srjoglekar246",
"commentBody": "The issue is with these lines. The input actually *is* uint8 (and not float). Line 31 initializes the `Settings` object to its default values, which assumes `TfLiteType input_type = kTfLiteFloat32;`. So these values `0x15` & `0x11` should not be changed, we should rather set `s.input_type = kTfLiteUInt8` (after importing `tensorflow/lite/c/common.h`).",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/34537#discussion_r390446018",
"filePath": "tensorflow/lite/examples/label_image/label_image_test.cc",
"diffHunk": "@@ -37,15 +37,15 @@ TEST(LabelImageTest, GraceHopper) {\n \n std::vector<uint8_t> output(606 * 517 * 3);\n resize<uint8_t>(output.data(), input.data(), 606, 517, 3, 214, 214, 3, &s);\n- ASSERT_EQ(output[0], 0x15);\n- ASSERT_EQ(output[214 * 214 * 3 - 1], 0x11);\n+ ASSERT_EQ(output[0], 0x0);\n+ ASSERT_EQ(output[214 * 214 * 3 - 1], 0x0);",
"line": 7,
"reactionCount": 0,
"timestamp": "2020-03-10T16:28:48Z",
"isReviewComment": true,
"pullRequestReviewId": 372119327,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "freedomtan",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:34.215Z"
},
{
"repo": "tensorflow/tensorflow",
"prNumber": 28918,
"prTitle": "fix huber loss function for when delta = inf",
"prLink": "https://github.com/tensorflow/tensorflow/pull/28918",
"commentAuthor": "alextp",
"commentBody": "This uses the result of a tensor operation as a python boolean, which is only supported inside tf.function / autograph.\r\n\r\nAs it is right now I believe this code always raises an exception, so please add unit tests to convince yourself the implementation is correct.\r\n\r\nAlso, why not just modify the huber loss kernel to do the right thing in the presence of infinity there?",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/tensorflow/tensorflow/pull/28918#discussion_r291272863",
"filePath": "tensorflow/python/ops/losses/losses_impl.py",
"diffHunk": "@@ -419,6 +420,9 @@ def huber_loss(labels, predictions, weights=1.0, delta=1.0, scope=None,\n raise ValueError(\"predictions must not be None.\")\n with ops.name_scope(scope, \"huber_loss\",\n (predictions, labels, weights)) as scope:\n+ if not gen_math_ops.is_finite(delta):",
"line": 12,
"reactionCount": 0,
"timestamp": "2019-06-06T16:40:34Z",
"isReviewComment": true,
"pullRequestReviewId": 246687004,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "cfifty",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:36.268Z"
},
{
"repo": "pytorch/pytorch",
"prNumber": 142476,
"prTitle": "Fix timeout check workflow lint job",
"prLink": "https://github.com/pytorch/pytorch/pull/142476",
"commentAuthor": "ZainRizvi",
"commentBody": "Isn't this only setting they PYTHONPATH env var, resulting in no test files being executed or discovered?",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/pytorch/pytorch/pull/142476#discussion_r1878866746",
"filePath": ".github/workflows/lint.yml",
"diffHunk": "@@ -207,8 +207,8 @@ jobs:\n conda activate \"${CONDA_ENV}\"\n \n # Test tools\n- python3 -m unittest discover -vs tools/test -p 'test_*.py'\n- python3 -m unittest discover -vs .github/scripts -p 'test_*.py'\n+ PYTHONPATH=$(pwd) pytest tools/test/test_*.py\n+ PYTHONPATH=$(pwd) pytest .github/scripts/test_*.py",
"line": 7,
"reactionCount": 0,
"timestamp": "2024-12-10T21:15:37Z",
"isReviewComment": true,
"pullRequestReviewId": 2493622367,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "huydhn",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T01:51:17.420Z"
},
{
"repo": "pytorch/pytorch",
"prNumber": 141371,
"prTitle": "ir.ExternKernel: correctly handle kwarg default arguments",
"prLink": "https://github.com/pytorch/pytorch/pull/141371",
"commentAuthor": "desertfire",
"commentBody": "I don't see an early return or an else-branch. Won't this cause shard 2 to run both opinfo tests and all other tests?",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/pytorch/pytorch/pull/141371#discussion_r1901011712",
"filePath": ".ci/pytorch/test.sh",
"diffHunk": "@@ -382,15 +382,28 @@ test_inductor_aoti() {\n CPP_TESTS_DIR=\"${BUILD_BIN_DIR}\" LD_LIBRARY_PATH=\"${TORCH_LIB_DIR}\" python test/run_test.py --cpp --verbose -i cpp/test_aoti_abi_check cpp/test_aoti_inference\n }\n \n-test_inductor_cpp_wrapper() {\n+test_inductor_cpp_wrapper_shard() {\n+ if [[ -z \"$NUM_TEST_SHARDS\" ]]; then\n+ echo \"NUM_TEST_SHARDS must be defined to run a Python test shard\"\n+ exit 1\n+ fi\n+\n export TORCHINDUCTOR_CPP_WRAPPER=1\n TEST_REPORTS_DIR=$(pwd)/test/test-reports\n mkdir -p \"$TEST_REPORTS_DIR\"\n \n- # Run certain inductor unit tests with cpp wrapper. In the end state, we should be able to run all the inductor\n- # unit tests with cpp wrapper.\n- python test/run_test.py --include inductor/test_torchinductor.py --verbose\n+ if [[ \"$1\" -eq \"2\" ]]; then",
"line": 18,
"reactionCount": 0,
"timestamp": "2025-01-02T15:50:07Z",
"isReviewComment": true,
"pullRequestReviewId": 2527802630,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "benjaminglass1",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:38.194Z"
},
{
"repo": "pytorch/pytorch",
"prNumber": 139833,
"prTitle": "Add type annotations to Configs",
"prLink": "https://github.com/pytorch/pytorch/pull/139833",
"commentAuthor": "jansel",
"commentBody": "This change causes many `options=...` passed to `torch.compile` to be ignored (setting self.config should go outside the `if`). ",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/pytorch/pytorch/pull/139833#discussion_r1920902710",
"filePath": "torch/__init__.py",
"diffHunk": "@@ -2280,13 +2281,18 @@ def apply_options(self, options: _Optional[_Dict[str, _Any]]):\n raise RuntimeError(\n f\"Unexpected optimization option {key}, known options are {list(current_config.keys())}\"\n )\n- if type(val) is not type(current_config[attr_name]):\n- val_type_str = type(val).__name__\n- expected_type_str = type(current_config[attr_name]).__name__\n- raise RuntimeError(\n- f\"Unexpected type of attr {key}, got {val_type_str} should be {expected_type_str}\"\n- )\n- self.config[attr_name] = val\n+ attr_type = config.get_type(attr_name) # type: ignore[attr-defined]\n+ # Subscriptable generic types don't support isinstance so skip the type\n+ # check. There doesn't seem to be a good way of checking membership without\n+ # 3rd party libraries.\n+ if _get_origin(attr_type) is None:\n+ if not isinstance(val, attr_type):\n+ val_type_str = type(val).__name__\n+ expected_type_str = type(current_config[attr_name]).__name__\n+ raise RuntimeError(\n+ f\"Unexpected type of attr {key}, got {val_type_str} should be {expected_type_str}\"\n+ )\n+ self.config[attr_name] = val",
"line": 30,
"reactionCount": 0,
"timestamp": "2025-01-18T00:34:13Z",
"isReviewComment": true,
"pullRequestReviewId": 2560202594,
"LLMReviewed": true,
"LLMReviewPassed": true,
"prAuthor": "exclamaforte",
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:38.145Z"
},
{
"repo": "pytorch/pytorch",
"prNumber": 136792,
"prTitle": "FlexAttention support for NJT",
"prAuthor": "jbschlosser",
"prLink": "https://github.com/pytorch/pytorch/pull/136792",
"commentAuthor": "jataylo",
"commentBody": "Why is this disabled for AMD/ROCm?",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/pytorch/pytorch/pull/136792#discussion_r1827667937",
"filePath": "torch/testing/_internal/common_device_type.py",
"diffHunk": "@@ -1950,3 +1950,12 @@ def skipPRIVATEUSE1(fn):\n # This should probably enumerate all available device type test base classes.\n def get_all_device_types() -> List[str]:\n return [\"cpu\"] if not torch.cuda.is_available() else [\"cpu\", \"cuda\"]\n+\n+\n+flex_attention_supported_platform = unittest.skipUnless(\n+ torch.cuda.is_available()\n+ and torch.version.hip is None",
"line": 8,
"reactionCount": 0,
"reactions": [],
"timestamp": "2024-11-04T12:39:33Z",
"isReviewComment": true,
"pullRequestReviewId": 2412959035,
"LLMReviewed": true,
"LLMReviewPassed": true,
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:40.541Z"
},
{
"repo": "pytorch/pytorch",
"prNumber": 134726,
"prTitle": "Fix unintentional deduplication of returned tensors",
"prAuthor": "benjaminglass1",
"prLink": "https://github.com/pytorch/pytorch/pull/134726",
"commentAuthor": "zou3519",
"commentBody": "What happens if we have:\r\n```py\r\ndef fn(val: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:\r\n x = val * 2\r\n y = val * 2\r\n return x[0], y[0]\r\n```\r\nI'm worried that CSE will change the graph into:\r\n```py\r\ndef fn(val: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:\r\n x = val * 2\r\n return x[0], x[0]\r\n```\r\nwhich then has the same problem",
"commentBodyIncludesCodeSnippet": true,
"commentLink": "https://github.com/pytorch/pytorch/pull/134726#discussion_r1738774371",
"filePath": "test/dynamo/test_repros.py",
"diffHunk": "@@ -5752,6 +5752,42 @@ def fn(x):\n \n fn(torch.randn(4))\n \n+ # https://github.com/pytorch/pytorch/issues/88813\n+ def test_return_value_duplication_grad(self) -> None:\n+ def fn(val: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:\n+ return val * 2, val * 2",
"line": 7,
"reactionCount": 0,
"reactions": [],
"timestamp": "2024-08-30T14:22:28Z",
"isReviewComment": true,
"pullRequestReviewId": 2272514183,
"LLMReviewed": true,
"LLMReviewPassed": true,
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:39.972Z"
},
{
"repo": "kubernetes/kubernetes",
"prNumber": 128272,
"prTitle": "[FG:InPlacePodVerticalScaling] Implement resize for sidecar containers",
"prAuthor": "vivzbansal",
"prLink": "https://github.com/kubernetes/kubernetes/pull/128272",
"commentAuthor": "tallclair",
"commentBody": "make sure `AllocatedResources` is non-nil",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/kubernetes/kubernetes/pull/128272#discussion_r1811583699",
"filePath": "pkg/api/v1/resource/helpers.go",
"diffHunk": "@@ -129,6 +139,17 @@ func PodRequests(pod *v1.Pod, opts PodResourcesOptions) v1.ResourceList {\n \treturn reqs\n }\n \n+// setContainerReqs will return a copy of the container requests based on if resizing is feasible or not.\n+func setContainerReqs(pod *v1.Pod, container v1.Container, cs *v1.ContainerStatus) v1.ResourceList {\n+\tcp := v1.ResourceList{}\n+\tif pod.Status.Resize == v1.PodResizeStatusInfeasible {\n+\t\tcp = cs.AllocatedResources.DeepCopy()",
"line": 75,
"reactionCount": 0,
"reactions": [],
"timestamp": "2024-10-23T00:07:28Z",
"isReviewComment": true,
"pullRequestReviewId": 2386591984,
"LLMReviewed": true,
"LLMReviewPassed": true,
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:40.676Z"
},
{
"repo": "kubernetes/kubernetes",
"prNumber": 127298,
"prTitle": "simplify code to avoid unnecessary logic checks",
"prAuthor": "mmungdong",
"prLink": "https://github.com/kubernetes/kubernetes/pull/127298",
"commentAuthor": "xuzhenglun",
"commentBody": "IMHO, this sliding check is necessary. considering when `immediate=true`:\r\n1. if `sliding` is disabled, the timer should start before `condition func` run, just like L44 does.\r\n2. if `sliding` is enabled, the timer should start after `condition func` runs, just like L60 does.",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/kubernetes/kubernetes/pull/127298#discussion_r1754929520",
"filePath": "staging/src/k8s.io/apimachinery/pkg/util/wait/loop.go",
"diffHunk": "@@ -37,13 +36,9 @@ import (\n func loopConditionUntilContext(ctx context.Context, t Timer, immediate, sliding bool, condition ConditionWithContextFunc) error {\n \tdefer t.Stop()\n \n-\tvar timeCh <-chan time.Time\n+\ttimeCh := t.C()\n \tdoneCh := ctx.Done()",
"line": 14,
"reactionCount": 0,
"reactions": [],
"timestamp": "2024-09-11T15:19:29Z",
"isReviewComment": true,
"pullRequestReviewId": 2297557318,
"LLMReviewed": true,
"LLMReviewPassed": true,
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:42.385Z"
},
{
"repo": "kubernetes/kubernetes",
"prNumber": 127035,
"prTitle": "Rename TypedNewDelayingQueue to NewTypedDelayingQueue",
"prAuthor": "alvaroaleman",
"prLink": "https://github.com/kubernetes/kubernetes/pull/127035",
"commentAuthor": "liggitt",
"commentBody": "this isn't signature compatible, right? it takes an arg and the old one does not... won't this make it hard to straddle / adopt new versions?",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/kubernetes/kubernetes/pull/127035#discussion_r1781399854",
"filePath": "staging/src/k8s.io/client-go/util/workqueue/delaying_queue.go",
"diffHunk": "@@ -64,26 +64,33 @@ type TypedDelayingQueueConfig[T comparable] struct {\n // NewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use\n // NewDelayingQueueWithConfig instead and specify a name.\n //\n-// Deprecated: use TypedNewDelayingQueue instead.\n+// Deprecated: use NewTypedDelayingQueue instead.\n func NewDelayingQueue() DelayingInterface {\n \treturn NewDelayingQueueWithConfig(DelayingQueueConfig{})\n }\n \n-// TypedNewDelayingQueue constructs a new workqueue with delayed queuing ability.\n-// TypedNewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use\n-// TypedNewDelayingQueueWithConfig instead and specify a name.\n-func TypedNewDelayingQueue[T comparable]() TypedDelayingInterface[T] {\n+// NewTypedDelayingQueue constructs a new workqueue with delayed queuing ability.\n+// NewTypedDelayingQueue does not emit metrics. For use with a MetricsProvider, please use\n+// NewTypedDelayingQueueWithConfig instead and specify a name.\n+func NewTypedDelayingQueue[T comparable]() TypedDelayingInterface[T] {\n \treturn NewTypedDelayingQueueWithConfig(TypedDelayingQueueConfig[T]{})\n }\n \n // NewDelayingQueueWithConfig constructs a new workqueue with options to\n // customize different properties.\n //\n-// Deprecated: use TypedNewDelayingQueueWithConfig instead.\n+// Deprecated: use NewTypedDelayingQueueWithConfig instead.\n func NewDelayingQueueWithConfig(config DelayingQueueConfig) DelayingInterface {\n \treturn NewTypedDelayingQueueWithConfig[any](config)\n }\n \n+// TypedNewDelayingQueue exists for backwards compatibility only.\n+//\n+// Deprecated: use NewTypedDelayingQueueWithConfig instead.\n+func TypedNewDelayingQueue[T comparable](config TypedDelayingQueueConfig[T]) TypedDelayingInterface[T] {",
"line": 33,
"reactionCount": 0,
"reactions": [],
"timestamp": "2024-09-30T16:03:06Z",
"isReviewComment": true,
"pullRequestReviewId": 2338000555,
"LLMReviewed": true,
"LLMReviewPassed": true,
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:42.248Z"
},
{
"repo": "kubernetes/kubernetes",
"prNumber": 126556,
"prTitle": "Collect more info for debugging #124136",
"prAuthor": "carlory",
"prLink": "https://github.com/kubernetes/kubernetes/pull/126556",
"commentAuthor": "liggitt",
"commentBody": "this will hotloop once the watch closes... the receive from ResultChan needs to handle the channel closed case",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/kubernetes/kubernetes/pull/126556#discussion_r1724984941",
"filePath": "test/integration/volume/persistent_volumes_test.go",
"diffHunk": "@@ -1058,6 +1058,25 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) {\n \tdefer testClient.CoreV1().PersistentVolumes().DeleteCollection(context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{})\n \tdefer testClient.StorageV1().StorageClasses().DeleteCollection(context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{})\n \n+\t// Watch all events in the namespace, and save them to artifacts for debugging.\n+\t// TODO: This is a temporary solution to debug flaky tests `panic: test timed out after 10m0s`.\n+\t// We should remove this once https://github.com/kubernetes/kubernetes/issues/124136 is fixed.\n+\tgo func() {\n+\t\tw, err := testClient.EventsV1().Events(ns.Name).Watch(tCtx, metav1.ListOptions{})\n+\t\tif err != nil {\n+\t\t\treturn\n+\t\t}\n+\t\tfor {",
"line": 12,
"reactionCount": 0,
"reactions": [],
"timestamp": "2024-08-21T12:41:27Z",
"isReviewComment": true,
"pullRequestReviewId": 2250693793,
"LLMReviewed": true,
"LLMReviewPassed": true,
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:42.210Z"
},
{
"repo": "kubernetes/kubernetes",
"prNumber": 124284,
"prTitle": "DRA: fix data race",
"prAuthor": "bart0sh",
"prLink": "https://github.com/kubernetes/kubernetes/pull/124284",
"commentAuthor": "pohly",
"commentBody": "How is access to `cache.claimInfo` protected against concurrent access?\r\n",
"commentBodyIncludesCodeSnippet": false,
"commentLink": "https://github.com/kubernetes/kubernetes/pull/124284#discussion_r1562422207",
"filePath": "pkg/kubelet/cm/dra/claiminfo.go",
"diffHunk": "@@ -216,7 +216,10 @@ func (cache *claimInfoCache) syncToCheckpoint() error {\n \n \tclaimInfoStateList := make(state.ClaimInfoStateList, 0, len(cache.claimInfo))\n \tfor _, infoClaim := range cache.claimInfo {\n-\t\tclaimInfoStateList = append(claimInfoStateList, infoClaim.ClaimInfoState)\n+\t\tinfoClaim.Lock()",
"line": 5,
"reactionCount": 0,
"reactions": [],
"timestamp": "2024-04-12T11:28:56Z",
"isReviewComment": true,
"pullRequestReviewId": 1996536131,
"LLMReviewed": true,
"LLMReviewPassed": true,
"reReviewedAfterJan27th": true,
"difficultyLevel": "medium",
"difficultyAssessedAt": "2025-02-27T02:54:44.231Z"
},
{
"repo": "kubernetes/kubernetes",
"prNumber": 123874,