Dataset Viewer
Auto-converted to Parquet Duplicate
repo
stringclasses
9 values
instance_id
stringlengths
18
32
patch
stringlengths
441
171k
test_patch
stringlengths
0
56.7k
base_commit
stringlengths
40
40
head_commit
stringlengths
40
40
created_at
int64
1,391B
1,741B
version
stringlengths
3
7
duration_changes
stringlengths
2.21k
204k
efficiency_test
listlengths
1
68
patch_functions
stringlengths
2
3.3k
problem_statement_oracle
stringlengths
744
4.04k
test_functions
stringlengths
42
7.23k
problem_statement_realistic
stringlengths
813
8k
human_performance
float64
0
0.88
astropy/astropy
astropy__astropy-16065
diff --git a/astropy/utils/diff.py b/astropy/utils/diff.py index 0c77e3ebea87..7e0c947dc65e 100644 --- a/astropy/utils/diff.py +++ b/astropy/utils/diff.py @@ -47,6 +47,18 @@ def diff_values(a, b, rtol=0.0, atol=0.0): return a != b +def _ignore_astropy_terminal_size(func): + @functools.wraps(func) + d...
diff --git a/astropy/utils/tests/test_diff.py b/astropy/utils/tests/test_diff.py index a581dba1108d..61317e3e7810 100644 --- a/astropy/utils/tests/test_diff.py +++ b/astropy/utils/tests/test_diff.py @@ -145,6 +145,17 @@ def test_tablediff(): assert report_diff_values(a, a, fileobj=f) +def test_large_table_diff...
48a792f9d8dc659f428e9c6f0e9e9964a1b60682
7eac388cd073eb50f44afac72ae90c244bb390c2
1,708,338,390,000
v5.3
[{"astropy/timeseries/periodograms/lombscargle/tests/test_statistics.py::test_distribution[False-True-log]": {"base": 0.02040262147784233, "head": 0.02043941244482994}, "astropy/units/tests/test_quantity_decorator.py::test_kwarg_default[7-1]": {"base": 0.013669546693563461, "head": 0.013565678149461746}}, {"astropy/tim...
[ "astropy/timeseries/periodograms/lombscargle/tests/test_statistics.py::test_distribution[False-True-log]", "astropy/units/tests/test_quantity_decorator.py::test_kwarg_default[7-1]" ]
{"astropy/utils/diff.py": ["report_diff_values"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/utils/diff.py': ['report_diff_values']} The following conditions apply: 1. Acceleration of at least one objective fun...
{"astropy/units/decorators.py": ["as_decorator", "wrapper"], "astropy/timeseries/periodograms/lombscargle/core.py": ["LombScargle.distribution", "LombScargle", "LombScargle.autopower"], "astropy/units/quantity.py": ["Quantity.unit"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/units/decorators.py': ['as_decorator', 'wrapper'], 'astropy/timeseries/periodograms/lombs...
0.0045
astropy/astropy
astropy__astropy-16058
diff --git a/astropy/units/core.py b/astropy/units/core.py index cea03dba2957..5abb68f477f0 100644 --- a/astropy/units/core.py +++ b/astropy/units/core.py @@ -20,6 +20,7 @@ from .utils import ( is_effectively_unity, resolve_fractions, + sanitize_power, sanitize_scale, validate_power, ) @@ -2340...
diff --git a/astropy/units/tests/test_units.py b/astropy/units/tests/test_units.py index f18fbc54d088..81babbe52f08 100644 --- a/astropy/units/tests/test_units.py +++ b/astropy/units/tests/test_units.py @@ -34,7 +34,7 @@ def test_initialisation(): assert u.Unit() == u.dimensionless_unscaled -def test_invalid_p...
5d774502db2d02898824ca83c30873c33fac9fc7
8dfbb0ffa1f18c6d89417e3120ec6cf1e04662c0
1,708,125,415,000
v5.3
[{"astropy/timeseries/periodograms/lombscargle/tests/test_lombscargle.py::test_nterms_methods[psd-4-full-True-False-fastchi2]": {"base": 0.010996721684932709, "head": 0.010914668440818787}}, {"astropy/timeseries/periodograms/lombscargle/tests/test_lombscargle.py::test_nterms_methods[psd-4-full-True-False-fastchi2]": {"...
[ "astropy/timeseries/periodograms/lombscargle/tests/test_lombscargle.py::test_nterms_methods[psd-4-full-True-False-fastchi2]" ]
{"astropy/units/core.py": ["CompositeUnit.__init__", "CompositeUnit._expand_and_gather"], "astropy/units/utils.py": ["validate_power", "maybe_simple_fraction"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/units/core.py': ['CompositeUnit.__init__', 'CompositeUnit._expand_and_gather'], 'astropy/units/utils.py': ['validate_...
{"astropy/timeseries/periodograms/lombscargle/core.py": ["LombScargle.power", "LombScargle"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/timeseries/periodograms/lombscargle/core.py': ['LombScargle.power', 'LombScargle']}) The ...
0.001
astropy/astropy
astropy__astropy-15948
diff --git a/astropy/utils/masked/core.py b/astropy/utils/masked/core.py index 1ce1b94aa994..4a539c6588c9 100644 --- a/astropy/utils/masked/core.py +++ b/astropy/utils/masked/core.py @@ -902,8 +902,8 @@ def __array_function__(self, function, types, args, kwargs): except NotImplementedError: ...
954302f3a01c77c7294bb488eb742ca3d59b264b
13411bd55df14f979e5aaf17738f21df739121f9
1,706,178,125,000
v5.3
[{"astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-1-False-1]": {"base": 0.004694182425737381, "head": 0.0042813606560230255}}, {"astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-1-False-1]": {"base": 0.0317435599863529...
[ "astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-1-False-1]" ]
{"astropy/utils/masked/core.py": ["MaskedNDArray.__array_function__"], "astropy/utils/masked/function_helpers.py": ["sort_complex", "quantile", "where", "ptp", "broadcast_arrays", "outer", "concatenate", "array2string", "piecewise", "interp", "lexsort", "nan_to_num", "masked_nanfunc.nanfunc", "median", "msort", "array_...
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/utils/masked/core.py': ['MaskedNDArray.__array_function__'], 'astropy/utils/masked/function_helpers.py': ['sort_compl...
{"astropy/timeseries/periodograms/lombscargle/implementations/utils.py": ["trig_sum"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/timeseries/periodograms/lombscargle/implementations/utils.py': ['trig_sum']}) The followi...
0.431
astropy/astropy
astropy__astropy-15710
diff --git a/astropy/units/quantity_helper/function_helpers.py b/astropy/units/quantity_helper/function_helpers.py index 8deb80e28a6f..a85a23468ec6 100644 --- a/astropy/units/quantity_helper/function_helpers.py +++ b/astropy/units/quantity_helper/function_helpers.py @@ -47,7 +47,7 @@ dimensionless_unscaled, ) fr...
diff --git a/astropy/units/tests/test_quantity_non_ufuncs.py b/astropy/units/tests/test_quantity_non_ufuncs.py index 36a6c5cee8b8..4313bf924606 100644 --- a/astropy/units/tests/test_quantity_non_ufuncs.py +++ b/astropy/units/tests/test_quantity_non_ufuncs.py @@ -24,6 +24,13 @@ NUMPY_LT_2_0, ) +VAR_POSITIONAL = ...
c80869eac212253e4297459ea8c6665435d90d88
32bed2cde01098bddd145441e5ec5f7b7b0d8661
1,702,291,714,000
v5.3
[{"astropy/utils/tests/test_data.py::test_update_parallel": {"base": 0.05267048999667168, "head": 0.04074122756719589}}, {"astropy/utils/tests/test_data.py::test_update_parallel": {"base": 0.04143894836306572, "head": 0.041941702365875244}}, {"astropy/utils/tests/test_data.py::test_update_parallel": {"base": 0.04756402...
[ "astropy/utils/tests/test_data.py::test_update_parallel" ]
{"astropy/units/quantity_helper/function_helpers.py": ["outer", "unstructured_to_structured", "choose", "einsum", "histogram_bin_edges", "matrix_rank", "nanmedian", "array_str", "unwrap", "histogram", "unique", "histogram2d", "cross_like", "setcheckop", "histogramdd"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/units/quantity_helper/function_helpers.py': ['outer', 'unstructured_to_structured', 'choose', 'einsum', 'histogram_bi...
{"astropy/utils/data.py": ["get_file_contents", "get_pkg_data_filename", "download_file", "check_download_cache"], "astropy/config/configuration.py": ["ConfigItem.set"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/utils/data.py': ['get_file_contents', 'get_pkg_data_filename', 'download_file', 'check_do...
0.009
astropy/astropy
astropy__astropy-15228
diff --git a/astropy/units/quantity_helper/function_helpers.py b/astropy/units/quantity_helper/function_helpers.py index 47cd662f3fdf..908844c13dbe 100644 --- a/astropy/units/quantity_helper/function_helpers.py +++ b/astropy/units/quantity_helper/function_helpers.py @@ -82,7 +82,7 @@ np.isposinf, np.isneginf, np.i...
diff --git a/astropy/units/tests/test_quantity_non_ufuncs.py b/astropy/units/tests/test_quantity_non_ufuncs.py index cc96024c14c9..ed27f764210b 100644 --- a/astropy/units/tests/test_quantity_non_ufuncs.py +++ b/astropy/units/tests/test_quantity_non_ufuncs.py @@ -1006,8 +1006,15 @@ def test_nanargmax(self): def tes...
1d11e15e73fbe5b5f39612611da740c9489c2833
42d12de648e2232856079e9bc4a756f2bd716827
1,692,920,102,000
5.2
[{"astropy/timeseries/periodograms/lombscargle/tests/test_lombscargle.py::test_nterms_methods[psd-4-none-True-False-fastchi2]": {"base": 0.01116998866200447, "head": 0.011310148984193802}}, {"astropy/timeseries/periodograms/lombscargle/tests/test_lombscargle.py::test_nterms_methods[psd-4-none-True-False-fastchi2]": {"b...
[ "astropy/timeseries/periodograms/lombscargle/tests/test_lombscargle.py::test_nterms_methods[psd-4-none-True-False-fastchi2]" ]
{}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {} The following conditions apply: 1. Acceleration of at least one objective function is sufficient for success, as performance...
{"astropy/timeseries/periodograms/lombscargle/core.py": ["LombScargle.power", "LombScargle"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/timeseries/periodograms/lombscargle/core.py': ['LombScargle.power', 'LombScargle']}) The ...
0.005
astropy/astropy
astropy__astropy-14590
diff --git a/astropy/utils/masked/core.py b/astropy/utils/masked/core.py index 8a634cb148b2..24eb3d5c9542 100644 --- a/astropy/utils/masked/core.py +++ b/astropy/utils/masked/core.py @@ -671,20 +671,35 @@ def __ne__(self, other): ) return result.any(axis=-1) - def _combine_masks(self, masks, out=...
diff --git a/astropy/utils/masked/tests/test_functions.py b/astropy/utils/masked/tests/test_functions.py index 822990e5cb11..b6413cec0b4f 100644 --- a/astropy/utils/masked/tests/test_functions.py +++ b/astropy/utils/masked/tests/test_functions.py @@ -11,6 +11,7 @@ from astropy import units as u from astropy.units i...
5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5
5e1cca7b8574dbf6fa9b43d1bac7b548465910ca
1,679,961,455,000
5.1
[{"astropy/nddata/tests/test_ccddata.py::test_initialize_from_fits_with_extension": {"base": 0.01874052733182907, "head": 0.020021896809339523}, "astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-2-False-0]": {"base": 0.043997883796691895, "head": 0.016646772623062134}, ...
[ "astropy/nddata/tests/test_ccddata.py::test_initialize_from_fits_with_extension", "astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-2-False-0]", "astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-2-True-0]", "as...
{"astropy/utils/masked/core.py": ["MaskedNDArray._combine_masks", "MaskedNDArray.__array_ufunc__"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/utils/masked/core.py': ['MaskedNDArray._combine_masks', 'MaskedNDArray.__array_ufunc__']} The following conditions ap...
{"astropy/io/fits/hdu/hdulist.py": ["HDUList", "HDUList.writeto"], "astropy/io/fits/hdu/image.py": ["PrimaryHDU", "ImageHDU"], "astropy/nddata/ccddata.py": ["CCDData.data"], "astropy/timeseries/periodograms/lombscargle/core.py": ["LombScargle.power", "LombScargle"], "astropy/timeseries/periodograms/lombscargle/implemen...
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/io/fits/hdu/hdulist.py': ['HDUList', 'HDUList.writeto'], 'astropy/io/fits/hdu/image.py': ...
0.013
astropy/astropy
astropy__astropy-14413
diff --git a/astropy/units/format/console.py b/astropy/units/format/console.py index 491833e53d6f..8bac8ee237a3 100644 --- a/astropy/units/format/console.py +++ b/astropy/units/format/console.py @@ -17,7 +17,7 @@ class Console(base.Base): >>> import astropy.units as u >>> print(u.Ry.decompose().to_strin...
diff --git a/astropy/units/tests/test_format.py b/astropy/units/tests/test_format.py index 51ec90de9cb1..e18af542247f 100644 --- a/astropy/units/tests/test_format.py +++ b/astropy/units/tests/test_format.py @@ -425,38 +425,55 @@ def test_latex_scale(): def test_latex_inline_scale(): fluxunit = u.Unit(1.0e-24 * ...
34d79ea59b3ba25820dfe7fc9782e9014826e8b0
5f40d646f58045c48f5ccab9cbf97c61c05f145c
1,676,683,024,000
5.1
[{"astropy/units/tests/test_quantity_annotations.py::test_args3[angle-angle]": {"base": 0.012401334941387177, "head": 0.012419264763593674}}, {"astropy/units/tests/test_quantity_annotations.py::test_args3[angle-angle]": {"base": 0.01232319325208664, "head": 0.01419893279671669}}, {"astropy/units/tests/test_quantity_ann...
[ "astropy/units/tests/test_quantity_annotations.py::test_args3[angle-angle]" ]
{"astropy/units/format/console.py": ["Console.to_string", "Console.format_exponential_notation"], "astropy/units/format/latex.py": ["Latex.to_string"], "astropy/units/format/unicode_format.py": ["Unicode.format_exponential_notation", "Unicode._format_superscript"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/units/format/console.py': ['Console.to_string', 'Console.format_exponential_notation'], 'astropy/units/format/latex.p...
{"astropy/units/quantity.py": ["Quantity.unit"], "astropy/units/decorators.py": ["as_decorator", "wrapper"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/units/quantity.py': ['Quantity.unit'], 'astropy/units/decorators.py': ['as_decorator', 'w...
0.007
astropy/astropy
astropy__astropy-13817
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e22dce3deb41..b7c9291ef07e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,6 +72,11 @@ repos: args: ["--py38-plus"] exclude: ".*(extern.*|_parsetab.py|_lextab.py)$" + - repo: https://github.com/asottile/y...
diff --git a/astropy/conftest.py b/astropy/conftest.py index 76a42775fa4d..18f3de75afc3 100644 --- a/astropy/conftest.py +++ b/astropy/conftest.py @@ -32,7 +32,7 @@ # Note: while the filterwarnings is required, this import has to come after the # filterwarnings above, because this attempts to import matplotlib: -fr...
d4fc9d9b96f0879c363a8183842e5cf6067fae37
0276d447e2d35421e2f9be2f8a4d66dc60ff1365
1,665,347,358,000
5.0
[{"astropy/timeseries/periodograms/lombscargle/tests/test_statistics.py::test_distribution[True-True-model]": {"base": 0.024063903838396072, "head": 0.021966375410556793}}, {"astropy/timeseries/periodograms/lombscargle/tests/test_statistics.py::test_distribution[True-True-model]": {"base": 0.02246801182627678, "head": ...
[ "astropy/timeseries/periodograms/lombscargle/tests/test_statistics.py::test_distribution[True-True-model]" ]
{"astropy/io/misc/asdf/connect.py": ["asdf_identify"], "astropy/modeling/functional_models.py": ["Voigt1D.evaluate", "Voigt1D.__init__", "Voigt1D.fit_deriv", "Voigt1D._hum2zpf16c"], "astropy/stats/jackknife.py": ["jackknife_resampling"], "astropy/wcs/wcs.py": ["WCS.reorient_celestial_first"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/io/misc/asdf/connect.py': ['asdf_identify'], 'astropy/modeling/functional_models.py': ['Voigt1D.evaluate', 'Voigt1D._...
{"astropy/timeseries/periodograms/lombscargle/core.py": ["LombScargle.distribution", "LombScargle", "LombScargle.autopower"], "astropy/units/quantity.py": ["CODATA2018.to_value"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/timeseries/periodograms/lombscargle/core.py': ['LombScargle.distribution', 'LombScargle',...
0.002
astropy/astropy
astropy__astropy-13745
diff --git a/astropy/coordinates/angles.py b/astropy/coordinates/angles.py index 8e3f56abd266..a78efbf04f58 100644 --- a/astropy/coordinates/angles.py +++ b/astropy/coordinates/angles.py @@ -587,7 +587,7 @@ def _validate_angles(self, angles=None): if angles.unit is u.deg: limit = 90 elif ...
diff --git a/astropy/coordinates/tests/test_angles.py b/astropy/coordinates/tests/test_angles.py index b44e7492269b..4ee4bf566fa7 100644 --- a/astropy/coordinates/tests/test_angles.py +++ b/astropy/coordinates/tests/test_angles.py @@ -1092,3 +1092,54 @@ def test_str_repr_angles_nan(cls, input, expstr, exprepr): # ...
0446f168dc6e34996482394f00770b52756b8f9c
4d0ededa242a4f59149abcbd03d6030521f4d25c
1,663,934,087,000
5.0
[{"astropy/table/tests/test_operations.py::TestHStack::test_stack_basic[Table]": {"base": 0.015155822038650513, "head": 0.01496456190943718}}, {"astropy/table/tests/test_operations.py::TestHStack::test_stack_basic[Table]": {"base": 0.015163354575634003, "head": 0.014745045453310013}}, {"astropy/table/tests/test_operati...
[ "astropy/table/tests/test_operations.py::TestHStack::test_stack_basic[Table]" ]
{"astropy/coordinates/angles.py": ["Latitude._validate_angles"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/coordinates/angles.py': ['Latitude._validate_angles']} The following conditions apply: 1. Acceleration of at least on...
{"astropy/table/table.py": ["Table.masked", "Table.pformat"], "astropy/table/operations.py": ["hstack"], "astropy/io/ascii/fastbasic.py": ["FastBasic.read"], "astropy/io/registry/core.py": ["UnifiedIORegistry.read"], "astropy/io/ascii/core.py": ["Ecsv.read"], "astropy/io/ascii/ui.py": ["read"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/table/table.py': ['Table.masked', 'Table.pformat'], 'astropy/table/operations.py': ['hsta...
0.008
astropy/astropy
astropy__astropy-13734
diff --git a/astropy/io/ascii/fixedwidth.py b/astropy/io/ascii/fixedwidth.py index 876147180f10..a5046b05787f 100644 --- a/astropy/io/ascii/fixedwidth.py +++ b/astropy/io/ascii/fixedwidth.py @@ -92,6 +92,7 @@ def get_cols(self, lines): List of table lines """ + header_rows = getattr(self,...
diff --git a/astropy/io/ascii/tests/test_fixedwidth.py b/astropy/io/ascii/tests/test_fixedwidth.py index 329aaf4e4013..79e2b5135e87 100644 --- a/astropy/io/ascii/tests/test_fixedwidth.py +++ b/astropy/io/ascii/tests/test_fixedwidth.py @@ -498,3 +498,46 @@ def test_fixedwidthnoheader_splitting(): assert np.all(dat[...
9fd247339e51441460b43368d415fced327c97a2
4c7177c1dc9a83f656e89efeeb005e31643e927b
1,663,838,875,000
5.0
[{"astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-2-False-0]": {"base": 0.025120269507169724, "head": 0.015353329479694366}, "astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-2-True-0]": {"base": 0.02413896843791008, "...
[ "astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-2-False-0]", "astropy/timeseries/periodograms/lombscargle/implementations/tests/test_utils.py::test_trig_sum[0.1-2-True-0]" ]
{"astropy/io/ascii/fixedwidth.py": ["FixedWidthTwoLine.__init__", "FixedWidth.__init__", "FixedWidthHeader.get_cols", "FixedWidthData.write"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/io/ascii/fixedwidth.py': ['FixedWidthTwoLine.__init__', 'FixedWidth.__init__', 'FixedWidthHeader.get_cols', 'FixedWid...
{"astropy/timeseries/periodograms/lombscargle/implementations/utils.py": ["trig_sum"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/timeseries/periodograms/lombscargle/implementations/utils.py': ['trig_sum']}) The followi...
0.04
astropy/astropy
astropy__astropy-13496
diff --git a/astropy/units/core.py b/astropy/units/core.py index 836b99f554b0..91ffd839f75e 100644 --- a/astropy/units/core.py +++ b/astropy/units/core.py @@ -631,6 +631,7 @@ class UnitBase: __array_priority__ = 1000 _hash = None + _type_id = None def __deepcopy__(self, memo): # This may ...
97fe69993ec58bdbd9e4ba680ca263aa54666d64
452c6d0a9d1c61550cf9df4e9505d820490abd94
1,658,756,100,000
5.0
[{"astropy/coordinates/tests/test_sky_coord.py::test_coord_init_unit": {"base": 0.01725669950246811, "head": 0.015307102352380753}, "astropy/coordinates/tests/test_spectral_coordinate.py::test_create_from_spectral_coord[observer4-target2]": {"base": 0.020268350839614868, "head": 0.017556000500917435}, "astropy/units/te...
[ "astropy/coordinates/tests/test_sky_coord.py::test_coord_init_unit", "astropy/coordinates/tests/test_spectral_coordinate.py::test_create_from_spectral_coord[observer4-target2]", "astropy/units/tests/test_units.py::test_complex_compose" ]
{"astropy/units/core.py": ["UnitBase.__getstate__", "UnitBase._get_physical_type_id"]}
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: {'astropy/units/core.py': ['UnitBase.__getstate__', 'UnitBase._get_physical_type_id']} The following conditions apply: 1. Accel...
{"astropy/coordinates/spectral_quantity.py": ["SpectralCoord.doppler_convention", "SpectralCoord.doppler_rest"], "astropy/coordinates/sky_coordinate.py": ["SkyCoord"], "astropy/units/quantity.py": ["allclose"], "astropy/coordinates/baseframe.py": ["Galactic.transform_to", "ICRS.transform_to"], "astropy/coordinates/spec...
Please enhance the computational efficiency and execution speed across the entire repository. The optimization efforts may target one or more objective functions, including but not limited to: defaultdict(<class 'list'>, {'astropy/coordinates/spectral_quantity.py': ['SpectralCoord.doppler_convention', 'SpectralCoord.do...
0.087
End of preview. Expand in Data Studio
SWE-Perf

SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?

Paper | Code | Project Page

Dataset Summary

Optimizing code performance is paramount in software engineering, yet it remains a largely unexplored frontier for Large Language Models (LLMs). While models excel at fixing bugs, their ability to make code faster at a repository-scale is not well understood.

To address this, we introduce SWE-Perf, the first benchmark meticulously designed to evaluate LLMs on performance optimization tasks within genuine, complex repository contexts. Unlike benchmarks that focus on isolated code snippets, SWE-Perf challenges models to understand and modify entire codebases. The benchmark comprises 140 instances, each derived from a real performance-improving pull request on a popular GitHub repository. For each instance, a model is provided with the full source code, the target functions, and the human expert's solution for reference. The core task is to generate a code patch that reduces the test's execution time without introducing bugs.

The dataset was released as part of SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?

Languages

The dataset only contains natural language in English and programming language in Python.

How to use it

from datasets import load_dataset
ds = load_dataset("SWE-Perf/SWE-Perf")
for sample in iter(ds): 
    print(sample)

Dataset Structure

Data Fields

  • repo (string): The repository owner/name identifier from GitHub.
  • instance_id (string): A formatted instance identifier, usually as repo_owner__repo_name-PR-number.
  • patch (string): The gold patch (minus test-related code) that resolved the issue.
  • test_patch (string): The test-file patch contributed by the solution PR.
  • base_commit (string): The commit hash before applying the solution PR.
  • head_commit (string): The commit hash after applying the solution PR.
  • created_at (string): The creation date of the pull request.
  • version (string): Installation version for evaluation.
  • duration_changes (List[dict]): Runtimes for base and head commit.
  • efficiency_test (List[string]): Performance-related unit tests.
  • patch_functions (string): Functions modified in the code patch.
  • problem_statement_oracle (Dict[list]): Problem description (oracle version).
  • test_functions (string): Functions modified in unit tests.
  • problem_statement_realistic (Dict[list]): Problem description (realistic version).
  • human_performance (float): Human performance metrics on the task.

Data Splits

The dataset has no splits, and all data is loaded as test split by default.

Citation Information

@article{he2025sweperf,
    title={SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?},
    author={He, Xinyi and Liu, Qian and Du, Mingzhe and Yan, Lin and Fan, Zhijie and Huang, Yiming and Yuan, Zejian and Ma, Zejun},
    journal={arXiv preprint arXiv:2507.12415},
    year={2025}
}
Downloads last month
452

Paper for SWE-Perf/SWE-Perf