prompt stringlengths 58 17.8k | data_source stringclasses 1
value | ability stringclasses 1
value | instance dict |
|---|---|---|---|
pkg install: not reinstall a package by default
```
$ dvc pkg install https://github.com/dmpetrov/tag_classifier classify/
....
$ dvc pkg install https://github.com/dmpetrov/tag_classifier classify/
Package 'tag_classifier' was already installed.
```
Probably we need an option like `--force` in case the reinst... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/func/test_pkg.py::test_force_install",
"tests/unit/command/test_pkg.py::test_pkg_install"
],
"PASS_TO_PASS": [
"tests/func/test_pkg.py::test_install_version",
"tests/func/test_pkg.py::test_import_dir",
"tests/unit/command/test_pkg.py::test_pkg_get",
"tests/func/t... |
plots: replace --show-json with --show-vega
Requested by @dmpetrov for cml. `--show-vega` should require a target and return a filled vega template. `--show-json` is not needed, let's delete it.
| swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/unit/command/test_plots.py::test_metrics_diff",
"tests/unit/command/test_plots.py::test_plots_show_vega",
"tests/unit/command/test_plots.py::test_metrics_show"
],
"PASS_TO_PASS": [],
"base_commit": "63972c3d120d9f076f642a19382a247d5d5855a5",
"created_at": "2020-05-28T01:... |
brancher: rename `working tree` -> `workspace`
Much more natural term. Was also noted by @dmpetrov while working with plots. Needed for cml release.
| swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/unit/repo/plots/test_diff.py::test_revisions[arg_revisions1-True-expected_revisions1]",
"tests/unit/repo/plots/test_diff.py::test_revisions[arg_revisions0-False-expected_revisions0]"
],
"PASS_TO_PASS": [
"tests/unit/repo/plots/test_diff.py::test_revisions[arg_revisions2-Fals... |
config: add support for --show-origin
Same as `git config`:
```
$ git config --list --show-origin
file:/home/efiop/.gitconfig user.email=ruslan@iterative.ai
file:/home/efiop/.gitconfig user.name=Ruslan Kuprieiev
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=t... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/func/test_config.py::test_config_show_origin_merged"
],
"PASS_TO_PASS": [
"tests/func/test_config.py::test_list_bad_args[args2]",
"tests/func/test_config.py::test_list_bad_args[args1]",
"tests/func/test_config.py::test_config_get[args3-0-iterative]",
"tests/func/test... |
`full` inconsistency with NumPy for `dtype=None`
<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports http://matthewrocklin.com/blog/work/2018/02/28... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_wrap.py::test_full_none_dtype"
],
"PASS_TO_PASS": [
"dask/array/tests/test_wrap.py::test_size_as_list",
"dask/array/tests/test_wrap.py::test_full",
"dask/array/tests/test_wrap.py::test_ones",
"dask/array/tests/test_wrap.py::test_full_error_nonscalar_f... |
Bug in array assignment when the mask has been hardened
Hello,
**What happened**:
It's quite a particular set of circumstances: For an integer array with a hardened mask, when assigning the numpy masked constant to a range of two or more elements that already includes a masked value, then a datatype casting error... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_array_core.py::test_setitem_hardmask"
],
"PASS_TO_PASS": [
"dask/array/tests/test_array_core.py::test_normalize_chunks_nan",
"dask/array/tests/test_array_core.py::test_stack_scalars",
"dask/array/tests/test_array_core.py::test_astype",
"dask/array/tes... |
Array.copy is not a no-op
<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
-... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_array_core.py::test_array_copy_noop[-1]"
],
"PASS_TO_PASS": [
"dask/array/tests/test_array_core.py::test_normalize_chunks_nan",
"dask/array/tests/test_array_core.py::test_stack_scalars",
"dask/array/tests/test_array_core.py::test_astype",
"dask/array/... |
Adding a weights parameter to `reduction`
Hello,
I would like to explore adding a new `weights` parameter to the `dask.array.reduction(x, ...)` function ([dask.array.reduction](https://github.com/dask/dask/blob/main/dask/array/reductions.py#L41)).
This would allow an array of weights to be passed to each chunk, v... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_reductions.py::test_weighted_reduction"
],
"PASS_TO_PASS": [
"dask/array/tests/test_reductions.py::test_chunk_structure_independence[axes11-4-chunks0]",
"dask/array/tests/test_reductions.py::test_array_cumreduction_axis[blelloch-None-True-nancumsum]",
"da... |
The "dask.array.Array.__reduce__" method loses the information stored in the "meta" attribute.
```python
import dask.array
import numpy
arr = numpy.arange(10)
arr = dask.array.from_array(numpy.ma.MaskedArray(arr, mask=arr % 2 == 0))
assert isinstance(arr._meta, numpy.ma.MaskedArray)
other = pickle.loads(pick... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_array_core.py::test_array_picklable[array0]",
"dask/array/tests/test_array_core.py::test_array_picklable[array1]"
],
"PASS_TO_PASS": [
"dask/array/tests/test_array_core.py::test_normalize_chunks_nan",
"dask/array/tests/test_array_core.py::test_stack_scala... |
Enum deterministic hashing
Hi,
Can we add a deterministic hashing behavior for Enum types ?
With current implementation, this code fails:
```python
from enum import Enum
from dask.base import tokenize
class Color(Enum):
RED = 1
BLUE = 2
assert tokenize(Color.RED) == tokenize(Color.RED)
```
... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/tests/test_base.py::test_tokenize_enum[Enum]",
"dask/tests/test_base.py::test_tokenize_enum[Flag]"
],
"PASS_TO_PASS": [
"dask/tests/test_base.py::test_normalize_function_dataclass_field_no_repr",
"dask/tests/test_base.py::test_tokenize_object",
"dask/tests/test_base.p... |
Reading a Parquet file saved with a categorical index using Pyarrow raises an exception.
<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports http:/... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/dataframe/io/tests/test_parquet.py::test_categories_unnamed_index[pyarrow]"
],
"PASS_TO_PASS": [
"dask/dataframe/io/tests/test_parquet.py::test_chunksize[pyarrow-1MiB-True]",
"dask/dataframe/io/tests/test_parquet.py::test_roundtrip_arrow[df10]",
"dask/dataframe/io/tests/t... |
Dask does not support tokenizing `datetime.time`, only `datetime.date` and `datetime.datetime`
Did not see a prior reported issue and very straightforward issue:
```
tokenize(time(1,2,3)) != tokenize(time(1,2,3))
```
PR in https://github.com/dask/dask/pull/9528
Dask does not support tokenizing `datetime.time`... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/tests/test_base.py::test_tokenize_datetime_time"
],
"PASS_TO_PASS": [
"dask/tests/test_base.py::test_normalize_function_dataclass_field_no_repr",
"dask/tests/test_base.py::test_tokenize_object",
"dask/tests/test_base.py::test_tokenize_datetime_date",
"dask/tests/test_... |
ValueError of shape mismatch when assigning vector to a slice of matrix
<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports http://matthewrocklin.c... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_array_core.py::test_setitem_extended_API_1d[index5-value5]",
"dask/array/tests/test_array_core.py::test_setitem_extended_API_2d[index20-value20]",
"dask/array/tests/test_array_core.py::test_setitem_extended_API_2d[index22-value22]"
],
"PASS_TO_PASS": [
"d... |
`da.from_array` only uses custom getter if `inline_array=True` in 2022.4.0
The recent #8827 (released in 2022.4.0) changed `da.core.graph_from_arraylike` to contain the following snippet:
```Python
if inline_array:
layer = core_blockwise(
getitem, # <----------- custom getter
n... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_array_core.py::test_from_array_getitem[False-True]"
],
"PASS_TO_PASS": [
"dask/array/tests/test_array_core.py::test_normalize_chunks_nan",
"dask/array/tests/test_array_core.py::test_stack_scalars",
"dask/array/tests/test_array_core.py::test_astype",
"... |
wrong calculation of `warnsize` in slicing?
<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports http://matthewrocklin.com/blog/work/2018/02/28/mini... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_slicing.py::test_getitem_avoids_large_chunks"
],
"PASS_TO_PASS": [
"dask/array/tests/test_slicing.py::test_slicing_with_Nones[index1-shape0]",
"dask/array/tests/test_slicing.py::test_negative_n_slicing",
"dask/array/tests/test_slicing.py::test_gh4043[True... |
Failure in assignment of `np.ma.masked` to obect-type `Array`
<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports http://matthewrocklin.com/blog/wo... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/array/tests/test_array_core.py::test_setitem_masked"
],
"PASS_TO_PASS": [
"dask/array/tests/test_array_core.py::test_normalize_chunks_nan",
"dask/array/tests/test_array_core.py::test_stack_scalars",
"dask/array/tests/test_array_core.py::test_to_dask_dataframe",
"dask/... |
Inconsistent Tokenization due to Lazy Registration
I am running into a case where objects are inconsistently tokenized due to lazy registration of pandas dispatch handlers.
Here is a minimal, reproducible example:
```
import dask
import pandas as pd
class CustomDataFrame(pd.DataFrame):
pass
custom... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/tests/test_utils.py::test_dispatch_lazy_walks_mro"
],
"PASS_TO_PASS": [
"dask/tests/test_utils.py::test_extra_titles",
"dask/tests/test_utils.py::test_itemgetter",
"dask/tests/test_utils.py::test_dispatch",
"dask/tests/test_utils.py::test_derived_from",
"dask/test... |
Incorrect behavior of override_with argument in dask.config.get
I think #10499 may have introduced an accidental change in the behavior of dask.config.get (I think https://github.com/dask/dask-kubernetes/issues/816 is referring to the same thing, albeit somewhat cryptically 🙂):
```
# Previous behavior, 2023.9.1 and ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"dask/tests/test_config.py::test_get_override_with"
],
"PASS_TO_PASS": [
"dask/tests/test_config.py::test_deprecations_on_yaml[fuse-ave-width]",
"dask/tests/test_config.py::test_update_defaults",
"dask/tests/test_config.py::test_schema",
"dask/tests/test_config.py::test_col... |
Remove the `__pydantic_self__` edge case in model constructor
### Initial Checks
- [X] I have searched Google & GitHub for similar requests and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this feature is missing
### Description
The first argument... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_edge_cases.py::test_no_name_conflict_in_constructor"
],
"PASS_TO_PASS": [
"tests/test_edge_cases.py::test_type_union",
"tests/test_edge_cases.py::test_long_int",
"tests/test_edge_cases.py::test_frozen_config_and_field",
"tests/test_edge_cases.py::test_recursive_... |
Ability to pass a context object to the serialization methods
### Initial Checks
- [X] I have searched Google & GitHub for similar requests and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this feature is missing
### Description
Similarly to how `... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_serialize.py::test_serialize_json_context",
"tests/test_serialize.py::test_serialize_python_context"
],
"PASS_TO_PASS": [
"tests/test_serialize.py::test_serializer_annotated_wrap_always",
"tests/test_serialize.py::test_forward_ref_for_serializers[wrap-True]",
"t... |
Pydantic `__eq__` and `__hash__` doesn't work properly with `functools.cached_property`
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
### Bug
While porting an app to Pydantic v2, I notice that the implementation of `__eq__` doesn't work properly on Model with `functools.cache... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_edge_cases.py::test_eq_with_cached_property"
],
"PASS_TO_PASS": [
"tests/test_main.py::test_allow_extra_from_attributes[forbid]",
"tests/test_main.py::test_field_order_is_preserved_with_extra",
"tests/test_edge_cases.py::test_type_union",
"tests/test_main.py::te... |
BUG: Float Nullable dtypes not being returned when `use_nullable_dtypes=True` in `pd.read_parquet`
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/test_parquet.py::TestBasic::test_use_nullable_dtypes[pyarrow]",
"pandas/tests/io/test_parquet.py::TestBasic::test_read_empty_array[float]"
],
"PASS_TO_PASS": [
"pandas/tests/io/test_parquet.py::TestParquetFastParquet::test_unsupported",
"pandas/tests/io/test_pa... |
BUG: can't pass `Colormap` instance when plotting if using matplotlib >= 3.6
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [x] I have c... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/formats/style/test_matplotlib.py::test_pass_colormap_instance[scatter]",
"pandas/tests/io/formats/style/test_matplotlib.py::test_pass_colormap_instance[hexbin]"
],
"PASS_TO_PASS": [
"pandas/tests/io/formats/style/test_matplotlib.py::test_background_gradient_color[t... |
BUG: DataFrame.plot(kind='scatter') does not raise KeyError when unknown colormap is applied
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_scatter_unknown_colormap"
],
"PASS_TO_PASS": [
"pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_line_area_stacked[line]",
"pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_ba... |
BUG: inplace ignored for empty DataFrame by DataFrame.interpolate
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confirmed this bug... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interpolate_empty_df"
],
"PASS_TO_PASS": [
"pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interp_fillna_methods[axis='columns'-pad]",
"pandas/tests/frame/methods/test_in... |
BUG: read_xml iterparse doesn't handle multiple toplevel elements with lxml parser
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have c... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/xml/test_xml.py::test_comment[lxml]",
"pandas/tests/io/xml/test_xml.py::test_processing_instruction[lxml]"
],
"PASS_TO_PASS": [
"pandas/tests/io/xml/test_xml.py::test_wrong_dict_type[lxml]",
"pandas/tests/io/xml/test_xml.py::test_file_elems_and_attrs[etree]",
... |
ENH: More helpful error messages for merges with incompatible keys
### Feature Type
- [ ] Adding new functionality to pandas
- [X] Changing existing functionality in pandas
- [ ] Removing existing functionality in pandas
### Problem Description
I wish error messages for erroneous joins were more helpful when the ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/reshape/merge/test_merge.py::TestMergeDtypes::test_merge_incompat_dtypes_error[df1_vals7-df2_vals7]",
"pandas/tests/reshape/merge/test_merge.py::TestMergeDtypes::test_merge_incompat_dtypes_error[df1_vals3-df2_vals3]",
"pandas/tests/reshape/merge/test_merge.py::TestMergeDt... |
BUG: Error when exporting empty DataFrame with MultiIndex on both axes to xlsx file
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_to_excel_empty_multiindex_both_axes[openpyxl-.xlsx]",
"pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_to_excel_empty_multiindex_both_axes[odf-.ods]",
"pandas/tests/io/excel/test_writers.py::TestExcelWriter::tes... |
BUG: Interchange object data buffer has the wrong dtype / `from_dataframe` incorrect
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [x] ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/interchange/test_impl.py::test_buffer_dtype_categorical[data2-expected_dtype2-expected_buffer_dtype2]",
"pandas/tests/interchange/test_impl.py::test_buffer_dtype_categorical[data1-expected_dtype1-expected_buffer_dtype1]"
],
"PASS_TO_PASS": [
"pandas/tests/interchange/... |
BUG: to_datetime - confusion with timeawarness
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug exists on th... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/tools/test_to_datetime.py::test_to_datetime_mixed_tzaware_timestamp_utc_true[True-datetime.datetime]",
"pandas/tests/tools/test_to_datetime.py::test_to_datetime_mixed_tzaware_timestamp_utc_true[True-pd.Timestamp]"
],
"PASS_TO_PASS": [
"pandas/tests/tools/test_to_datet... |
QST: pd.series indexing True auto 0 change
### Research
- [X] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.
- [X] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).
### Link to question on StackOverflo... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/series/indexing/test_getitem.py::TestSeriesGetitemScalars::test_getitem_bool_index_positional"
],
"PASS_TO_PASS": [
"pandas/tests/series/indexing/test_getitem.py::TestGetitemBooleanMask::test_getitem_boolean_contiguous_preserve_freq",
"pandas/tests/series/indexing/tes... |
ENH: Add ignore_index to Series.drop_duplicates
### Feature Type
- [X] Adding new functionality to pandas
- [ ] Changing existing functionality in pandas
- [ ] Removing existing functionality in pandas
### Problem Description
Appears in 1.0, `DataFrame.drop_duplicates` gained `ignore_index`: https://pandas.pydata... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/series/methods/test_drop_duplicates.py::TestSeriesDropDuplicates::test_drop_duplicates_ignore_index"
],
"PASS_TO_PASS": [
"pandas/tests/series/methods/test_drop_duplicates.py::TestSeriesDropDuplicates::test_drop_duplicates_categorical_non_bool2_keeplast[timedelta64[h]-Tru... |
DEPR: Positional arguments in Series.to_markdown/string
While most method were captured in https://github.com/pandas-dev/pandas/issues/54229, `Series.to_string` and `Series.to_markdown` were missed
| swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/formats/test_to_markdown.py::test_keyword_deprecation"
],
"PASS_TO_PASS": [
"pandas/tests/io/formats/test_to_markdown.py::test_other_tablefmt",
"pandas/tests/io/formats/test_to_markdown.py::test_index[False]",
"pandas/tests/io/formats/test_to_markdown.py::test_... |
BUG: `period_range` gives incorrect output
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confirmed this bug exists on the [main br... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/indexes/period/test_constructors.py::TestPeriodIndex::test_constructor_with_without_freq"
],
"PASS_TO_PASS": [
"pandas/tests/indexes/period/test_constructors.py::TestPeriodIndex::test_constructor_nano",
"pandas/tests/indexes/period/test_constructors.py::TestPeriodInde... |
groupby boxplot doesn't work if multiple by's are used
#### Code Sample, a copy-pastable example if possible
```python
data = pd.DataFrame({'A': [1, 1, 2, 2], 'B': ['a', 'b', 'a', 'b'], 'value': [1, 2, 3, 4]})
data.groupby(['A', 'B']).boxplot()
```
#### Problem description
This code fails with an obscure erro... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/plotting/test_boxplot_method.py::TestDataFrameGroupByPlots::test_boxplot_multi_groupby_groups[group1]"
],
"PASS_TO_PASS": [
"pandas/tests/plotting/test_boxplot_method.py::TestDataFramePlots::test_boxplot_group_no_xlabel_ylabel[True]",
"pandas/tests/plotting/test_boxpl... |
str.replace('.','') should replace every character?
#### Code Sample (pandas 0.23.0)
In [1]:
```
import pandas as pd
s = pd.Series(['abc','123'])
s.str.replace('.','',regex = True)
```
Out [1]:
```
0 abc
1 123
dtype: object
```
#### Problem description
Hi everyone, I was showing str.replace ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/strings/test_find_replace.py::test_replace_regex_single_character[object-True]",
"pandas/tests/strings/test_find_replace.py::test_replace_regex_single_character[string[python]-True]",
"pandas/tests/strings/test_find_replace.py::test_replace_regex_single_character[string[p... |
BUG(?)/API: pd.NA + bytes raises TypeError
```
In [1]: pd.NA + "a"
Out[1]: <NA>
In [2]: pd.NA + b"a"
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 pd.NA + b"a"
... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/scalar/test_na_scalar.py::test_comparison_ops[ne-a1]",
"pandas/tests/scalar/test_na_scalar.py::test_comparison_ops[gt-a1]",
"pandas/tests/scalar/test_na_scalar.py::test_arithmetic_ops[rsub-b'a']",
"pandas/tests/scalar/test_na_scalar.py::test_comparison_ops[eq-a1]",
... |
BUG: can't use `.loc` with boolean values in MultiIndex
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug exists on... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_loc_bool_multiindex[bool-True]",
"pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_loc_bool_multiindex[boolean-True]"
],
"PASS_TO_PASS": [
"pandas/tests/frame/indexing/test_indexing.... |
BUG: DataFrame.describe include/exclude do not work for arrow datatypes
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confir... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/frame/methods/test_describe.py::TestDataFrameDescribe::test_describe_exclude_pa_dtype"
],
"PASS_TO_PASS": [
"pandas/tests/frame/methods/test_describe.py::TestDataFrameDescribe::test_ea_with_na[Int16]",
"pandas/tests/frame/methods/test_describe.py::TestDataFrameDescrib... |
BUG: Categorical order lost after call to `remove_categories`
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this b... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/indexes/categorical/test_category.py::TestCategoricalIndex2::test_remove_maintains_order"
],
"PASS_TO_PASS": [
"pandas/tests/indexes/categorical/test_category.py::TestCategoricalIndex::test_unique[True-data3-categories3-expected_data3]",
"pandas/tests/indexes/categori... |
BUG: Index.sort_values with natsort key
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [x] I have confirmed this bug exists on the [main branc... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/indexes/test_common.py::test_sort_values_natsort_key"
],
"PASS_TO_PASS": [
"pandas/tests/indexes/test_common.py::TestCommon::test_drop_duplicates[int8-last]",
"pandas/tests/indexes/test_common.py::TestCommon::test_hasnans_isnans[complex128]",
"pandas/tests/indexes... |
BUG: resampling empty series loses time zone from dtype
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confirmed this bug exists on... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/resample/test_datetime_index.py::test_resample_empty_series_with_tz"
],
"PASS_TO_PASS": [
"pandas/tests/resample/test_datetime_index.py::test_nearest_upsample_with_limit[tzlocal()-s-15Min-10S]",
"pandas/tests/resample/test_datetime_index.py::test_nearest_upsample_with... |
BUG: can't pass `Colormap` instance when plotting if using matplotlib >= 3.6
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [x] I have c... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/formats/style/test_matplotlib.py::test_pass_colormap_instance[scatter]",
"pandas/tests/io/formats/style/test_matplotlib.py::test_pass_colormap_instance[hexbin]"
],
"PASS_TO_PASS": [
"pandas/tests/io/formats/style/test_matplotlib.py::test_background_gradient_color[t... |
BUG: timestamps are formatted without zero-padded years
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug exists on... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/scalar/timestamp/test_constructors.py::TestTimestampConstructors::test_out_of_bounds_string_consistency[0001-01-01]",
"pandas/tests/scalar/timestamp/test_constructors.py::TestTimestampConstructors::test_out_of_bounds_string_consistency[001-01-01]",
"pandas/tests/scalar/ti... |
BUG: Interchange protocol implementation does not allow for empty string columns
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have con... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/interchange/test_impl.py::test_empty_string_column"
],
"PASS_TO_PASS": [
"pandas/tests/interchange/test_impl.py::test_bitmasks_pyarrow[2-None-expected_values2]",
"pandas/tests/interchange/test_impl.py::test_datetimetzdtype[us-UTC]",
"pandas/tests/interchange/test_... |
BUG: df.plot.scatter may cause UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whats... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/plotting/frame/test_frame_color.py::TestDataFrameColor::test_scatter_colors_not_raising_warnings"
],
"PASS_TO_PASS": [
"pandas/tests/plotting/frame/test_frame_color.py::TestDataFrameColor::test_bar_colors_cmap[colormap1]",
"pandas/tests/plotting/frame/test_frame_color... |
BUG: pandas 1.5 fails to groupby on (nullable) Int64 column with dropna=False
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confir... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-UInt8-63]",
"pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-Float64-63]",
"pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-UInt32-63]",
"pandas/tests/groupby/test_... |
BUG: NotImplementedError: Prefix not defined when slicing offset with loc
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confirmed ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/frame/indexing/test_getitem.py::TestGetitemListLike::test_getitem_iloc_dateoffset_days"
],
"PASS_TO_PASS": [
"pandas/tests/frame/indexing/test_getitem.py::TestGetitemListLike::test_getitem_listlike[1-dict_keys]",
"pandas/tests/frame/indexing/test_getitem.py::TestGetit... |
BUG: map method on Datetimearray, TimedeltaArray, PeriodArray and related indexes should not work arraywise
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.htm... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/groupby/test_grouping.py::TestGrouping::test_groupby_grouper_f_sanity_checked",
"pandas/tests/indexes/timedeltas/test_timedelta.py::TestTimedeltaIndex::test_map",
"pandas/tests/apply/test_series_apply.py::test_map_datetimetz",
"pandas/tests/apply/test_series_apply.py:... |
BUG: Unexpected KeyError message when using .loc with MultiIndex in a possible edge-case
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/indexes/multi/test_indexing.py::TestGetLoc::test_get_loc",
"pandas/tests/indexing/multiindex/test_loc.py::TestMultiIndexLoc::test_loc_multi_index_key_error",
"pandas/tests/indexes/multi/test_drop.py::test_drop"
],
"PASS_TO_PASS": [
"pandas/tests/indexes/multi/test... |
BUG: When compute.use_numba is enabled, pandas.DataFrame.info() will raise an error due to a data type issue with pandas.core.frame.DataFrameInfo.dtype_counts.
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the [latest versio... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/formats/test_info.py::test_info_compute_numba"
],
"PASS_TO_PASS": [
"pandas/tests/io/formats/test_info.py::test_memory_usage_empty_no_warning",
"pandas/tests/io/formats/test_info.py::test_info_duplicate_columns_shows_correct_dtypes",
"pandas/tests/io/formats/te... |
BUG: DataFrame.explode incomplete support on multiple columns with NaN or empty lists
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X]... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/frame/methods/test_explode.py::test_multi_columns_nan_empty"
],
"PASS_TO_PASS": [
"pandas/tests/frame/methods/test_explode.py::test_duplicate_index[input_dict2-input_index2-expected_dict2-expected_index2]",
"pandas/tests/frame/methods/test_explode.py::test_basic[0]",
... |
BUG: "ValueError: The truth value ... is ambiguous" when using .loc setitem
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have co... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/series/indexing/test_indexing.py::test_loc_setitem_nested_data_enlargement"
],
"PASS_TO_PASS": [
"pandas/tests/series/indexing/test_indexing.py::TestDeprecatedIndexers::test_setitem_dict_and_set_deprecated_multiindex[key3]",
"pandas/tests/series/indexing/test_indexing... |
VIS: Can't set xlabel/ylabel on histogram
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug exists on the main bran... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/plotting/test_series.py::TestSeriesPlots::test_xlabel_ylabel_series[hist-None--new]",
"pandas/tests/plotting/test_series.py::TestSeriesPlots::test_xlabel_ylabel_series[hist-None--]",
"pandas/tests/plotting/test_series.py::TestSeriesPlots::test_xlabel_ylabel_series[hist-ol... |
BUG: using iloc/loc to set a nullable int type on a non-nullable int column fails
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have co... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItem::test_loc_setitem_ea_dtype"
],
"PASS_TO_PASS": [
"pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItemBooleanMask::test_setitem_ea_boolean_mask",
"pandas/tests/frame/indexing/test_setitem.py::TestDataFr... |
BUG: Some `Index` reductions fail with `string[pyarrow]`
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug exists o... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[string-pyarrow-minimum]",
"pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[string-pyarrow-maximum]"
],
"PASS_TO_PASS": [
"pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_ba... |
BUG: Styling of a `DataFrame` with boolean column labels leaves out `False` and fails when adding non-numerical column
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/in... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/formats/style/test_style.py::TestStyler::test_subset_for_boolean_cols[bar]",
"pandas/tests/io/formats/style/test_style.py::TestStyler::test_subset_for_boolean_cols[text_gradient]",
"pandas/tests/io/formats/style/test_style.py::TestStyler::test_subset_for_boolean_cols[b... |
BUG: In development version, `pd.merge` with `Series` arguments an `how="cross"` fails
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I ha... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/reshape/merge/test_merge_cross.py::test_merge_cross_series"
],
"PASS_TO_PASS": [
"pandas/tests/reshape/merge/test_merge_cross.py::test_merge_cross_error_reporting[kwargs3]",
"pandas/tests/reshape/merge/test_merge_cross.py::test_merge_cross_null_values[NoneType]",
... |
BUG: is_string_dtype(pd.Index([], dtype='O')) returns `False`
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confirmed this bug e... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/dtypes/test_common.py::test_is_string_dtype[dtype6-True]"
],
"PASS_TO_PASS": [
"pandas/tests/dtypes/test_common.py::test_is_not_int64_dtype[float]",
"pandas/tests/dtypes/test_common.py::test_dtype_equal[float-float64-datetime-datetime64[ns]]",
"pandas/tests/dtypes... |
BUG: pivot_table with margins=True on empty DataFrame results in ValueError
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirme... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/reshape/test_pivot.py::TestPivotTable::test_pivot_table_empty_aggfunc[True]"
],
"PASS_TO_PASS": [
"pandas/tests/reshape/test_pivot.py::TestPivotTable::test_pivot_timegrouper",
"pandas/tests/reshape/test_pivot.py::TestPivotTable::test_daily[86]",
"pandas/tests/resh... |
BUG: Set y-axis label, limits and ticks for a secondary y-axis
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug ex... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_secondary_y[True]"
],
"PASS_TO_PASS": [
"pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_line_area_stacked[line]",
"pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_bad_label... |
ENH: df.to_pickle xz lzma preset=level for compression compresslevel
### Feature Type
- [X] Adding new functionality to pandas
- [ ] Changing existing functionality in pandas
- [ ] Removing existing functionality in pandas
### Problem Description
I wish I could use pandas to save dataframe with maximum possible c... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/test_compression.py::test_xz_compression_level_read[to_pickle-obj0]",
"pandas/tests/io/test_compression.py::test_xz_compression_level_read[to_csv-obj1]",
"pandas/tests/io/test_compression.py::test_xz_compression_level_read[to_json-obj0]",
"pandas/tests/io/test_comp... |
BUG: differences in Series.map with defaultdict with different dtypes
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/apply/test_series_apply.py::test_map_defaultdict_ignore_na",
"pandas/tests/apply/test_series_apply.py::test_map_defaultdict_na_key[None]",
"pandas/tests/apply/test_series_apply.py::test_map_defaultdict_unmutated[None]"
],
"PASS_TO_PASS": [
"pandas/tests/apply/test... |
BUG: to_numpy_dtype_inference returns None when array is non-numeric and dtype isn't given
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/arrays/masked/test_function.py::test_to_numpy"
],
"PASS_TO_PASS": [
"pandas/tests/arrays/masked/test_function.py::test_tolist[UInt64]",
"pandas/tests/arrays/masked/test_function.py::test_round[Float32]",
"pandas/tests/arrays/masked/test_function.py::test_tolist[In... |
BUG: Weighted rolling aggregations do not respect min_periods=0
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug e... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/window/test_win_type.py::test_cmov_window_na_min_periods[None-0]",
"pandas/tests/window/test_win_type.py::test_cmov_window_na_min_periods[10-0]",
"pandas/tests/window/test_win_type.py::test_cmov_window_na_min_periods[1-0]",
"pandas/tests/window/test_win_type.py::test_... |
DataFrame.update crashes with overwrite=False when NaT present
#### Code Sample
```python
df1 = DataFrame({'A': [1,None], 'B':[to_datetime('abc', errors='coerce'),to_datetime('2016-01-01')]})
df2 = DataFrame({'A': [2,3]})
df1.update(df2, overwrite=False)
```
```pytb
------------------------------------------... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/frame/methods/test_update.py::TestDataFrameUpdate::test_update_dt_column_with_NaT_create_column"
],
"PASS_TO_PASS": [
"pandas/tests/frame/methods/test_update.py::TestDataFrameUpdate::test_update_nan",
"pandas/tests/frame/methods/test_update.py::TestDataFrameUpdate::te... |
BUG: astype('category') on dataframe backed by non-writeable arrays raises ValueError
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I hav... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/extension/test_categorical.py::test_astype_category_readonly_mask_values"
],
"PASS_TO_PASS": [
"pandas/tests/extension/test_categorical.py::TestReshaping::test_unstack[series-index1]",
"pandas/tests/extension/test_categorical.py::TestArithmeticOps::test_arith_series_w... |
BUG: pd.read_xml does not support file like object when iterparse is used
### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed... | swe-gym | coding | {
"FAIL_TO_PASS": [
"pandas/tests/io/xml/test_xml.py::test_file_io_iterparse[lxml-r]",
"pandas/tests/io/xml/test_xml.py::test_file_like_iterparse[lxml-r]",
"pandas/tests/io/xml/test_xml.py::test_file_io_iterparse[etree-rb]",
"pandas/tests/io/xml/test_xml.py::test_file_like_iterparse[etree-rb]",
"p... |
Passing callable as `instantiate` `_target_` fails for nested classes
Hydra's `instantiate` function allows users to pass a callable (rather than a
string) via the `_target_` keyword argument. For example:
```python
def fn():
return "fn return"
class A:
def __init__(self):
print("in A.__ini... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/instantiate/test_instantiate.py::test_instantiate_with_callable_target_keyword[instantiate2-nested]"
],
"PASS_TO_PASS": [
"tests/instantiate/test_instantiate.py::test_override_target[instantiate2-dict-type:override_same_args]",
"tests/instantiate/test_instantiate.py::test_co... |
[BUG] construct_color_bar does not support ImageStack glyph
### Software versions
Python version : 3.10.11 | packaged by conda-forge | (main, May 10 2023, 19:01:19) [Clang 14.0.6 ]
IPython version : 8.14.0
Tornado version : 6.3.2
Bokeh version : 3.3.0.dev1+21.gd5ce3ec0
BokehJS static path : ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/unit/bokeh/models/test_glyph_renderer.py::TestGlyphRenderer_construct_color_bar::test_image_stack_good"
],
"PASS_TO_PASS": [
"tests/unit/bokeh/models/test_glyph_renderer.py::TestGlyphRenderer_construct_color_bar::test_line_missing_transform",
"tests/unit/bokeh/models/test_gl... |
[BUG] CDS stream broken for larger rollover
### Software versions
Python version : 3.9.10 | packaged by conda-forge | (main, Feb 1 2022, 21:27:48)
IPython version : 8.0.1
Tornado version : 6.1
Bokeh version : 3.2.1
BokehJS static path : /Users/bzaitlen/miniconda3/envs/dask-dev/lib/python3.... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/unit/bokeh/core/property/test_wrappers__property.py::test_PropertyValueColumnData__stream_list_with_rollover_greater_than_list_length"
],
"PASS_TO_PASS": [
"tests/unit/bokeh/core/property/test_wrappers__property.py::test_PropertyValueColumnData___setitem__",
"tests/unit/boke... |
flake8-pyi
the issue also happens in `MONAI` repo (https://github.com/Project-MONAI/MONAI/runs/7604721904?check_suite_focus=true#step:7:188), what do you think?
_Originally posted by @yiheng-wang-nv in https://github.com/Project-MONAI/model-zoo/issues/71#issuecomment-1200716404_
deprecated warning with futurewarnin... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_deprecated.py::TestDeprecatedRC::test_warning_milestone",
"tests/test_deprecated.py::TestDeprecated::test_class_warning1",
"tests/test_deprecated.py::TestDeprecated::test_meth_warning1",
"tests/test_deprecated.py::TestDeprecated::test_arg_warn1",
"tests/test_depreca... |
Perceptual loss with medicalnet_resnet50_23datasets errors due to a typo.
**Describe the bug**
When trying to use `network_type=medicalnet_resnet50_23datasets`, I got the following error:
```
ValueError: Unrecognised criterion entered for Adversarial Loss. Must be one in: alex, vgg, squeeze, radimagenet_resnet50, me... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_perceptual_loss.py::TestPerceptualLoss::test_shape_6",
"tests/test_perceptual_loss.py::TestPerceptualLoss::test_identical_input_6"
],
"PASS_TO_PASS": [
"tests/test_perceptual_loss.py::TestPerceptualLoss::test_identical_input_1",
"tests/test_perceptual_loss.py::TestP... |
`sliding_window_inference` shouldn't remove gradient
**Describe the bug**
```py
import torch
import monai
inputs = torch.ones((3, 16, 15, 7), requires_grad=True)
result = monai.inferers.sliding_window_inference(inputs, roi_size=(2, 3), sw_batch_size=3, predictor=lambda x: x + 1.0)
result.sum().backward()
print... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_sliding_window_inference.py::TestSlidingWindowInference::test_default_device_0",
"tests/test_sliding_window_inference.py::TestSlidingWindowInference::test_default_device_1"
],
"PASS_TO_PASS": [
"tests/test_sliding_window_inference.py::TestSlidingWindowInference::test_sl... |
ProbMap indexing has an error
**Describe the bug**
The location values of probability mask is not being used correctly in the numpy output. The locations are a numpy array (instead of a tuple) so when used in indexing an ndarray, they are not being interpreted as the location in two/three dimension. Instead they are t... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_handler_prob_map_producer.py::TestHandlerProbMapGenerator::test_prob_map_generator_0_temp_image_inference_output_1",
"tests/test_handler_prob_map_producer.py::TestHandlerProbMapGenerator::test_prob_map_generator_2_temp_image_inference_output_3",
"tests/test_handler_prob_map... |
MetaTensor Needs `__str__` Method
**Is your feature request related to a problem? Please describe.**
When a `MetaTensor` is printed with `print` it produces its metadata information in addition to what a tensor would normally print. This is usually too verbose for just printing to screen, and differs from default beha... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_meta_tensor.py::TestMetaTensor::test_str"
],
"PASS_TO_PASS": [
"tests/test_meta_tensor.py::TestMetaTensor::test_construct_with_pre_applied_transforms",
"tests/test_meta_tensor.py::TestMetaTensor::test_decollate_5",
"tests/test_meta_tensor.py::TestMetaTensor::test_da... |
Add `numpy` support to `SplitOnGrid`
**Is your feature request related to a problem? Please describe.**
`SplitOnGrid` transform for digital pathology only supports `torch.Tensor` backend, it would be nice to have the `numpy` backend implementation as well.
Discussed at https://github.com/Project-MONAI/MONAI/issues/... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_split_on_grid.py::TestSplitOnGrid::test_split_patch_single_call_05",
"tests/test_split_on_grid_dict.py::TestSplitOnGridDict::test_split_patch_multiple_call_2",
"tests/test_split_on_grid.py::TestSplitOnGrid::test_split_patch_single_call_03",
"tests/test_split_on_grid_dic... |
Invertd error when using spline interpolation order 0-5 (integers) in spacing transform
When I use spline interpolation order 0-5 (integers) for spacing transform, an error occurs if I invert item. I found may be there is a bug in https://github.com/Project-MONAI/MONAI/blob/a7bdb9d2611b611a9dd1a3183b025d1d8aeeea90/mona... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_invert.py::TestInvert::test_invert",
"tests/test_invertd.py::TestInvertd::test_invert"
],
"PASS_TO_PASS": [
"tests/test_invert.py::TestInvert::test_invert_warn_pending"
],
"base_commit": "0a36baee0696c84e4235fdf62abd0eeadaefd111",
"created_at": "2023-07-14T08:30:5... |
SSIMLoss result does not have gradient
**Describe the bug**
SSIMLoss result does not have gradient
@PedroFerreiradaCosta
@wyli
**To Reproduce**
```
import torch
from monai.losses.ssim_loss import SSIMLoss
x = torch.ones([1,1,10,10])/2
y = torch.ones([1,1,10,10])/2
y.requires_grad_(True)
data_range = x.... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_ssim_loss.py::TestSSIMLoss::test_grad_1",
"tests/test_ssim_loss.py::TestSSIMLoss::test_grad_0"
],
"PASS_TO_PASS": [
"tests/test_ssim_loss.py::TestSSIMLoss::test3d_2",
"tests/test_ssim_loss.py::TestSSIMLoss::test3d_1",
"tests/test_ssim_loss.py::TestSSIMLoss::test... |
Classification can't work in distributed data parallel if has rich meta data
**Describe the bug**
When evaluate on nifti data, the meta data is very rich, and we only `all_gather` the file names.
It will cause the length of other meta data can't match model output:
```
2021-02-09 02:12:24,253 - ignite.engine.engine... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_handler_classification_saver_dist.py::DistributedHandlerClassificationSaver::test_saved_content"
],
"PASS_TO_PASS": [],
"base_commit": "866d53df3f754e25fb4635abeb3f27cdaaa718cd",
"created_at": "2021-02-09T03:44:28Z",
"hints_text": "",
"instance_id": "Project-MONAI__MONA... |
itkreader metadict not compatible with data collate
**Describe the bug**
```py
meta_dict
{'aux_file': '', 'bitpix': '64', 'cal_max': '0', 'cal_min': '0', 'datatype': '64', 'descrip': '', 'dim[0]': '4', 'dim[1]': '3', 'dim[2]': '128', 'dim[3]': '128', 'dim[4]': '128', 'dim[5]': '1', 'dim[6]': '1', 'dim[7]': '1', 'dim... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_load_image.py::TestLoadImage::test_itk_reader_4",
"tests/test_load_image.py::TestLoadImageMeta::test_correct_1",
"tests/test_load_image.py::TestLoadImage::test_load_nifti_multichannel",
"tests/test_load_image.py::TestLoadImage::test_channel_dim_5",
"tests/test_load_... |
Amend extract_levels for LocalNet
**Is your feature request related to a problem? Please describe.**
In the current LocalNet implementation, the `extract_levels` arguments are not directly passed to its parent class `RegUNet.` Instead, the deepest level `max(extract_levels)` is passed as the `depth` argument. Conseque... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_localnet.py::TestLocalNet::test_extract_levels_0",
"tests/test_localnet.py::TestLocalNet::test_extract_levels_1"
],
"PASS_TO_PASS": [
"tests/test_localnet.py::TestLocalNet::test_script",
"tests/test_localnet.py::TestLocalNet::test_shape_0",
"tests/test_localnet.... |
Jaccard (IOU) loss issue
**Describe the bug**
I'm using dice loss and Jaccard (IOU) loss for segmentation tasks. However, I found the Jaccard(IOU) loss is lower than 0.0 , when I check the code at 'monai/losses/dice.py', class DiceLoss, line128-133, I found the function is implemented as follow:
ground_o = torch.s... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_dice_loss.py::TestDiceLoss::test_shape_9",
"tests/test_masked_dice_loss.py::TestDiceLoss::test_shape_9"
],
"PASS_TO_PASS": [
"tests/test_dice_loss.py::TestDiceLoss::test_shape_7",
"tests/test_masked_dice_loss.py::TestDiceLoss::test_shape_4",
"tests/test_masked_d... |
GeneralizedDiceLoss is not differentiable
**Describe the bug**
The [code](https://github.com/Project-MONAI/MONAI/blob/a93b8ccb5c13e723f2ff28c1e54ffe1011c9f9b1/monai/losses/dice.py#L350) used for weight clamping in the forward method of the GeneralizedDiceLoss module is not differentiable:
```python
w = self.w_func... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_batch",
"tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_differentiability"
],
"PASS_TO_PASS": [
"tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_ill_opts",
"tests/test_gen... |
randomizing a zipdataset with input of randomizable datasets
The issue is with ZipDataset (not having Randomizable?). Using the default worker_init_fn does not change the results,
Here is a reproducible version:
```py
import nibabel as nib
import torch
from monai.data import DataLoader, Dataset, ImageDataset... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_dataloader.py::TestLoaderRandom::test_zipdataset"
],
"PASS_TO_PASS": [
"tests/test_dataloader.py::TestLoaderRandom::test_randomize",
"tests/test_dataloader.py::TestDataLoader::test_exception_0",
"tests/test_dataloader.py::TestDataLoader::test_values",
"tests/tes... |
ScaleIntensity should give the option for channel_wise
StdShiftIntensity gives the option for channel_wise, but ScaleIntensity doesn't.
| swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_scale_intensity.py::TestScaleIntensity::test_channel_wise",
"tests/test_scale_intensityd.py::TestScaleIntensityd::test_channel_wise"
],
"PASS_TO_PASS": [
"tests/test_scale_intensityd.py::TestScaleIntensityd::test_factor_scale",
"tests/test_scale_intensity.py::TestSc... |
`iter_patch_slices` Patch Order
Similar to convolutions, the way usually sliding window is implemented is going over the slow dimension first and then go down the other indices (sweeping row by row), like this:
```python
A = [[ a, a, b, b],
[ a, a, b, b],
[ c, c, d, d],
[ c, c, d, d]]
L = [[[a,a... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_grid_dataset.py::TestGridPatchDataset::test_loading_dict",
"tests/test_grid_dataset.py::TestGridPatchDataset::test_loading_array"
],
"PASS_TO_PASS": [
"tests/test_grid_dataset.py::TestGridPatchDataset::test_shape"
],
"base_commit": "fdec959cc2fbe9f09ed8d95a26bf24a20... |
SSIM loss fail when batchsize>1
**Describe the bug**
SSIM loss fail when batchsize>1
**To Reproduce**
Steps to reproduce the behavior:
```
import torch
from monai.losses.ssim_loss import SSIMLoss
x = torch.ones([4,1,10,10])/2
y = torch.ones([4,1,10,10])/2
data_range = x.max().unsqueeze(0)
print(1-SSIMLoss(s... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_ssim_loss.py::TestSSIMLoss::test2d_04",
"tests/test_ssim_loss.py::TestSSIMLoss::test2d_05",
"tests/test_ssim_loss.py::TestSSIMLoss::test3d_11",
"tests/test_ssim_loss.py::TestSSIMLoss::test3d_05",
"tests/test_ssim_loss.py::TestSSIMLoss::test3d_10",
"tests/test_ss... |
inverse lazily applied cropforeground with k_divisible>1
**Describe the bug**
```py
import torch
import monai.transforms as t
from monai.transforms.lazy.functional import apply_transforms
img = torch.tensor([[[0, 0, 0, 0, 0], [0, 1, 2, 1, 0], [0, 2, 3, 2, 0], [0, 1, 2, 1, 0], [0, 0, 0, 0, 0]]])
kwargs = {"sel... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_crop_foreground.py::TestCropForeground::test_inverse_pending_ops_10",
"tests/test_crop_foreground.py::TestCropForeground::test_inverse_pending_ops_03",
"tests/test_crop_foreground.py::TestCropForeground::test_inverse_pending_ops_16",
"tests/test_crop_foreground.py::Test... |
`GridPatchDataset` does not support GPU tensor as the data source
**Describe the bug**
Execute this script,
```
import numpy as np
import torch
from monai.data.dataloader import DataLoader
from monai.data.grid_dataset import GridPatchDataset, PatchIter
device = torch.device('cuda:0' if torch.cuda.is_available(... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_grid_dataset.py::TestGridPatchDataset::test_patch_iter_04",
"tests/test_grid_dataset.py::TestGridPatchDataset::test_iter_patch_2",
"tests/test_grid_dataset.py::TestGridPatchDataset::test_patch_iter_11",
"tests/test_grid_dataset.py::TestGridPatchDataset::test_patch_iterd... |
Torch `FgBgToIndices`
BTW, to cache the foreground & background indices for pos / neg crop, could you please help also add Tensor backend for `FgBgToIndices` transform?
Thanks in advance.
_Originally posted by @Nic-Ma in https://github.com/Project-MONAI/MONAI/pull/2967#pullrequestreview-757677818_
| swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_fg_bg_to_indicesd.py::TestFgBgToIndicesd::test_type_shape_8",
"tests/test_fg_bg_to_indices.py::TestFgBgToIndices::test_type_shape_6",
"tests/test_fg_bg_to_indices.py::TestFgBgToIndices::test_type_shape_5",
"tests/test_fg_bg_to_indicesd.py::TestFgBgToIndicesd::test_type_... |
Change exception to warning in AUC metric
**Is your feature request related to a problem? Please describe.**
Currently, when the input data is all 0 or all 1, AUC will raise an error:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/metrics/rocauc.py#L69
@SachidanandAlle , @madil90 , and our internal QAs all ... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_compute_roc_auc.py::TestComputeROCAUC::test_value_7",
"tests/test_compute_roc_auc.py::TestComputeROCAUC::test_class_value_7"
],
"PASS_TO_PASS": [
"tests/test_compute_roc_auc.py::TestComputeROCAUC::test_class_value_5",
"tests/test_compute_roc_auc.py::TestComputeROCAU... |
Make MLPBlock compatible with diffusion models
**Is your feature request related to a problem? Please describe.**
To be able to re-use the [MLPBlock](https://github.com/Project-MONAI/MONAI/blob/fdd07f36ecb91cfcd491533f4792e1a67a9f89fc/monai/networks/blocks/mlp.py) in the implementation of diffusion models (developed i... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_activations.py::TestActivations::test_monai_activations_value_shape_3_geglu"
],
"PASS_TO_PASS": [
"tests/test_activations.py::TestActivations::test_value_shape_10",
"tests/test_activations.py::TestActivations::test_value_shape_07",
"tests/test_activations.py::TestAc... |
RandBiasField missing np.exp
**Describe the bug**
The bias field generated by `RandBiasField._generate_random_field` ([link](https://github.com/Project-MONAI/MONAI/blob/0ad9e73639e30f4f1af5a1f4a45da9cb09930179/monai/transforms/intensity/array.py#L434)) should be exponentiated, as done so in [NiftyNet's implementation]... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_random_bias_fieldd.py::TestRandBiasFieldd::test_zero_range_0",
"tests/test_random_bias_field.py::TestRandBiasField::test_zero_range_0",
"tests/test_random_bias_fieldd.py::TestRandBiasFieldd::test_one_range_input_0",
"tests/test_random_bias_field.py::TestRandBiasField::t... |
paramer group format error
**Describe the bug**
`generate_param_groups` doesn't return the correct format for `match_type 'filter'`
```py
import torch
from monai.networks.nets import Unet
from monai.optimizers import generate_param_groups
net = Unet(dimensions=3, in_channels=1, out_channels=3, channels=[2, 2,... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_3",
"tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_5"
],
"PASS_TO_PASS": [
"tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_2",
"tests/test_... |
DiceCELoss gets 0 CE component for binary segmentation
### Discussed in https://github.com/Project-MONAI/MONAI/discussions/6919
<div type='discussions-op-text'>
<sup>Originally posted by **kretes** August 31, 2023</sup>
I'm using MONAI for binary 3D segmentation.
I've noticed that in my case the 'CE' componen... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_dice_ce_loss.py::TestDiceCELoss::test_result_6"
],
"PASS_TO_PASS": [
"tests/test_dice_ce_loss.py::TestDiceCELoss::test_result_4",
"tests/test_dice_ce_loss.py::TestDiceCELoss::test_script",
"tests/test_ds_loss.py::TestDSLossDiceCE::test_ill_reduction",
"tests/tes... |
ToNumpy changed the dim of 0-dim data
**Describe the bug**
Holger found an issue that the `ToNumpy` transform will add unexpected dim to 0-dim data in classification task.
I think it's similar issue as: https://github.com/Project-MONAI/MONAI/pull/2454.
**How to reproduce**
```
>>> import numpy as np
>>> from mo... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_to_numpy.py::TestToNumpy::test_single_value"
],
"PASS_TO_PASS": [
"tests/test_to_numpy.py::TestToNumpy::test_tensor_input",
"tests/test_to_numpy.py::TestToNumpy::test_numpy_input",
"tests/test_to_numpy.py::TestToNumpy::test_list_tuple"
],
"base_commit": "df76a20... |
[Bug] Error when inverting transform `ToTensord`
#### Description
When inverting a `ToTensord` transform (using the `Invertd` transform) an error is raised because it is trying to pop from an empty applied transforms list
#### Code to reproduce
```python
from monai.transforms import Invertd, ToTensord
import... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_to_tensord.py::TestToTensord::test_array_input_3"
],
"PASS_TO_PASS": [
"tests/test_to_tensord.py::TestToTensord::test_single_input_3",
"tests/test_to_tensord.py::TestToTensord::test_array_input_2",
"tests/test_to_tensord.py::TestToTensord::test_single_input_0",
... |
BUG in `RandCropBoxByPosNegLabeld`
```
from monai.apps.detection.transforms.dictionary import RandCropBoxByPosNegLabeld
import torch
tt = RandCropBoxByPosNegLabeld(image_keys=["image"],
box_keys="box",
label_keys="label",
... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_box_transform.py::TestBoxTransform::test_crop_shape"
],
"PASS_TO_PASS": [
"tests/test_box_transform.py::TestBoxTransform::test_value_2d_mask_4",
"tests/test_box_transform.py::TestBoxTransform::test_value_3d_mask",
"tests/test_box_transform.py::TestBoxTransform::test... |
Unconsistent dim in `SobelGradients`
**Is your feature request related to a problem? Please describe.**
`apply_filter` is used in `SobelGradients` to get the gradient map which needs a 'batch' dimension. In `SobelGradients`, it needs input with shape (batch, channels, H[, W, D]) which may be inconsistent with other po... | swe-gym | coding | {
"FAIL_TO_PASS": [
"tests/test_sobel_gradientd.py::SobelGradientTests::test_sobel_gradients_0",
"tests/test_sobel_gradient.py::SobelGradientTests::test_sobel_gradients_0"
],
"PASS_TO_PASS": [
"tests/test_sobel_gradientd.py::SobelGradientTests::test_sobel_gradients_error_0",
"tests/test_sobel_grad... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.