selection_rank int64 0 10k | uid stringlengths 17 29 | source stringclasses 7
values | split stringclasses 3
values | row_idx int64 0 58.9k | instance_id stringlengths 14 120 | repo stringclasses 246
values | repo_canon stringclasses 232
values | language stringclasses 8
values | base_commit stringlengths 40 40 ⌀ | problem_statement stringlengths 84 23.6k | extra_context stringclasses 626
values | hints stringlengths 0 59.3k | patch stringlengths 252 175k | test_patch stringlengths 0 358k | f2p stringlengths 10 155k ⌀ | p2p stringlengths 2 1.75M ⌀ | env_image stringlengths 41 154 ⌀ | env_available bool 1
class | created_at stringlengths 10 20 ⌀ | n_src_files int64 1 15 | src_lines int64 1 1.48k | n_f2p float64 1 1.87k ⌀ | ps_chars int64 84 23.6k | leak_ratio float64 0 0.6 | s_prior float64 0.6 1 | s_verif float64 0.75 1 | s_ps float64 0.04 1 | s_patch float64 0.07 1 | s_tiebreak float64 0.02 1 | score float64 47.9 98.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,100 | swe_gym::train::2166 | swe_gym | train | 2,166 | Project-MONAI__MONAI-4709 | Project-MONAI/MONAI | project-monai/monai | python | def0d9099c961684facc0b0554e29ce8a2ce69eb | pickling data doesn't include all metatensor properties such as `is_batch`
**Describe the bug**
```py
>>> import io
>>> buf = io.BytesIO()
>>> t = MetaTensor([0.0, 0.0])
>>> t.is_batch = True
>>> from multiprocessing.reduction import ForkingPickler
>>> ForkingPickler(buf).dump(t)
>>> obj = ForkingPickler.loads(buf.getv... | diff --git a/monai/data/__init__.py b/monai/data/__init__.py
--- a/monai/data/__init__.py
+++ b/monai/data/__init__.py
@@ -113,22 +113,17 @@
from multiprocessing.reduction import ForkingPickler
def _rebuild_meta(cls, storage, metadata):
- storage_offset, size, stride, meta_obj, applied_operations = m... | diff --git a/tests/test_meta_tensor.py b/tests/test_meta_tensor.py
--- a/tests/test_meta_tensor.py
+++ b/tests/test_meta_tensor.py
@@ -107,7 +107,6 @@ def check(
# check meta and affine are equal and affine is on correct device
if isinstance(orig, MetaTensor) and isinstance(out, MetaTensor) and meta:
... | ["tests/test_meta_tensor.py::TestMetaTensor::test_multiprocessing_0", "tests/test_meta_tensor.py::TestMetaTensor::test_multiprocessing_2", "tests/test_meta_tensor.py::TestMetaTensor::test_multiprocessing_3", "tests/test_meta_tensor.py::TestMetaTensor::test_multiprocessing_4", "tests/test_meta_tensor.py::TestMetaTensor:... | ["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_dataset_4", "tests/test_meta_tensor.py::TestMetaTensor::test_decollate_0", "tests/test_meta_tensor.py::TestMetaTensor:... | null | true | 2022-07-15T14:00:23Z | 5 | 72 | 6 | 897 | 0 | 0.85 | 1 | 0.55 | 0.85 | 0.3895 | 76.931 | ||
2,101 | swe_gym::train::2290 | swe_gym | train | 2,290 | Project-MONAI__MONAI-5640 | Project-MONAI/MONAI | project-monai/monai | python | 025c10751a1be596b3be9d0b64bb095e653804c3 | More robust `is_supported_format` suffix check
**Is your feature request related to a problem? Please describe.**
Sometimes the data I receive have uppercase suffixes (e.g., IMAGE.PNG), this could be recognized as the lowercase counterpart.
**Describe the solution you'd like**
Simply change this line
https://github.co... | Thanks, a PR would be great! | diff --git a/monai/data/utils.py b/monai/data/utils.py
--- a/monai/data/utils.py
+++ b/monai/data/utils.py
@@ -1099,8 +1099,8 @@ def is_supported_format(filename: Union[Sequence[PathLike], PathLike], suffixes:
"""
filenames: Sequence[PathLike] = ensure_tuple(filename)
for name in filenames:
- toke... | diff --git a/tests/test_is_supported_format.py b/tests/test_is_supported_format.py
--- a/tests/test_is_supported_format.py
+++ b/tests/test_is_supported_format.py
@@ -27,9 +27,11 @@
TEST_CASE_6 = [{"filename": "1.3.12.2.1107.5.4.4.145.nii.gz", "suffixes": ["nii.gz"]}, True]
+TEST_CASE_7 = [{"filename": "test.PNG",... | ["tests/test_is_supported_format.py::TestIsSupportedFormat::test_value_6"] | ["tests/test_is_supported_format.py::TestIsSupportedFormat::test_value_4", "tests/test_is_supported_format.py::TestIsSupportedFormat::test_value_2", "tests/test_is_supported_format.py::TestIsSupportedFormat::test_value_0", "tests/test_is_supported_format.py::TestIsSupportedFormat::test_value_1", "tests/test_is_supporte... | null | true | 2022-12-03T14:00:39Z | 1 | 4 | 1 | 600 | 0 | 0.85 | 1 | 0.55 | 0.8 | 0.113333 | 76.915 | |
2,102 | swe_bench_verified::test::423 | swe_bench_verified | test | 423 | sphinx-doc__sphinx-9698 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | f050a7775dfc9000f55d023d36d925a8d02ccfa8 | An index entry with parens was registered for `py:method` directive with `:property:` option
### Describe the bug
An index entry with parens was registered for `py:method` directive with `:property:` option. It should not have parens.
### How to Reproduce
```
# index.rst
.. py:method:: Foo.bar
:property:
.. py:... | diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -796,7 +796,7 @@ def get_index_text(self, modname: str, name_cls: Tuple[str, str]) -> str:
if 'classmethod' in self.options:
return _('%s() (%s class method)') % (methn... | diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py
--- a/tests/test_domain_py.py
+++ b/tests/test_domain_py.py
@@ -756,7 +756,7 @@ def test_pymethod_options(app):
# :property:
assert_node(doctree[1][1][8], addnodes.index,
- entries=[('single', 'meth5() (Class property)', 'Class.me... | ["tests/test_domain_py.py::test_pymethod_options"] | ["tests/test_domain_py.py::test_function_signatures", "tests/test_domain_py.py::test_domain_py_xrefs", "tests/test_domain_py.py::test_domain_py_xrefs_abbreviations", "tests/test_domain_py.py::test_domain_py_objects", "tests/test_domain_py.py::test_resolve_xref_for_properties", "tests/test_domain_py.py::test_domain_py_f... | null | true | 2021-10-03T04:04:04Z | 1 | 2 | 1 | 805 | 0 | 1 | 1 | 0.85 | 0.4 | 0.140833 | 76.8975 | ||
2,103 | swe_gym::train::22 | swe_gym | train | 22 | getmoto__moto-4986 | getmoto/moto | getmoto/moto | python | cf2690ca1e2e23e6ea28defe3e05c198d9581f79 | EKS CreateCluster response encryptionConfig property should be a List/Array
# Description
When using moto server, the `CreateCluster` EKS API, the Cluster response object should contain `encryptionConfig` as a List of at-most-one `EncryptionConfig` maps/objects (as per example here: https://docs.aws.amazon.com/eks/la... | Thanks for raising this @scottaubrey! | diff --git a/moto/eks/models.py b/moto/eks/models.py
--- a/moto/eks/models.py
+++ b/moto/eks/models.py
@@ -113,7 +113,7 @@ def __init__(
encryption_config=None,
):
if encryption_config is None:
- encryption_config = dict()
+ encryption_config = []
if tags is None:
... | diff --git a/tests/terraform-tests.success.txt b/tests/terraform-tests.success.txt
--- a/tests/terraform-tests.success.txt
+++ b/tests/terraform-tests.success.txt
@@ -75,6 +75,7 @@ TestAccAWSEcrRepositoryPolicy
TestAccAWSEFSAccessPoint
TestAccAWSEFSMountTarget
TestAccAWSEgressOnlyInternetGateway
+TestAccAWSEksCluste... | ["tests/test_eks/test_server.py::test_eks_describe_existing_cluster"] | ["tests/test_eks/test_server.py::test_eks_create_multiple_clusters_with_same_name", "tests/test_eks/test_server.py::test_eks_delete_cluster", "tests/test_eks/test_server.py::test_eks_list_nodegroups", "tests/test_eks/test_server.py::test_eks_delete_nonexisting_cluster", "tests/test_eks/test_server.py::test_eks_create_s... | null | true | 2022-03-29 21:59:46 | 1 | 2 | 1 | 2,502 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.423667 | 76.896 | |
2,104 | swe_gym::train::884 | swe_gym | train | 884 | iterative__dvc-1944 | iterative/dvc | iterative/dvc | python | 27bf6e292826305129e4c3e0c4418e45b45e535b | dvc metrics show - implement jsonpath-ng instead of python-jsonpath-rw
Hello,
For passing JSONPath to ``dvc metrics show`` is it possible to use [jsonpath-ng](https://github.com/h2non/jsonpath-ng) under the hood instead of [python-jsonpath-rw](https://github.com/kennknowles/python-jsonpath-rw)?
``jsonpath-ng`` seems ... | Hi @brbarkley !
Great question! I don't quite remember why we've opted for `python-jsonpath-rw`. Looks like we could simply start using `jsonpath-ng` instead and we should be fine as long as tests pass. Would you like to submit a PR? :slightly_smiling_face:
Thanks,
Ruslan | diff --git a/dvc/repo/metrics/show.py b/dvc/repo/metrics/show.py
--- a/dvc/repo/metrics/show.py
+++ b/dvc/repo/metrics/show.py
@@ -4,7 +4,7 @@
import csv
import json
import logging
-from jsonpath_rw import parse
+from jsonpath_ng.ext import parse
from dvc.exceptions import OutputNotFoundError, BadMetricError, NoM... | diff --git a/tests/func/test_metrics.py b/tests/func/test_metrics.py
--- a/tests/func/test_metrics.py
+++ b/tests/func/test_metrics.py
@@ -37,6 +37,35 @@ def setUp(self):
fd.write("branch\n")
fd.write(branch)
+ if branch == "foo":
+ deviation_mse_train = 0.1... | ["tests/func/test_metrics.py::TestMetrics::test_show", "tests/func/test_metrics.py::TestMetricsCLI::test_show"] | ["tests/func/test_metrics.py::TestMetricsRecursive::test", "tests/func/test_metrics.py::TestMetrics::test_formatted_output", "tests/func/test_metrics.py::TestMetrics::test_xpath_is_none", "tests/func/test_metrics.py::TestMetricsType::test_show", "tests/func/test_metrics.py::TestMetricsCLI::test_xpath_all_columns", "tes... | null | true | 2019-04-28T12:37:43Z | 2 | 4 | 2 | 558 | 0 | 0.85 | 1 | 0.55 | 0.8 | 0.106333 | 76.894 | |
2,105 | swe_gym::train::453 | swe_gym | train | 453 | python__mypy-16215 | python/mypy | python/mypy | python | bcd4ff231554102a6698615882074e440ebfc3c9 | mypy does not recognize __qualname__
1. Given Python file `test1.py`
```Python
class A(object):
NAME = __qualname__
```
2. run mypy checking
mypy test1.py
3. **_BUG:_** mypy reports `not defined`
test1.py:2: error: Name '__qualname__' is not defined
The Python interpreter runs the code without err... | Such kind of issues are typically easy to fix. You can look at how `implicit_module_attrs()` are implemented, and do the same for classes. Note however that we are currently migrating to a new semantic analyzer, so the fix should apply to both.
Thanks @ilevkivskyi . I'm curious, why was this Issue labeled "false-posit... | diff --git a/mypy/semanal.py b/mypy/semanal.py
--- a/mypy/semanal.py
+++ b/mypy/semanal.py
@@ -5569,7 +5569,7 @@ def lookup(
if not suppress_errors:
self.name_not_defined(name, ctx)
return None
- # 2. Class attributes (if within class definition)
+ # 2a. Class at... | diff --git a/test-data/unit/check-classes.test b/test-data/unit/check-classes.test
--- a/test-data/unit/check-classes.test
+++ b/test-data/unit/check-classes.test
@@ -8001,3 +8001,11 @@ f5(1) # E: Argument 1 to "f5" has incompatible type "int"; expected "Integral"
# N: Types from "numbers" aren't supported for... | ["mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testImplicitClassScopedNames"] | [] | null | true | 2023-10-02T19:28:48Z | 1 | 5 | 1 | 499 | 0 | 0.85 | 1 | 0.55 | 0.8 | 0.099833 | 76.8745 | |
2,106 | swe_bench_promax::test::117 | swe_bench_promax | test | 117 | pypa__pipenv-6373 | pypa/pipenv | pypa/pipenv | python | 29b4197693ad6d02bfe6c5b8034189ae345d35de | Pipenv experiences inconsistent behavior when interacting with virtual environments created under POSIX-like environments running on Windows, such as MSYS2 MinGW or Cygwin. In these contexts, the Python interpreter correctly identifies the underlying OS as Windows (reporting `os.name` as `'nt'`), yet the virtual enviro... | diff --git a/news/6737.bugfix.rst b/news/6737.bugfix.rst
new file mode 100644
--- /dev/null
+++ b/news/6737.bugfix.rst
@@ -0,0 +1,22 @@
+# Improved virtualenv scripts path resolution
+
+## Summary
+
+This PR refactors the logic for determining virtual environment script paths
+by leveraging ``sysconfig``'s built-in mec... | diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
--- a/tests/unit/test_utils.py
+++ b/tests/unit/test_utils.py
@@ -1,10 +1,11 @@
import os
+import sys
from unittest import mock
import pytest
from pipenv.exceptions import PipenvUsageError
-from pipenv.utils import dependencies, indexes, internet,... | null | null | key4127/refactor-dockerhub:pypa__pipenv-6373 | true | 1745224654 | 5 | 94 | null | 3,545 | 0 | 0.9 | 1 | 0.47 | 0.85 | 0.813333 | 76.8725 | ||
2,107 | swe_bench_promax::test::151 | swe_bench_promax | test | 151 | angular__angular-c_6960ec0 | angular/angular | angular/angular | typescript | 4016aa32297ead62376d9d01c522136be0c4592a | During compilation of Angular applications using the ngtsc compiler pipeline, expressions containing ECMAScript template literals—such as interpolated strings like `` `Status: ${value}` ``—trigger a critical failure in the expression translation infrastructure. This occurs when the compiler processes source code contai... | diff --git a/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.ts b/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.ts
--- a/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.ts
+++ b/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.ts
@@ -165,13 +165,17 @@ export class Ba... | diff --git a/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts b/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts
--- a/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts
+++ b/packages/compiler-cli/src/ngtsc/typecheck/test/type_check_block_spec.ts
@@ -1... | null | null | key4127/refactor-dockerhub:angular__angular-c_6960ec0 | true | 1737489893 | 5 | 93 | null | 3,865 | 0 | 0.9 | 1 | 0.47 | 0.85 | 0.81 | 76.8625 | ||
2,108 | swe_gym::train::1034 | swe_gym | train | 1,034 | dask__dask-8525 | dask/dask | dask/dask | python | e4799c0498b5e5877705bb5542d8d01116ee1320 | dask.array.percentile: rename interpolation arg to method
**What happened**:
numpy is renaming arguments for percentile/quantile, for good compatibillity dask should follow numpys example: https://github.com/numpy/numpy/pull/20327 | Thanks for bringing this up @Illviljan! | diff --git a/dask/array/backends.py b/dask/array/backends.py
--- a/dask/array/backends.py
+++ b/dask/array/backends.py
@@ -22,8 +22,8 @@
@percentile_lookup.register(np.ndarray)
-def percentile(a, q, interpolation="linear"):
- return _percentile(a, q, interpolation)
+def percentile(a, q, method="linear"):
+ r... | diff --git a/dask/array/tests/test_cupy_percentile.py b/dask/array/tests/test_cupy_percentile.py
--- a/dask/array/tests/test_cupy_percentile.py
+++ b/dask/array/tests/test_cupy_percentile.py
@@ -15,21 +15,18 @@ def test_percentile():
d = da.from_array(cupy.ones((16,)), chunks=(4,))
qs = np.array([0, 50, 100])... | ["dask/array/tests/test_percentiles.py::test_percentiles_with_empty_arrays[tdigest]", "dask/array/tests/test_percentiles.py::test_percentiles_with_scaler_percentile[5.0_0-dask]", "dask/array/tests/test_percentiles.py::test_percentiles_with_empty_arrays[dask]", "dask/array/tests/test_percentiles.py::test_percentiles_wit... | [] | null | true | 2022-01-03T16:09:44Z | 3 | 112 | 16 | 230 | 0 | 0.85 | 1 | 0.35 | 1 | 0.411667 | 76.86 | |
2,109 | swe_bench_verified::test::408 | swe_bench_verified | test | 408 | sphinx-doc__sphinx-8595 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | b19bce971e82f2497d67fdacdeca8db08ae0ba56 | autodoc: empty __all__ attribute is ignored
**Describe the bug**
autodoc: empty `__all__` attribute is ignored
**To Reproduce**
```
# example.py
__all__ = []
def foo():
"docstring"
def bar():
"docstring"
def baz():
"docstring"
```
```
# index.rst
.. automodule:: example
:members:
```
All foo, bar, a... | diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py
--- a/sphinx/ext/autodoc/__init__.py
+++ b/sphinx/ext/autodoc/__init__.py
@@ -1074,7 +1074,7 @@ def get_module_members(self) -> Dict[str, ObjectMember]:
def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]:
... | diff --git a/tests/roots/test-ext-autodoc/target/empty_all.py b/tests/roots/test-ext-autodoc/target/empty_all.py
new file mode 100644
--- /dev/null
+++ b/tests/roots/test-ext-autodoc/target/empty_all.py
@@ -0,0 +1,16 @@
+"""
+docsting of empty_all module.
+"""
+__all__ = []
+
+
+def foo():
+ """docstring"""
+
+
+def... | ["tests/test_ext_autodoc_automodule.py::test_empty_all"] | [] | null | true | 2020-12-27T03:07:50Z | 1 | 2 | 1 | 627 | 0 | 1 | 1 | 0.85 | 0.4 | 0.111167 | 76.8085 | ||
2,110 | swe_gym::train::326 | swe_gym | train | 326 | getmoto__moto-5119 | getmoto/moto | getmoto/moto | python | 749b543b7c0e041b4fdc2fac01a10784a4b39755 | rds - should not return "DBClusterIdentifier" if the instance is not in a cluster
Creating an issue here in case you can't see the comment on the PR.
When describe_db_instances(), the API implementation should not return "DBClusterIdentifier" property in the JSON if the instance is not in a cluster.
Please see commen... | Thanks for raising this @kentnsw! | diff --git a/moto/rds/models.py b/moto/rds/models.py
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -506,7 +506,7 @@ def to_xml(self):
</VpcSecurityGroupMembership>
{% endfor %}
</VpcSecurityGroups>
- <DBClusterIdentifier>{{ database.db_cluster_identif... | diff --git a/tests/test_rds/test_server.py b/tests/test_rds/test_server.py
--- a/tests/test_rds/test_server.py
+++ b/tests/test_rds/test_server.py
@@ -1,3 +1,4 @@
+import json
import moto.server as server
import sure # noqa # pylint: disable=unused-import
@@ -9,3 +10,19 @@ def test_list_databases():
res = tes... | ["tests/test_rds/test_server.py::test_create_db_instance"] | ["tests/test_rds/test_server.py::test_list_databases"] | null | true | 2022-05-10 22:53:00 | 1 | 4 | 1 | 366 | 0 | 0.85 | 1 | 0.55 | 0.8 | 0.074333 | 76.798 | |
2,111 | swe_gym::train::923 | swe_gym | train | 923 | dask__dask-7191 | dask/dask | dask/dask | python | 2640241fbdf0c5efbcf35d96eb8cc9c3df4de2fd | HighLevelGraph erroneously propagates into local scheduler optimization routines
The latest release of dask has broken prefect, but I think the real issue has persisted earlier and is only exposed now due to a new error path.
Here's an example that fails using raw dask alone:
```python
import dask
class NoGetItem:
... | I can confirm that adding a call to `ensure_dict` in `dask.multiprocessing.get` fixes things. Since we want to be passing high-level graphs to the distributed scheduler, I think having the low-level `get` functions handle this transform if needed makes the most sense. I'll push a PR up later today with a fix.
Thanks fo... | diff --git a/dask/multiprocessing.py b/dask/multiprocessing.py
--- a/dask/multiprocessing.py
+++ b/dask/multiprocessing.py
@@ -11,6 +11,7 @@
from .system import CPU_COUNT
from .local import reraise, get_async # TODO: get better get
from .optimization import fuse, cull
+from .utils import ensure_dict
def _reduc... | diff --git a/dask/tests/test_multiprocessing.py b/dask/tests/test_multiprocessing.py
--- a/dask/tests/test_multiprocessing.py
+++ b/dask/tests/test_multiprocessing.py
@@ -200,6 +200,29 @@ def test_optimize_graph_false():
assert len(keys) == 2
+@requires_cloudpickle
+def test_works_with_highlevel_graph():
+ ... | ["dask/tests/test_multiprocessing.py::test_works_with_highlevel_graph"] | ["dask/tests/test_multiprocessing.py::test_pickle_globals", "dask/tests/test_multiprocessing.py::test_lambda_results_with_cloudpickle", "dask/tests/test_multiprocessing.py::test_remote_exception", "dask/tests/test_multiprocessing.py::test_out_of_band_pickling", "dask/tests/test_multiprocessing.py::test_pickle_locals", ... | null | true | 2021-02-08T22:20:23Z | 1 | 2 | 1 | 2,302 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.390333 | 76.796 | |
2,112 | swe_gym::train::103 | swe_gym | train | 103 | getmoto__moto-4985 | getmoto/moto | getmoto/moto | python | c134afaf60517c773c6b198427c031d9356825e6 | Creating mock AutoScalingGroups doesn't allow string versions for Launch templates
**Environment:**
* Running as a python library
* Moto version: moto==2.2.9
* Boto versions: boto3==1.16.23, botocore==1.19.23
Mock autoscaling assumes that the Launch template versions will always be integers. Both [boto](https://b... | Thanks for raising this @asehra! Will mark it as an enhancement to also support '$LATEST' and '$DEFAULT' | diff --git a/moto/autoscaling/models.py b/moto/autoscaling/models.py
--- a/moto/autoscaling/models.py
+++ b/moto/autoscaling/models.py
@@ -66,18 +66,24 @@ def __init__(
self,
name,
policy_type,
+ metric_aggregation_type,
adjustment_type,
as_name,
+ min_adjustme... | diff --git a/tests/terraform-tests.success.txt b/tests/terraform-tests.success.txt
--- a/tests/terraform-tests.success.txt
+++ b/tests/terraform-tests.success.txt
@@ -10,6 +10,9 @@ TestAccAWSAPIGatewayV2RouteResponse
TestAccAWSAPIGatewayV2VpcLink
TestAccAWSAppsyncApiKey
TestAccAWSAppsyncGraphqlApi
+TestAccAWSAutosca... | ["tests/test_ec2/test_launch_templates.py::test_delete_launch_template__by_id", "tests/test_ec2/test_launch_templates.py::test_delete_launch_template__by_name", "tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_from_template_version__latest", "tests/test_autoscaling/test_autoscaling.py::test_autosca... | ["tests/test_autoscaling/test_autoscaling.py::test_set_instance_health", "tests/test_autoscaling/test_autoscaling.py::test_update_autoscaling_group_max_size_desired_capacity_change", "tests/test_ec2/test_route_tables.py::test_create_route_with_network_interface_id", "tests/test_autoscaling/test_autoscaling.py::test_set... | null | true | 2022-03-29 18:56:32 | 6 | 473 | 7 | 7,125 | 0 | 0.85 | 1 | 0.8 | 0.3825 | 1 | 76.784375 | |
2,113 | swe_gym::train::2393 | swe_gym | train | 2,393 | modin-project__modin-6758 | modin-project/modin | modin-project/modin | python | 93275d9d3bb74158e80489fc9beb2761dd9b2a85 | Preserve dtypes cache on `df[existing_col] = scalar`
It currently loses all dtypes on `.__setitem__()`
```python
import modin.pandas as pd
df = pd.DataFrame({"a": [1, 2, 3], "b": [3, 4, 5]})
df["b"] = 10
# known dtypes: {};
# cols with unknown dtypes: ['a', 'b'];
print(df._query_compiler._modin_frame._dtypes)
``` | diff --git a/modin/core/dataframe/pandas/dataframe/dataframe.py b/modin/core/dataframe/pandas/dataframe/dataframe.py
--- a/modin/core/dataframe/pandas/dataframe/dataframe.py
+++ b/modin/core/dataframe/pandas/dataframe/dataframe.py
@@ -2915,7 +2915,7 @@ def apply_select_indices(
new_index = self.index if ax... | diff --git a/modin/test/storage_formats/pandas/test_internals.py b/modin/test/storage_formats/pandas/test_internals.py
--- a/modin/test/storage_formats/pandas/test_internals.py
+++ b/modin/test/storage_formats/pandas/test_internals.py
@@ -1965,6 +1965,64 @@ class TestZeroComputationDtypes:
Test cases that shouldn'... | ["modin/test/storage_formats/pandas/test_internals.py::TestZeroComputationDtypes::test_preserve_dtypes_setitem[value1-value_dtype1-materialized]", "modin/test/storage_formats/pandas/test_internals.py::TestZeroComputationDtypes::test_preserve_dtypes_setitem[value2-value_dtype2-materialized]", "modin/test/storage_formats... | ["modin/test/storage_formats/pandas/test_internals.py::test_reorder_labels_cache[unbalanced_partitioning-no_reordering-projection_only]", "modin/test/storage_formats/pandas/test_internals.py::TestZeroComputationDtypes::test_preserve_dtypes_setitem[3.5-value_dtype0-unknown]", "modin/test/storage_formats/pandas/test_inte... | null | true | 2023-11-20T14:58:12Z | 4 | 86 | 3 | 316 | 0 | 0.85 | 1 | 0.55 | 0.85 | 0.339333 | 76.7805 | ||
2,114 | swe_gym::train::45 | swe_gym | train | 45 | getmoto__moto-6011 | getmoto/moto | getmoto/moto | python | 8b058d917719ca57c6ae9ac91b00afa88b69a1e4 | get_list_from_ddb_typed_value crashes on missing value
Given update expression `SET #0 = list_append (#0, :0)`, if `#0` refers to a non-existent list, then `get_list_from_ddb_typed_value` crashes on
```python
assert isinstance(node, DDBTypedValue)
```
(since `node` is a `NoneExistingPath` at that point) | Thanks for raising this @ikonst - marking it as a bug. | diff --git a/moto/dynamodb/parsing/validators.py b/moto/dynamodb/parsing/validators.py
--- a/moto/dynamodb/parsing/validators.py
+++ b/moto/dynamodb/parsing/validators.py
@@ -15,6 +15,7 @@
ProvidedKeyDoesNotExist,
EmptyKeyAttributeException,
UpdateHashRangeKeyException,
+ MockValidationException,
)
... | diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
--- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
+++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
@@ -978,3 +978,75 @@ def test_gsi_key_cannot_be_empty():
... | ["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_list_append_errors_for_unknown_attribute_value"] | ["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_gsi_with_wrong_key_attribute_names_throws_exception", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_primary_key", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_creating_table_with_0_local_indexes", "t... | null | true | 2023-03-04 11:40:20 | 1 | 5 | 1 | 304 | 0 | 0.85 | 1 | 0.55 | 0.8 | 0.067333 | 76.777 | |
2,115 | swe_gym::train::2316 | swe_gym | train | 2,316 | Project-MONAI__MONAI-5189 | Project-MONAI/MONAI | project-monai/monai | python | fe60832699448012cfc116dd001a3cdbcae1a0a9 | Optional gradient direction in `SobelGradients`
`SobelGradients` currently calculate the gradients in both horizontal and vertical directions. However, there are use cases that only one of these gradients in required, so it will have redundant computations. It would be nice to be able to set `direction` and calculate t... | diff --git a/monai/transforms/post/array.py b/monai/transforms/post/array.py
--- a/monai/transforms/post/array.py
+++ b/monai/transforms/post/array.py
@@ -14,16 +14,17 @@
"""
import warnings
-from typing import Callable, Iterable, Optional, Sequence, Union
+from typing import Callable, Iterable, Optional, Sequence,... | diff --git a/tests/test_hovernet_loss.py b/tests/test_hovernet_loss.py
--- a/tests/test_hovernet_loss.py
+++ b/tests/test_hovernet_loss.py
@@ -141,17 +141,17 @@ def test_shape_generator(num_classes=1, num_objects=3, batch_size=1, height=5, w
TEST_CASE_3 = [ # batch size of 2, 3 classes with minor rotation of nuclea... | ["tests/test_sobel_gradientd.py::SobelGradientTests::test_sobel_gradients_04", "tests/test_sobel_gradientd.py::SobelGradientTests::test_sobel_gradients_error_5", "tests/test_sobel_gradient.py::SobelGradientTests::test_sobel_gradients_02", "tests/test_sobel_gradient.py::SobelGradientTests::test_sobel_gradients_06", "tes... | ["tests/test_hovernet_loss.py::test_shape_generator", "tests/test_hovernet_loss.py::TestHoverNetLoss::test_shape_0", "tests/test_sobel_gradientd.py::SobelGradientTests::test_sobel_gradients_error_1", "tests/test_hovernet_loss.py::TestHoverNetLoss::test_ill_input_hyper_params_0", "tests/test_hovernet_loss.py::TestHoverN... | null | true | 2022-09-21T15:06:56Z | 2 | 148 | 48 | 354 | 0 | 0.85 | 1 | 0.4 | 1 | 0.552333 | 76.707 | ||
2,116 | swe_bench_promax::test::105 | swe_bench_promax | test | 105 | google__adk-python-c_61adfcd | google/adk-python | google/adk-python | python | 971eafab96af63ac3d625a4a6df0c4f62f4cf30c | During development and maintenance of the ADK codebase, a recurring pattern has been identified across multiple critical configuration pathways: the logic for interpreting whether an environment variable signifies an "enabled" state is duplicated verbatim in several distinct modules. This pattern appears in the Apigee ... | diff --git a/src/google/adk/models/apigee_llm.py b/src/google/adk/models/apigee_llm.py
--- a/src/google/adk/models/apigee_llm.py
+++ b/src/google/adk/models/apigee_llm.py
@@ -27,6 +27,7 @@
from google.genai import types
from typing_extensions import override
+from ..utils.env_utils import is_env_enabled
from .goog... | diff --git a/tests/unittests/utils/test_env_utils.py b/tests/unittests/utils/test_env_utils.py
new file mode 100644
--- /dev/null
+++ b/tests/unittests/utils/test_env_utils.py
@@ -0,0 +1,49 @@
+# Copyright 2025 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file... | null | null | key4127/refactor-dockerhub:google__adk-python-c_61adfcd | true | 1761686325 | 4 | 77 | null | 3,133 | 0 | 0.9 | 1 | 0.47 | 0.85 | 0.756667 | 76.7025 | ||
2,117 | swe_gym::train::1956 | swe_gym | train | 1,956 | bokeh__bokeh-13757 | bokeh/bokeh | bokeh/bokeh | python | 11d9580c4b18e6743b0fb31cd757527e3b414237 | VBox is not working in 3.4.0rc1
### Discussed in https://github.com/bokeh/bokeh/discussions/13742
<div type='discussions-op-text'>
<sup>Originally posted by **GillesFa** March 6, 2024</sup>
Hi,
I have install the following bokeh version:
Python version : 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2... | This appears to be a bug in a validator method (referring to `self.items`)
https://github.com/bokeh/bokeh/blob/8a5a35eb078e386c14b5580a51e8a6673d57d197/src/bokeh/models/layouts.py#L456-L460
@GillesFa can you see if changing to `self.children` in the code above fixes the issue for you? If so, a PR would be appreci... | diff --git a/src/bokeh/models/layouts.py b/src/bokeh/models/layouts.py
--- a/src/bokeh/models/layouts.py
+++ b/src/bokeh/models/layouts.py
@@ -430,7 +430,7 @@ def __init__(self, *args, **kwargs) -> None:
@error(REPEATED_LAYOUT_CHILD)
def _check_repeated_layout_children(self):
- children = [ item["chi... | diff --git a/tests/unit/bokeh/models/test_layouts__models.py b/tests/unit/bokeh/models/test_layouts__models.py
--- a/tests/unit/bokeh/models/test_layouts__models.py
+++ b/tests/unit/bokeh/models/test_layouts__models.py
@@ -22,7 +22,7 @@
from bokeh.plotting import figure
# Module under test
-from bokeh.models.layout... | ["tests/unit/bokeh/models/test_layouts__models.py::test_HBox", "tests/unit/bokeh/models/test_layouts__models.py::test_VBox"] | ["tests/unit/bokeh/models/test_layouts__models.py::test_Row", "tests/unit/bokeh/models/test_layouts__models.py::test_LayoutDOM_css_classes", "tests/unit/bokeh/models/test_layouts__models.py::test_TabPanel_no_tooltip", "tests/unit/bokeh/models/test_layouts__models.py::test_TabPanel_tooltip", "tests/unit/bokeh/models/tes... | null | true | 2024-03-12T02:03:24Z | 1 | 4 | 2 | 6,840 | 0 | 0.85 | 1 | 0.5 | 0.8 | 0.513333 | 76.69 | |
2,118 | swe_gym::train::98 | swe_gym | train | 98 | getmoto__moto-7382 | getmoto/moto | getmoto/moto | python | f9add957c9f8311f7e1aa927de7a83f2cb5adce2 | CloudWatch PutMetricData body compression in botocore 1.34.40+
When running the PutMetricData API call through a boto mock test when the body is gzip compressed a 404 response is returned from the moto mock which raises a botocore.errorfactory.ResourceNotFoundException exception.
Disabling the boto gzip request comp... | Just tried playing with the number of metrics sent and it appears that the body is only compressed when it gets above a certain size.
Setting this line `{"id": f"UserType{x}", "expiration": datetime.datetime.now().timestamp() } for x in range(0, 30)`
to `{"id": f"UserType{x}", "expiration": datetime.datetime.now(... | diff --git a/moto/core/responses.py b/moto/core/responses.py
--- a/moto/core/responses.py
+++ b/moto/core/responses.py
@@ -343,8 +343,6 @@ def setup_class(
if hasattr(self.body, "read"):
self.body = self.body.read()
- raw_body = self.body
-
# https://github.com/getmoto/moto/issue... | diff --git a/tests/test_cloudwatch/test_cloudwatch_boto3.py b/tests/test_cloudwatch/test_cloudwatch_boto3.py
--- a/tests/test_cloudwatch/test_cloudwatch_boto3.py
+++ b/tests/test_cloudwatch/test_cloudwatch_boto3.py
@@ -2,6 +2,7 @@
from datetime import datetime, timedelta, timezone
from decimal import Decimal
from op... | ["tests/test_cloudwatch/test_cloudwatch_boto3.py::test_put_a_ton_of_metric_data"] | ["tests/test_cloudwatch/test_cloudwatch_boto3.py::test_get_metric_data_for_unit", "tests/test_cloudwatch/test_cloudwatch_boto3.py::test_get_metric_data_for_multiple_metrics", "tests/test_cloudwatch/test_cloudwatch_boto3.py::test_put_metric_alarm_with_anomaly_detection", "tests/test_cloudwatch/test_cloudwatch_boto3.py::... | null | true | 2024-02-21 21:04:33 | 1 | 4 | 1 | 6,968 | 0 | 0.85 | 1 | 0.5 | 0.8 | 0.513333 | 76.69 | |
2,119 | swe_gym::train::2133 | swe_gym | train | 2,133 | Project-MONAI__MONAI-2955 | Project-MONAI/MONAI | project-monai/monai | python | c624ffcb51c8417115ff810f52f78956bc414340 | Add `kwargs` to `ToTensor`, `ToNumpy` and `ToCupy`
**Is your feature request related to a problem? Please describe.**
As we are adding more and more args based on `torch` API or `numpy` API, I think we should use `kwargs` directly for future support.
And I will also update the `covert_to_type` utility to convert `dtype... | diff --git a/monai/transforms/utility/array.py b/monai/transforms/utility/array.py
--- a/monai/transforms/utility/array.py
+++ b/monai/transforms/utility/array.py
@@ -33,17 +33,18 @@
)
from monai.transforms.utils_pytorch_numpy_unification import in1d, moveaxis
from monai.utils import (
+ convert_data_type,
c... | diff --git a/tests/test_ensure_type.py b/tests/test_ensure_type.py
--- a/tests/test_ensure_type.py
+++ b/tests/test_ensure_type.py
@@ -25,7 +25,9 @@ def test_array_input(self):
test_datas.append(test_datas[-1].cuda())
for test_data in test_datas:
for dtype in ("tensor", "NUMPY"):
- ... | ["tests/test_to_tensor.py::TestToTensor::test_array_input_1", "tests/test_ensure_type.py::TestEnsureType::test_array_input", "tests/test_ensure_typed.py::TestEnsureTyped::test_array_input", "tests/test_to_tensor.py::TestToTensor::test_array_input_0", "tests/test_to_tensor.py::TestToTensor::test_array_input_2", "tests/t... | ["tests/test_to_numpy.py::TestToNumpy::test_tensor_input", "tests/test_ensure_typed.py::TestEnsureTyped::test_list_tuple", "tests/test_ensure_type.py::TestEnsureType::test_dict", "tests/test_to_tensor.py::TestToTensor::test_single_input_0", "tests/test_ensure_type.py::TestEnsureType::test_single_input", "tests/test_to_... | null | true | 2021-09-15T16:19:51Z | 3 | 145 | 6 | 370 | 0 | 0.85 | 1 | 0.4 | 1 | 0.545 | 76.685 | ||
2,120 | swe_gym::train::894 | swe_gym | train | 894 | iterative__dvc-1857 | iterative/dvc | iterative/dvc | python | 458613b7978726681e1e50c48212b792d3aa1d73 | `dvc remove` and `dvc checkout` fail on broken symlinks
I'm using symlinks (cache is on another drive) and moved the cache directory with `dvc config cache.dir` (also tried changing manually in `.dvc/config`, same effect). When running `dvc checkout` after, it throws the following error:
```ERROR: unexpected error - [... | diff --git a/dvc/remote/local.py b/dvc/remote/local.py
--- a/dvc/remote/local.py
+++ b/dvc/remote/local.py
@@ -129,7 +129,7 @@ def changed_cache_file(self, md5):
def exists(self, path_info):
assert not isinstance(path_info, list)
assert path_info["scheme"] == "local"
- return os.path.exist... | diff --git a/tests/requirements.txt b/tests/requirements.txt
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -13,3 +13,4 @@ collective.checkdocs
black==19.3b0 ; python_version >= '3.6'
flake8
flake8-docstrings
+jaraco.windows==3.9.2
diff --git a/tests/test_checkout.py b/tests/test_checkout.py
--- a/test... | ["tests/test_remove.py::TestRemoveBrokenSymlink::test", "tests/test_checkout.py::TestCheckoutMovedCacheDirWithSymlinks::test"] | ["tests/test_remove.py::TestRemoveDirectory::test", "tests/test_checkout.py::TestGitIgnoreBasic::test", "tests/test_checkout.py::TestCheckoutEmptyDir::test", "tests/test_checkout.py::TestRemoveFilesWhenCheckout::test", "tests/test_remove.py::TestRemoveNonExistentFile::test", "tests/test_checkout.py::TestCheckoutCorrupt... | null | true | 2019-04-09T09:13:07Z | 4 | 54 | 2 | 747 | 0 | 0.85 | 1 | 0.55 | 0.85 | 0.3045 | 76.676 | ||
2,121 | swe_bench_promax::test::83 | swe_bench_promax | test | 83 | bazelbuild__bazel-c_85055a4 | bazelbuild/bazel | bazelbuild/bazel | java | 8cae022d5b8681ca0d68a31ffb7b4cb7a955f1fe | When executing remote analysis cache upload operations—specifically in `UPLOAD` or `DUMP_UPLOAD_MANIFEST_ONLY` modes—the build system currently requires an active directories configuration to determine which portions of the build graph should be serialized. This configuration is typically supplied via the `--experiment... | diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
--- a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
@@ -1266,11 +1266... | diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/serialization/analysis/SkycacheIntegrationTestBase.java b/src/test/java/com/google/devtools/build/lib/skyframe/serialization/analysis/SkycacheIntegrationTestBase.java
--- a/src/test/java/com/google/devtools/build/lib/skyframe/serialization/analysis/Skyca... | null | null | key4127/refactor-dockerhub:bazelbuild__bazel-c_85055a4 | true | 1756413736 | 4 | 207 | null | 3,686 | 0 | 0.9 | 1 | 0.62 | 0.6375 | 1 | 76.660625 | ||
2,122 | swe_gym::train::648 | swe_gym | train | 648 | conan-io__conan-15699 | conan-io/conan | conan-io/conan | python | 953035a5262763a26696e490b5aa35086b3e2311 | [bug] gnu triplet for os=Linux arch=x86 is suboptimal
### Environment Details (include every applicable attribute)
* Operating System+version: ArchLinux current
* Compiler+version: gcc 11.1.0
* Conan version: Current git head ( 1.24.0-1085-g106e54c9 )
* Python version: Python 3.10.1
### Description
The GNU tr... | Can confirm this issue in Conan 2.0.1. The wrong triplet prevents cross-compiling m4/1.4.19 to x86 on Linux. Any updates or work-arounds?
Replying to myself... to work-around this issue, we can override the GNU triplet in a profile for x86:
```
[conf]
tools.gnu:host_triplet=i686-linux-gnu
``` | diff --git a/conan/tools/gnu/get_gnu_triplet.py b/conan/tools/gnu/get_gnu_triplet.py
--- a/conan/tools/gnu/get_gnu_triplet.py
+++ b/conan/tools/gnu/get_gnu_triplet.py
@@ -15,7 +15,7 @@ def _get_gnu_triplet(os_, arch, compiler=None):
"needed for os=Windows")
# Calculate the arch
- ... | diff --git a/conans/test/unittests/tools/gnu/test_triplets.py b/conans/test/unittests/tools/gnu/test_triplets.py
--- a/conans/test/unittests/tools/gnu/test_triplets.py
+++ b/conans/test/unittests/tools/gnu/test_triplets.py
@@ -5,7 +5,7 @@
@pytest.mark.parametrize("os_, arch, compiler, expected_triplet", [
- ["L... | ["conans/test/unittests/tools/gnu/test_triplets.py::test_get_gnu_triplet[Linux-x86-None-i686-linux-gnu]"] | ["conans/test/unittests/tools/gnu/test_triplets.py::test_get_gnu_triplet[Windows-x86-gcc-i686-w64-mingw32]", "conans/test/unittests/tools/gnu/test_triplets.py::test_get_gnu_triplet[tvOS-x86-None-i686-apple-tvos]", "conans/test/unittests/tools/gnu/test_triplets.py::test_get_gnu_triplet[Linux-ppc64-None-powerpc64-linux-g... | null | true | 2024-02-19T09:25:02Z | 1 | 2 | 1 | 1,876 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.319333 | 76.583 | |
2,123 | swe_bench_promax::test::68 | swe_bench_promax | test | 68 | grpc__grpc-go-8779 | grpc/grpc-go | grpc/grpc-go | go | 88ac70352f5ba10ba7c7781b0a5efdb06aaba55f | In xDS-managed service mesh environments, gRPC clients rely on dynamic configuration from the control plane to route RPCs correctly. According to gRFC A81, when a route configuration specifies `auto_host_rewrite: true`, the client must dynamically rewrite the HTTP/2 `:authority` header to match the hostname attribute o... | diff --git a/internal/transport/transport.go b/internal/transport/transport.go
--- a/internal/transport/transport.go
+++ b/internal/transport/transport.go
@@ -574,9 +574,14 @@ type CallHdr struct {
DoneFunc func() // called when the stream is finished
- // Authority is used to explicitly override the `:authority`... | diff --git a/balancer/ringhash/ringhash_e2e_test.go b/balancer/ringhash/ringhash_e2e_test.go
--- a/balancer/ringhash/ringhash_e2e_test.go
+++ b/balancer/ringhash/ringhash_e2e_test.go
@@ -299,9 +299,6 @@ func setupManagementServerAndResolver(t *testing.T) (*e2e.ManagementServer, stri
bc := e2e.DefaultBootstrapContents... | null | null | key4127/refactor-dockerhub:grpc__grpc-go-8779 | true | 1767595826 | 6 | 63 | null | 3,601 | 0 | 0.9 | 1 | 0.47 | 0.85 | 0.71 | 76.5625 | ||
2,124 | swe_bench_promax::test::69 | swe_bench_promax | test | 69 | hugo__gohugoio-13982 | gohugoio/hugo | gohugoio/hugo | go | 18b9b6488bb3667f1d0649de2d2a9a5c6d62ca0a | When multiple content pages containing footnotes are rendered together on a single HTML page—such as a blog index, section listing, or homepage displaying article summaries—a critical conflict arises in the generated footnote anchor identifiers. The Goldmark markdown renderer produces footnote reference links and footn... | diff --git a/docs/data/docs.yaml b/docs/data/docs.yaml
--- a/docs/data/docs.yaml
+++ b/docs/data/docs.yaml
@@ -1238,7 +1238,9 @@ config:
enable: false
superscript:
enable: false
- footnote: true
+ footnote:
+ enable: true
+ enableAutoIDPrefix: false
... | diff --git a/markup/goldmark/goldmark_integration_test.go b/markup/goldmark/goldmark_integration_test.go
--- a/markup/goldmark/goldmark_integration_test.go
+++ b/markup/goldmark/goldmark_integration_test.go
@@ -897,7 +897,7 @@ title: "p1"
---
# HTML comments
-## Simple
+## Simple
<!-- This is a comment -->
... | null | null | key4127/refactor-dockerhub:hugo__gohugoio-13982 | true | 1757733558 | 5 | 61 | null | 4,970 | 0 | 0.9 | 1 | 0.47 | 0.85 | 0.703333 | 76.5425 | ||
2,125 | swe_gym::train::2353 | swe_gym | train | 2,353 | modin-project__modin-6547 | modin-project/modin | modin-project/modin | python | abe20a57b82ae366b2394171d1a7dd50ca1b9cb9 | `df[existing_cols] = df` should compute result dtypes where possible
Example:
```python
import modin.pandas as pd
df = pd.DataFrame([[1,2,3,4], [5,6,7,8]])
print(df._query_compiler._modin_frame.has_materialized_dtypes) # True
df2 = pd.DataFrame([[9,9], [5,5]])
print(df2._query_compiler._modin_frame.has_materialized_... | diff --git a/modin/core/dataframe/pandas/dataframe/dataframe.py b/modin/core/dataframe/pandas/dataframe/dataframe.py
--- a/modin/core/dataframe/pandas/dataframe/dataframe.py
+++ b/modin/core/dataframe/pandas/dataframe/dataframe.py
@@ -2804,6 +2804,7 @@ def apply_select_indices(
col_labels=None,
new_in... | diff --git a/modin/test/storage_formats/pandas/test_internals.py b/modin/test/storage_formats/pandas/test_internals.py
--- a/modin/test/storage_formats/pandas/test_internals.py
+++ b/modin/test/storage_formats/pandas/test_internals.py
@@ -1113,6 +1113,17 @@ def test_setitem_bool_preserve_dtypes():
assert df._query... | ["modin/test/storage_formats/pandas/test_internals.py::test_setitem_unhashable_preserve_dtypes"] | ["modin/test/storage_formats/pandas/test_internals.py::test_reorder_labels_cache[unbalanced_partitioning-no_reordering-projection_only]", "modin/test/storage_formats/pandas/test_internals.py::test_reorder_labels_cache[two_unbalanced_partitions-size_grow-no_reordering]", "modin/test/storage_formats/pandas/test_internals... | null | true | 2023-09-11T14:03:57Z | 8 | 188 | 1 | 451 | 0 | 0.85 | 1 | 0.85 | 0.45 | 0.575167 | 76.538 | ||
2,126 | swe_gym::train::1942 | swe_gym | train | 1,942 | bokeh__bokeh-13404 | bokeh/bokeh | bokeh/bokeh | python | 7eaa973b2f61739db84798b0ad533fc15ebcc8ca | [FEATURE] Transparent use on JupyterHub
### Problem description
While it is possible to write Bokeh code to work successfully behind the JupyterHub proxy, it has two drawbacks:
1. Users need to find and learn the work around.
2. A notebook running on a Hub needs code changes so the same notebook will not run st... | diff --git a/src/bokeh/io/notebook.py b/src/bokeh/io/notebook.py
--- a/src/bokeh/io/notebook.py
+++ b/src/bokeh/io/notebook.py
@@ -22,6 +22,8 @@
# Standard library imports
import json
+import os
+import urllib
from typing import (
TYPE_CHECKING,
Any,
@@ -29,6 +31,7 @@
Literal,
Protocol,
Ty... | diff --git a/tests/unit/bokeh/io/test_notebook__io.py b/tests/unit/bokeh/io/test_notebook__io.py
--- a/tests/unit/bokeh/io/test_notebook__io.py
+++ b/tests/unit/bokeh/io/test_notebook__io.py
@@ -18,11 +18,13 @@
# Standard library imports
import json
+import os
from typing import Any
from unittest.mock import Magi... | ["tests/unit/bokeh/io/test_notebook__io.py::test__update_notebook_url_from_env_4", "tests/unit/bokeh/io/test_notebook__io.py::test__update_notebook_url_from_env_3", "tests/unit/bokeh/io/test_notebook__io.py::test__remote_jupyter_proxy_url_0", "tests/unit/bokeh/io/test_notebook__io.py::test__update_notebook_url_from_env... | ["tests/unit/bokeh/io/test_notebook__io.py::test_show_doc_no_server", "tests/unit/bokeh/io/test_notebook__io.py::test_install_notebook_hook", "tests/unit/bokeh/io/test_notebook__io.py::test__server_url", "tests/unit/bokeh/io/test_notebook__io.py::test__origin_url", "tests/unit/bokeh/io/test_notebook__io.py::Test_push_n... | null | true | 2023-09-30T16:53:26Z | 2 | 100 | 10 | 964 | 0 | 0.85 | 1 | 0.4 | 1 | 0.494 | 76.532 | ||
2,127 | swe_gym::train::576 | swe_gym | train | 576 | python__mypy-9102 | python/mypy | python/mypy | python | 48f2b10d55a7cc8067a4a64c497d1e661b99a707 | New plugin hook: get_function_signature_hook
* Are you reporting a bug, or opening a feature request?
I am proposing a new feature: `get_function_signature_hook`
It works the same way as `get_method_signature_hook`, but for functions.
I needed this while working on `HKT` for `dry-python/returns`: https://github.com/d... | diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py
--- a/mypy/checkexpr.py
+++ b/mypy/checkexpr.py
@@ -56,7 +56,11 @@
from mypy.util import split_module_names
from mypy.typevars import fill_typevars
from mypy.visitor import ExpressionVisitor
-from mypy.plugin import Plugin, MethodContext, MethodSigContext, FunctionC... | diff --git a/test-data/unit/check-custom-plugin.test b/test-data/unit/check-custom-plugin.test
--- a/test-data/unit/check-custom-plugin.test
+++ b/test-data/unit/check-custom-plugin.test
@@ -721,3 +721,12 @@ Cls().attr = "foo" # E: Incompatible types in assignment (expression has type "
[file mypy.ini]
\[mypy]
plug... | ["mypy/test/testcheck.py::TypeCheckSuite::testFunctionSigPluginFile"] | [] | null | true | 2020-07-06T12:35:55Z | 3 | 130 | 1 | 346 | 0 | 0.85 | 1 | 0.4 | 1 | 0.491 | 76.523 | ||
2,128 | swe_gym::train::2097 | swe_gym | train | 2,097 | Project-MONAI__MONAI-3250 | Project-MONAI/MONAI | project-monai/monai | python | 8c0ff376587797aabd2abbdb569fb691880fc094 | plot_2d_or_3d_image with colour
I have my ground truth image with overlaid segmentation. The image is in grayscale and the segmentation is in colour, the two have been blended together and a 2d slice is correctly displayed with `plt.imshow`. I'd like to log this image to tensorboard, for which I use `plot_2d_or_3d_imag... | diff --git a/monai/handlers/tensorboard_handlers.py b/monai/handlers/tensorboard_handlers.py
--- a/monai/handlers/tensorboard_handlers.py
+++ b/monai/handlers/tensorboard_handlers.py
@@ -20,6 +20,7 @@
from monai.visualize import plot_2d_or_3d_image
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_... | diff --git a/tests/test_img2tensorboard.py b/tests/test_img2tensorboard.py
--- a/tests/test_img2tensorboard.py
+++ b/tests/test_img2tensorboard.py
@@ -29,9 +29,10 @@ def test_write_gray(self):
image_axes=(1, 2),
scale_factor=253.0,
)
- assert isinstance(
- summary_ob... | ["tests/test_img2tensorboard.py::TestImg2Tensorboard::test_write_gray"] | ["tests/test_plot_2d_or_3d_image.py::TestPlot2dOr3dImage::test_tb_image_1", "tests/test_plot_2d_or_3d_image.py::TestPlot2dOr3dImage::test_tb_image_0", "tests/test_plot_2d_or_3d_image.py::TestPlot2dOr3dImage::test_tb_image_2", "tests/test_plot_2d_or_3d_image.py::TestPlot2dOr3dImage::test_tb_image_4", "tests/test_plot_2d... | null | true | 2021-11-03T11:36:19Z | 2 | 97 | 1 | 881 | 0 | 0.85 | 1 | 0.4 | 1 | 0.470167 | 76.4605 | ||
2,129 | swe_gym::train::581 | swe_gym | train | 581 | python__mypy-11918 | python/mypy | python/mypy | python | 37886c74fe8b0a40e6427361f3dcb3a9d0d82751 | '"dict" is not subscriptable' error when using a type alias for `dict` in a `.pyi` stub file, with Python <= 3.8
**Bug Report**
This error only occurs when mypy is run using Python <= 3.8. Here is a minimal reproducible example:
```python
_DictReadMapping = dict
class Foo(_DictReadMapping[str, int]): ... # error: "... | (Cc. @JukkaL, @sobolevn, since this is somewhat related to https://github.com/python/typeshed/issues/4820)
Related to https://github.com/python/mypy/pull/11863
I can refactor `TypeAlias` logic after my initial PR is merged 👍 | diff --git a/mypy/semanal.py b/mypy/semanal.py
--- a/mypy/semanal.py
+++ b/mypy/semanal.py
@@ -4085,6 +4085,7 @@ def analyze_type_application(self, expr: IndexExpr) -> None:
name = target.type.fullname
if (alias.no_args and # this avoids bogus errors for already reported aliases
... | diff --git a/test-data/unit/check-generic-alias.test b/test-data/unit/check-generic-alias.test
--- a/test-data/unit/check-generic-alias.test
+++ b/test-data/unit/check-generic-alias.test
@@ -285,3 +285,14 @@ class C(list[int]):
pass
d: type[str]
[builtins fixtures/list.pyi]
+
+
+[case testTypeAliasWithBuiltinLis... | ["mypy/test/testcheck.py::TypeCheckSuite::check-generic-alias.test::testTypeAliasWithBuiltinListAliasInStub"] | [] | null | true | 2022-01-06T08:16:37Z | 1 | 1 | 1 | 1,595 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.269167 | 76.4325 | |
2,130 | swe_bench_promax::test::145 | swe_bench_promax | test | 145 | angular__angular-c_1d3b914 | angular/angular | angular/angular | typescript | ce3ffb1a9c76e15553ee32f3129e9c0922e78234 | When developing reactive applications using the signals primitives provided by `@angular/core/primitives/signals`, developers occasionally encounter scenarios where reading a signal's value within an effect should not establish a reactive dependency. For instance, consider an effect that logs diagnostic information inv... | diff --git a/goldens/public-api/core/primitives/signals/index.api.md b/goldens/public-api/core/primitives/signals/index.api.md
--- a/goldens/public-api/core/primitives/signals/index.api.md
+++ b/goldens/public-api/core/primitives/signals/index.api.md
@@ -172,6 +172,9 @@ export function signalSetFn<T>(node: SignalNode<T... | diff --git a/packages/core/test/bundling/defer/bundle.golden_symbols.json b/packages/core/test/bundling/defer/bundle.golden_symbols.json
--- a/packages/core/test/bundling/defer/bundle.golden_symbols.json
+++ b/packages/core/test/bundling/defer/bundle.golden_symbols.json
@@ -725,6 +725,7 @@
"init_type_checks",
"in... | null | null | key4127/refactor-dockerhub:angular__angular-c_1d3b914 | true | 1741205500 | 4 | 45 | null | 3,306 | 0 | 0.9 | 1 | 0.47 | 0.85 | 0.65 | 76.3825 | ||
2,131 | swe_gym::train::1978 | swe_gym | train | 1,978 | Project-MONAI__MONAI-2530 | Project-MONAI/MONAI | project-monai/monai | python | 17dde67bbf95991b6c7465724e41653d22972449 | Deepgrow `Interaction` is not compatiable with `decollate_batch` for v 0.6.0 (8/July)
**Describe the bug**
In deepgrow tutorial (https://github.com/Project-MONAI/tutorials/blob/master/deepgrow/ignite/train.py#L201), we can see there are two groups of transforms: `pre_transforms` and `click_transforms`, and `click_trans... | diff --git a/monai/apps/deepgrow/interaction.py b/monai/apps/deepgrow/interaction.py
--- a/monai/apps/deepgrow/interaction.py
+++ b/monai/apps/deepgrow/interaction.py
@@ -12,6 +12,7 @@
import torch
+from monai.data import decollate_batch, list_data_collate
from monai.engines import SupervisedEvaluator, Supervised... | diff --git a/tests/test_deepgrow_interaction.py b/tests/test_deepgrow_interaction.py
--- a/tests/test_deepgrow_interaction.py
+++ b/tests/test_deepgrow_interaction.py
@@ -11,17 +11,25 @@
import unittest
+import numpy as np
import torch
from monai.apps.deepgrow.interaction import Interaction
+from monai.apps.de... | ["tests/test_deepgrow_transforms.py::TestAddRandomGuidanced::test_correct_results_0", "tests/test_deepgrow_transforms.py::TestAddInitialSeedPointd::test_correct_results_0", "tests/test_deepgrow_transforms.py::TestFindDiscrepancyRegionsd::test_correct_results_0", "tests/test_deepgrow_interaction.py::TestInteractions::te... | ["tests/test_deepgrow_transforms.py::TestAddGuidanceFromPointsd::test_correct_results_5", "tests/test_deepgrow_transforms.py::TestFetch2DSliced::test_correct_results_0", "tests/test_deepgrow_transforms.py::TestSpatialCropGuidanced::test_correct_results_0", "tests/test_deepgrow_transforms.py::TestAddGuidanceSignald::tes... | null | true | 2021-07-06T09:46:44Z | 2 | 109 | 5 | 459 | 0 | 0.85 | 1 | 0.4 | 1 | 0.439833 | 76.3695 | ||
2,132 | swe_gym::train::478 | swe_gym | train | 478 | python__mypy-16966 | python/mypy | python/mypy | python | 3c87af272cbf7c49699b7508c7f51365da139c05 | Exhaustiveness Checks Fail on Singleton Enums
When an enum only has one value, exhaustiveness checks don't work properly. The reason I want to do this is I am adding a new enum that will grow over time, and want to make sure that when new values are added to the enum, they get handled by downstream code.
**To Reprodu... | Reposting what I posted in #14264 (a duplicate of this issue):
It looks like the bug is specific to pattern-matching; mypy has no problems with this version of the same function using `if/else` idioms (and it will correctly identify the `else` branch as unreachable if you add a call to `reveal_type`):
```python
... | diff --git a/mypy/checkpattern.py b/mypy/checkpattern.py
--- a/mypy/checkpattern.py
+++ b/mypy/checkpattern.py
@@ -202,7 +202,7 @@ def visit_value_pattern(self, o: ValuePattern) -> PatternType:
typ = self.chk.expr_checker.accept(o.expr)
typ = coerce_to_literal(typ)
narrowed_type, rest_type = ... | diff --git a/test-data/unit/check-python310.test b/test-data/unit/check-python310.test
--- a/test-data/unit/check-python310.test
+++ b/test-data/unit/check-python310.test
@@ -1369,6 +1369,27 @@ match m3:
reveal_type(m3) # N: Revealed type is "Tuple[Union[builtins.int, builtins.str]]"
[builtins fixtures/tuple... | ["mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchEnumSingleChoice"] | ["mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchLiteralPatternEnumNegativeNarrowing"] | null | true | 2024-02-29T14:34:13Z | 1 | 2 | 1 | 1,441 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.246833 | 76.3655 | |
2,133 | swe_gym::train::794 | swe_gym | train | 794 | iterative__dvc-3537 | iterative/dvc | iterative/dvc | python | 0c2e4d0b723a7c2f120db751193463b4939303d7 | remote: short-circuit remote size estimation for large remotes
Follow up to #3501
Original comment:
> one more comment (after watching the demo) - I think what we miss here is also some threshold on how "deep" we want to go with the prefix. Let's imagine we have 256M files and we'd like to push a single file. We will... | diff --git a/dvc/remote/base.py b/dvc/remote/base.py
--- a/dvc/remote/base.py
+++ b/dvc/remote/base.py
@@ -845,30 +845,12 @@ def cache_exists(self, checksums, jobs=None, name=None):
if len(checksums) == 1 or not self.CAN_TRAVERSE:
return self._cache_object_exists(checksums, jobs, name)
- ... | diff --git a/tests/unit/remote/test_base.py b/tests/unit/remote/test_base.py
--- a/tests/unit/remote/test_base.py
+++ b/tests/unit/remote/test_base.py
@@ -1,5 +1,6 @@
from unittest import TestCase
+import math
import mock
from dvc.path_info import PathInfo
@@ -76,8 +77,15 @@ def test_cache_exists(path_to_checksu... | ["tests/unit/remote/test_base.py::test_cache_exists"] | ["tests/unit/remote/test_base.py::TestMissingDeps::test", "tests/unit/remote/test_base.py::TestCmdError::test", "tests/unit/remote/test_base.py::test_cache_exists_traverse"] | null | true | 2020-03-26T07:45:34Z | 1 | 85 | 1 | 923 | 0 | 0.85 | 1 | 0.4 | 1 | 0.437167 | 76.3615 | ||
2,134 | swe_gym::train::418 | swe_gym | train | 418 | python__mypy-14926 | python/mypy | python/mypy | python | e07ccde05f5b6813b9770292cbff6967684994e3 | `import` statements under a parametrised protocol results in a crash
**Crash Report & Reproduction**
The following snippet will cause a crash:
```python
import typing as tp
T = tp.TypeVar("T")
class Proto(tp.Protocol[T]):
import urllib
```
```shell
**Traceback**
<file>: error: INTERNAL ERROR -- Please try usi... | I guess the imported module is not supposed to be an "official" member of the protocol, should it? (And that [PEP 544](https://peps.python.org/pep-0544/) does not mention such cases?)
If so, one could silently ignore this member, which should be little effort.
Yeah, I am going to simply ignore all imports. | diff --git a/mypy/nodes.py b/mypy/nodes.py
--- a/mypy/nodes.py
+++ b/mypy/nodes.py
@@ -3083,7 +3083,7 @@ def protocol_members(self) -> list[str]:
for base in self.mro[:-1]: # we skip "object" since everyone implements it
if base.is_protocol:
for name, node in base.names.items():
... | diff --git a/test-data/unit/check-protocols.test b/test-data/unit/check-protocols.test
--- a/test-data/unit/check-protocols.test
+++ b/test-data/unit/check-protocols.test
@@ -3998,3 +3998,27 @@ TF = TypeVar("TF", bound=Foo)
def outer(cls: Type[TF]) -> TF:
reveal_type(test(cls)) # N: Revealed type is "TF`-1"
... | ["mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testProtocolImportNotMember"] | [] | null | true | 2023-03-20T09:41:54Z | 1 | 2 | 1 | 1,413 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.242167 | 76.3515 | |
2,135 | swe_gym::train::604 | swe_gym | train | 604 | conan-io__conan-14296 | conan-io/conan | conan-io/conan | python | a26104a90c1d683956982ede2e6a481e5dbde5e4 | [question] Using Ninja (Multi-Config) with Extending Own CMake Presets Example
### What is your question?
Howdy, I am having troubles getting one of the CMake examples working with Ninja, and I assume I am doing something wrong, but can't for the life of me figure out what.
I have cloned (pulled changes this morning)... | Hi @wayneph01
Thanks for your detailed report.
It is possible that either the example is not prepared or documented for the ``Ninja`` generator, or there might still be some gap in the ``CMakePresets`` generated files.
Just to make sure, I guess that you tried first with the "canonical" generators (Unix Make... | diff --git a/conan/tools/cmake/presets.py b/conan/tools/cmake/presets.py
--- a/conan/tools/cmake/presets.py
+++ b/conan/tools/cmake/presets.py
@@ -268,13 +268,14 @@ def _collect_user_inherits(output_dir, preset_prefix):
if os.path.exists(user_file):
user_json = json.loads(load(user_file))
... | diff --git a/conans/test/integration/toolchains/cmake/test_cmaketoolchain.py b/conans/test/integration/toolchains/cmake/test_cmaketoolchain.py
--- a/conans/test/integration/toolchains/cmake/test_cmaketoolchain.py
+++ b/conans/test/integration/toolchains/cmake/test_cmaketoolchain.py
@@ -406,6 +406,67 @@ def layout(self)... | ["conans/test/integration/toolchains/cmake/test_cmaketoolchain.py::test_cmake_presets_shared_preset"] | ["conans/test/integration/toolchains/cmake/test_cmaketoolchain.py::test_cross_build", "conans/test/integration/toolchains/cmake/test_cmaketoolchain.py::test_cross_build_conf", "conans/test/integration/toolchains/cmake/test_cmaketoolchain.py::test_test_package_layout", "conans/test/integration/toolchains/cmake/test_cmak... | null | true | 2023-07-13T18:57:28Z | 1 | 7 | 1 | 3,521 | 0 | 0.85 | 1 | 0.32 | 1 | 0.523333 | 76.34 | |
2,136 | swe_gym::train::2055 | swe_gym | train | 2,055 | Project-MONAI__MONAI-1961 | Project-MONAI/MONAI | project-monai/monai | python | baca6e0223c296ac97a678607f18ceefd64bb6f9 | Workflow integration of custom events
**Is your feature request related to a problem? Please describe.**
Make Workflow class automatically register given events at construction.
**Describe the solution you'd like**
Allow the Workflow class to receive a list of custom Events that need to be registered with it at constr... | diff --git a/monai/engines/evaluator.py b/monai/engines/evaluator.py
--- a/monai/engines/evaluator.py
+++ b/monai/engines/evaluator.py
@@ -9,7 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from typing import TYPE_CHECKING, Callable, Dict, Iterable, O... | diff --git a/tests/test_ensemble_evaluator.py b/tests/test_ensemble_evaluator.py
--- a/tests/test_ensemble_evaluator.py
+++ b/tests/test_ensemble_evaluator.py
@@ -12,7 +12,7 @@
import unittest
import torch
-from ignite.engine import Events
+from ignite.engine import EventEnum, Events
from monai.engines import En... | ["tests/test_ensemble_evaluator.py::TestEnsembleEvaluator::test_content"] | ["tests/test_handler_garbage_collector.py::TestHandlerGarbageCollector::test_content_1", "tests/test_handler_garbage_collector.py::TestHandlerGarbageCollector::test_content_0", "tests/test_handler_garbage_collector.py::TestHandlerGarbageCollector::test_content_2"] | null | true | 2021-04-07T06:07:06Z | 3 | 97 | 1 | 615 | 0 | 0.85 | 1 | 0.4 | 1 | 0.425833 | 76.3275 | ||
2,137 | swe_gym::train::826 | swe_gym | train | 826 | iterative__dvc-2068 | iterative/dvc | iterative/dvc | python | 1bf8ad1d3d2fb0bb1ccf007cb4fd20f313e47566 | dvc gc: bug of looking for remote path at local machine
My setup:
```
$ dvc version
DVC version: 0.40.1
Python version: 3.7.3
Platform: Linux-4.4.0-43-Microsoft-x86_64-with-debian-stretch-sid
```
See all documentation regarding the bug from [this Discord message](https://discordapp.com/channels/485586884165107732/56340... | diff --git a/dvc/config.py b/dvc/config.py
--- a/dvc/config.py
+++ b/dvc/config.py
@@ -498,7 +498,15 @@ def get_remote_settings(self, name):
>>> get_remote_settings("server")
{'url': 'ssh://localhost/'}
"""
- settings = self.config[self.SECTION_REMOTE_FMT.format(name)]
+ ... | diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py
--- a/tests/func/test_data_cloud.py
+++ b/tests/func/test_data_cloud.py
@@ -235,7 +235,8 @@ def get_oss_url():
class TestDataCloud(TestDvc):
def _test_cloud(self, config, cl):
- cloud = DataCloud(self.dvc, config=config)
+ ... | ["tests/func/test_data_cloud.py::TestRemoteSSHMocked::test", "tests/func/test_data_cloud.py::TestRemoteLOCAL::test", "tests/func/test_data_cloud.py::TestDataCloud::test", "tests/func/test_data_cloud.py::TestRecursiveSyncOperations::test"] | ["tests/func/test_data_cloud.py::TestDataCloudErrorCLI::test_error", "tests/func/test_data_cloud.py::TestShouldWarnOnNoChecksumInLocalAndRemoteCache::test", "tests/func/test_data_cloud.py::TestRemoteLOCALCLI::test", "tests/func/test_data_cloud.py::TestDataCloudCLIBase::test", "tests/func/test_data_cloud.py::TestWarnOnO... | null | true | 2019-05-29T09:53:34Z | 4 | 35 | 4 | 378 | 0 | 0.85 | 1 | 0.55 | 0.85 | 0.179667 | 76.3015 | ||
2,138 | swe_gym::train::660 | swe_gym | train | 660 | conan-io__conan-12578 | conan-io/conan | conan-io/conan | python | c7494e3ff0fb0005a3911cf1cd6f6342e17d1a20 | [feature] `build_modules` in 2.0 fails with error instead of a nice migration warnings
deprecated `build_modules` causes 2.0 to fail where it should output a warnings -- This can be see with the `cpp_info.names` and `cpp_info.user_info` attributes but not this one.
Post-op from playing with #12555
```
json-schema-va... | It would also be nice to make the warning optional with a conf setting... It's extremely noisy 🙊

| diff --git a/conans/model/build_info.py b/conans/model/build_info.py
--- a/conans/model/build_info.py
+++ b/conans/model/build_info.py
@@ -89,6 +89,7 @@ def __init__(self, set_defaults=False):
# LEGACY 1.X fields, can be removed in 2.X
self.names = MockInfoProperty("cpp_info.names")
self.file... | diff --git a/conans/test/integration/conan_v2/test_legacy_cpp_info.py b/conans/test/integration/conan_v2/test_legacy_cpp_info.py
--- a/conans/test/integration/conan_v2/test_legacy_cpp_info.py
+++ b/conans/test/integration/conan_v2/test_legacy_cpp_info.py
@@ -13,11 +13,15 @@ class Pkg(ConanFile):
def packag... | ["conans/test/integration/conan_v2/test_legacy_cpp_info.py::test_legacy_names_filenames"] | [] | null | true | 2022-11-21T22:15:39Z | 1 | 1 | 1 | 1,321 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.2235 | 76.2955 | |
2,139 | swe_gym::train::2068 | swe_gym | train | 2,068 | Project-MONAI__MONAI-3711 | Project-MONAI/MONAI | project-monai/monai | python | 3180c27a06a7ae34c3882dae7461ab44ec80755d | Optional split mark for CSV files
**Is your feature request related to a problem? Please describe.**
Feature request from @holgerroth : the CSV output of in the metrics summary reports are split by `tap` instead of comma.
Would be nice to change the default to comma to be consistent with `CSVSaver` and better to add s... | diff --git a/monai/data/csv_saver.py b/monai/data/csv_saver.py
--- a/monai/data/csv_saver.py
+++ b/monai/data/csv_saver.py
@@ -39,6 +39,7 @@ def __init__(
filename: str = "predictions.csv",
overwrite: bool = True,
flush: bool = False,
+ delimiter: str = ",",
) -> None:
""... | diff --git a/tests/test_csv_saver.py b/tests/test_csv_saver.py
--- a/tests/test_csv_saver.py
+++ b/tests/test_csv_saver.py
@@ -23,14 +23,14 @@
class TestCSVSaver(unittest.TestCase):
def test_saved_content(self):
with tempfile.TemporaryDirectory() as tempdir:
- saver = CSVSaver(output_dir=tempd... | ["tests/test_csv_saver.py::TestCSVSaver::test_saved_content", "tests/test_handler_classification_saver.py::TestHandlerClassificationSaver::test_saved_content", "tests/test_save_classificationd.py::TestSaveClassificationd::test_saved_content"] | ["tests/test_handler_metrics_saver.py::TestHandlerMetricsSaver::test_content", "tests/test_handler_metrics_saver_dist.py::DistributedMetricsSaver::test_content"] | null | true | 2022-01-25T15:53:39Z | 5 | 31 | 3 | 371 | 0 | 0.85 | 1 | 0.55 | 0.85 | 0.165167 | 76.258 | ||
2,140 | swe_gym::train::606 | swe_gym | train | 606 | conan-io__conan-12397 | conan-io/conan | conan-io/conan | python | 883eff8961d6e0d96652f78e3d7d3884479e769e | [bug] Meson Toolchain does not add required `-stdlib` args to `cpp_link_args`
### Environment Details (include every applicable attribute)
* Operating System+version: Ubuntu 22.04
* Compiler+version: Clang 14 + libc++
* Conan version: 1.53.0
* Python version: 3.10
### Steps to reproduce (Include if Applicable)... | Related to #12156
I think it just needs the library flag added to `cpp_link_args`. Will submit a PR myself if no one gets there first. | diff --git a/conan/tools/meson/toolchain.py b/conan/tools/meson/toolchain.py
--- a/conan/tools/meson/toolchain.py
+++ b/conan/tools/meson/toolchain.py
@@ -317,6 +317,7 @@ def _context(self):
if self.libcxx:
self.cpp_args.append(self.libcxx)
+ self.cpp_link_args.append(self.libcxx)
... | diff --git a/conans/test/integration/toolchains/meson/test_mesontoolchain.py b/conans/test/integration/toolchains/meson/test_mesontoolchain.py
--- a/conans/test/integration/toolchains/meson/test_mesontoolchain.py
+++ b/conans/test/integration/toolchains/meson/test_mesontoolchain.py
@@ -58,8 +58,8 @@ def generate(self):... | ["conans/test/integration/toolchains/meson/test_mesontoolchain.py::test_apple_meson_keep_user_custom_flags"] | ["conans/test/integration/toolchains/meson/test_mesontoolchain.py::test_correct_quotes", "conans/test/integration/toolchains/meson/test_mesontoolchain.py::test_extra_flags_via_conf"] | null | true | 2022-10-25T18:51:25Z | 1 | 1 | 1 | 1,048 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.178 | 76.159 | |
2,141 | swe_gym::train::2074 | swe_gym | train | 2,074 | Project-MONAI__MONAI-3440 | Project-MONAI/MONAI | project-monai/monai | python | 0935d5ab60b78b74e37e542244846de9ccfe7e39 | Allow feeding Pandas DataFrames directly to CSV datasets
**Is your feature request related to a problem? Please describe.**
In some situations, the user has not access to the csv files but some already generated pandas objects only.
**Describe the solution you'd like**
In that case, it would be useful to create `CSVDa... | diff --git a/monai/data/dataset.py b/monai/data/dataset.py
--- a/monai/data/dataset.py
+++ b/monai/data/dataset.py
@@ -32,7 +32,7 @@
from monai.data.utils import SUPPORTED_PICKLE_MOD, convert_tables_to_dicts, pickle_hashing
from monai.transforms import Compose, Randomizable, ThreadUnsafe, Transform, apply_transform... | diff --git a/tests/test_csv_dataset.py b/tests/test_csv_dataset.py
--- a/tests/test_csv_dataset.py
+++ b/tests/test_csv_dataset.py
@@ -14,6 +14,7 @@
import unittest
import numpy as np
+import pandas as pd
from monai.data import CSVDataset
from monai.transforms import ToNumpyd
@@ -57,6 +58,7 @@ def prepare_csv_f... | ["tests/test_csv_dataset.py::TestCSVDataset::test_values", "tests/test_csv_iterable_dataset.py::TestCSVIterableDataset::test_values"] | [] | null | true | 2021-12-03T02:20:14Z | 3 | 86 | 2 | 465 | 0 | 0.85 | 1 | 0.4 | 1 | 0.364167 | 76.1425 | ||
2,142 | swe_bench_verified::test::110 | swe_bench_verified | test | 110 | django__django-13363 | django/django | django/django | python | 76e0151ea0e0f56dca66cee846a78b89346d2c4c | Add support for tzinfo parameter to TruncDate() and TruncTime().
Description
(last modified by Joe Jackson)
Description
TruncDate inherits from TruncBase, which includes the TimeZone mixin. This should allow a developer to pass in a tzinfo object to be used when converting TruncDate, but it actually uses the return... | Please check https://code.djangoproject.com/ticket/31640 Is it related to your issue?
Replying to Serhii Romanov: Please check https://code.djangoproject.com/ticket/31640 Is it related to your issue? It is related, but not exactly my issue. That patch updates the TruncBase as_sql method, and world work. But the TruncDa... | diff --git a/django/db/models/functions/datetime.py b/django/db/models/functions/datetime.py
--- a/django/db/models/functions/datetime.py
+++ b/django/db/models/functions/datetime.py
@@ -292,7 +292,7 @@ class TruncDate(TruncBase):
def as_sql(self, compiler, connection):
# Cast to date rather than truncate... | diff --git a/tests/db_functions/datetime/test_extract_trunc.py b/tests/db_functions/datetime/test_extract_trunc.py
--- a/tests/db_functions/datetime/test_extract_trunc.py
+++ b/tests/db_functions/datetime/test_extract_trunc.py
@@ -1124,14 +1124,24 @@ def test_trunc_timezone_applied_before_truncation(self):
mod... | ["test_trunc_timezone_applied_before_truncation (db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests)"] | ["test_extract_day_func (db_functions.datetime.test_extract_trunc.DateFunctionTests)", "test_extract_duration_unsupported_lookups (db_functions.datetime.test_extract_trunc.DateFunctionTests)", "test_extract_duration_without_native_duration_field (db_functions.datetime.test_extract_trunc.DateFunctionTests)", "test_extra... | null | true | 2020-08-29T18:59:41Z | 1 | 4 | 1 | 1,671 | 0 | 1 | 1 | 0.4 | 0.8 | 0.291833 | 76.0255 | |
2,143 | swe_gym::train::2112 | swe_gym | train | 2,112 | Project-MONAI__MONAI-5908 | Project-MONAI/MONAI | project-monai/monai | python | 8a5a55093aebdf631b2fec14b2111a3c980ef584 | 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(spatial_dims... | Hi @PedroFerreiradaCosta, I was wondering if you would have time to look at it. If not, I could work on it in two weeks. Thank you a lot! | diff --git a/monai/losses/ssim_loss.py b/monai/losses/ssim_loss.py
--- a/monai/losses/ssim_loss.py
+++ b/monai/losses/ssim_loss.py
@@ -95,7 +95,7 @@ def forward(self, x: torch.Tensor, y: torch.Tensor, data_range: torch.Tensor) ->
if i == 0:
ssim_value = ssim_val
el... | diff --git a/tests/test_ssim_loss.py b/tests/test_ssim_loss.py
--- a/tests/test_ssim_loss.py
+++ b/tests/test_ssim_loss.py
@@ -18,31 +18,34 @@
from monai.losses.ssim_loss import SSIMLoss
-x = torch.ones([1, 1, 10, 10]) / 2
-y1 = torch.ones([1, 1, 10, 10]) / 2
-y2 = torch.zeros([1, 1, 10, 10])
-data_range = x.max()... | ["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_ssim_loss.py::TestSSIMLoss::test_grad_2", "test... | ["tests/test_ssim_loss.py::TestSSIMLoss::test2d_02", "tests/test_ssim_loss.py::TestSSIMLoss::test3d_07", "tests/test_ssim_loss.py::TestSSIMLoss::test2d_06", "tests/test_ssim_loss.py::TestSSIMLoss::test3d_03", "tests/test_ssim_loss.py::TestSSIMLoss::test_grad_0", "tests/test_ssim_loss.py::TestSSIMLoss::test3d_00", "test... | null | true | 2023-01-27T02:23:45Z | 1 | 2 | 10 | 707 | 0 | 0.85 | 1 | 0.85 | 0.4 | 0.1245 | 75.9985 | |
2,144 | swe_bench_promax::test::149 | swe_bench_promax | test | 149 | angular__angular-c_55ac384 | angular/angular | angular/angular | typescript | 277aa76876b367b77b3bad514755a508a25df074 | In Angular's core rendering engine, event listeners—whether bound to component outputs via `@Output` or attached directly to DOM elements—require associated cleanup functions to be reliably stored for proper teardown during view destruction. This ensures resources are released correctly and prevents memory leaks or sta... | diff --git a/packages/core/src/render3/view/directive_outputs.ts b/packages/core/src/render3/view/directive_outputs.ts
--- a/packages/core/src/render3/view/directive_outputs.ts
+++ b/packages/core/src/render3/view/directive_outputs.ts
@@ -10,14 +10,15 @@ import {RuntimeError, RuntimeErrorCode} from '../../errors';
imp... | diff --git a/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json b/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json
--- a/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json
+++ b/packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json
@@ -387,10 +3... | null | null | key4127/refactor-dockerhub:angular__angular-c_55ac384 | true | 1743047071 | 2 | 76 | null | 4,486 | 0 | 0.9 | 1 | 0.32 | 1 | 0.753333 | 75.98 | ||
2,145 | swe_gym::train::2034 | swe_gym | train | 2,034 | Project-MONAI__MONAI-578 | Project-MONAI/MONAI | project-monai/monai | python | 051ce8922e40a72055e01eabf513d3365a27a542 | Remove output_postfix in post transforms
**Is your feature request related to a problem? Please describe.**
As we already have `CopyItems` utility transform, I think we can remove the `output_postfix` parameter in post transforms.
If we need to keep different post transform results, just need to copy to another item in... | diff --git a/examples/workflows/unet_evaluation_dict.py b/examples/workflows/unet_evaluation_dict.py
--- a/examples/workflows/unet_evaluation_dict.py
+++ b/examples/workflows/unet_evaluation_dict.py
@@ -82,9 +82,9 @@ def main():
val_post_transforms = Compose(
[
- Activationsd(keys="pred", out... | diff --git a/tests/test_activationsd.py b/tests/test_activationsd.py
--- a/tests/test_activationsd.py
+++ b/tests/test_activationsd.py
@@ -15,40 +15,27 @@
from monai.transforms import Activationsd
TEST_CASE_1 = [
- {"keys": ["pred", "label"], "output_postfix": "act", "sigmoid": False, "softmax": [True, False], "... | ["tests/test_as_discreted.py::TestAsDiscreted::test_value_shape_1", "tests/test_activationsd.py::TestActivationsd::test_value_shape_1", "tests/test_as_discreted.py::TestAsDiscreted::test_value_shape_0", "tests/test_activationsd.py::TestActivationsd::test_value_shape_0", "tests/test_as_discreted.py::TestAsDiscreted::tes... | ["tests/test_keep_largest_connected_componentd.py::TestKeepLargestConnectedComponentd::test_correct_results_03_dependent_value_1_2", "tests/test_keep_largest_connected_componentd.py::TestKeepLargestConnectedComponentd::test_correct_results_00_value_1", "tests/test_keep_largest_connected_componentd.py::TestKeepLargestCo... | null | true | 2020-06-16T17:59:00Z | 3 | 76 | 6 | 326 | 0 | 0.85 | 1 | 0.4 | 1 | 0.307667 | 75.973 | ||
2,146 | swe_gym::train::454 | swe_gym | train | 454 | python__mypy-10361 | python/mypy | python/mypy | python | d131e91804ac887d12b207d53435718cd68bc475 | Multiply Tuple with IntExpr
`(1,)*3` should be of type `Tuple[int,int,int]`, not raise an exception.
I suppose `(1,)*n` may as well wait for proper tuple sequences, though. | Yeah, mypy should support this. It doesn't raise an exception fpr me, however, but gives an error (`Unsupported operand types for * ("Tuple[int]" and "int")`).
And yes, the general case should probably wait for variable-length tuples (#184) and we should use them. However, using `Sequence[t]` would be okay in the inte... | diff --git a/mypy/plugins/default.py b/mypy/plugins/default.py
--- a/mypy/plugins/default.py
+++ b/mypy/plugins/default.py
@@ -10,7 +10,7 @@
from mypy.plugins.common import try_getting_str_literals
from mypy.types import (
FunctionLike, Type, Instance, AnyType, TypeOfAny, CallableType, NoneType, TypedDictType,
-... | diff --git a/test-data/unit/check-generics.test b/test-data/unit/check-generics.test
--- a/test-data/unit/check-generics.test
+++ b/test-data/unit/check-generics.test
@@ -1672,7 +1672,7 @@ def f(x: T) -> str:
[case testTypeVarReversibleOperatorTuple]
from typing import TypeVar, Tuple
class A(Tuple[int, int]):
- d... | ["mypy/test/testcheck.py::TypeCheckSuite::testMultiplyTupleByIntegerLiteralReverse"] | ["mypy/test/testcheck.py::TypeCheckSuite::testTypeVarReversibleOperatorTuple", "mypy/test/testcheck.py::TypeCheckSuite::testSingleUndefinedTypeAndTuple"] | null | true | 2021-04-23T12:31:32Z | 1 | 25 | 1 | 173 | 0 | 0.85 | 1 | 0.35 | 1 | 0.112167 | 75.9615 | |
2,147 | swe_gym::train::1993 | swe_gym | train | 1,993 | Project-MONAI__MONAI-3636 | Project-MONAI/MONAI | project-monai/monai | python | 83f8b06372a3803ebe9281300cb794a1f3395018 | Enhance GridPatchDataset for iterable dataset
**Is your feature request related to a problem? Please describe.**
Meng zhang and I are preparing examples for MONAI webinar to show all kinds of MONAI datasets, realized that the `GridPatchDataset` can be enhanced as we already have the `IterableDataset` now and we can eas... | diff --git a/monai/data/grid_dataset.py b/monai/data/grid_dataset.py
--- a/monai/data/grid_dataset.py
+++ b/monai/data/grid_dataset.py
@@ -9,16 +9,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from typing import Callable, Dict, Optional, Sequence, Unio... | diff --git a/tests/test_grid_dataset.py b/tests/test_grid_dataset.py
--- a/tests/test_grid_dataset.py
+++ b/tests/test_grid_dataset.py
@@ -33,31 +33,35 @@ def tearDown(self):
set_determinism(None)
def test_shape(self):
- test_dataset = ["vwxyz", "helloworld", "worldfoobar"]
- result = Grid... | ["tests/test_grid_dataset.py::TestGridPatchDataset::test_loading_array", "tests/test_grid_dataset.py::TestGridPatchDataset::test_shape", "tests/test_patch_dataset.py::TestPatchDataset::test_shape", "tests/test_patch_dataset.py::TestPatchDataset::test_loading_array"] | [] | null | true | 2022-01-10T17:01:25Z | 1 | 66 | 4 | 478 | 0 | 0.85 | 1 | 0.4 | 1 | 0.299667 | 75.949 | ||
2,148 | swe_gym::train::1019 | swe_gym | train | 1,019 | dask__dask-7973 | dask/dask | dask/dask | python | 2745f53cd10fdd453154dded55bd49089f9760b5 | Adding tooltips to graphviz representation
While working on https://github.com/dask/dask/issues/7919, I was looking for ways to represent the `layer_type` attribute in the graphviz representation. I stumbled upon the `tooltip` - Tooltip (mouse hover text) attached to the node, edge, cluster, or graph.
This opens up ma... | diff --git a/dask/highlevelgraph.py b/dask/highlevelgraph.py
--- a/dask/highlevelgraph.py
+++ b/dask/highlevelgraph.py
@@ -869,7 +869,7 @@ def merge(cls, *graphs):
raise TypeError(g)
return cls(layers, dependencies)
- def visualize(self, filename="dask.pdf", format=None, **kwargs):
+ d... | diff --git a/dask/tests/test_highgraph.py b/dask/tests/test_highgraph.py
--- a/dask/tests/test_highgraph.py
+++ b/dask/tests/test_highgraph.py
@@ -6,7 +6,7 @@
import dask
from dask.blockwise import Blockwise, blockwise_token
-from dask.highlevelgraph import HighLevelGraph, Layer, MaterializedLayer
+from dask.highle... | ["dask/tests/test_highgraph.py::test_node_tooltips_exist"] | ["dask/tests/test_highgraph.py::test_basic", "dask/tests/test_highgraph.py::test_blockwise_cull[True]", "dask/tests/test_highgraph.py::test_cull_layers", "dask/tests/test_highgraph.py::test_len_does_not_materialize", "dask/tests/test_highgraph.py::test_highlevelgraph_dicts_deprecation", "dask/tests/test_highgraph.py::t... | null | true | 2021-08-02T09:45:18Z | 1 | 36 | 1 | 1,068 | 0 | 0.85 | 1 | 0.4 | 1 | 0.298 | 75.944 | ||
2,149 | swe_gym::train::2043 | swe_gym | train | 2,043 | Project-MONAI__MONAI-2465 | Project-MONAI/MONAI | project-monai/monai | python | 1a707f0226bfe10c000cc54ac87b35d50973e221 | How do I to use a Pad transform with a constant value?
### Discussed in https://github.com/Project-MONAI/MONAI/discussions/2459
<div type='discussions-op-text'>
<sup>Originally posted by **vanossj** June 26, 2021</sup>
I'm looking at the various pad transforms that end up using `np.pad` such as `SpacialPad`. I can se... | diff --git a/monai/transforms/croppad/array.py b/monai/transforms/croppad/array.py
--- a/monai/transforms/croppad/array.py
+++ b/monai/transforms/croppad/array.py
@@ -58,17 +58,20 @@ class SpatialPad(Transform):
for additional details.
Args:
- c: the spatial size of output data after padding, if a di... | diff --git a/tests/test_border_pad.py b/tests/test_border_pad.py
--- a/tests/test_border_pad.py
+++ b/tests/test_border_pad.py
@@ -51,6 +51,12 @@ def test_pad_shape(self, input_param, input_data, expected_val):
result = padder(input_data, mode=input_param["mode"])
self.assertAlmostEqual(result.shape, ... | ["tests/test_border_pad.py::TestBorderPad::test_pad_kwargs", "tests/test_spatial_pad.py::TestSpatialPad::test_pad_kwargs", "tests/test_divisible_pad.py::TestDivisiblePad::test_pad_kwargs"] | ["tests/test_spatial_pad.py::TestSpatialPad::test_pad_shape_1", "tests/test_border_pad.py::TestBorderPad::test_pad_shape_3", "tests/test_border_pad.py::TestBorderPad::test_pad_shape_1", "tests/test_border_pad.py::TestBorderPad::test_pad_shape_0", "tests/test_spatial_pad.py::TestSpatialPad::test_pad_shape_2", "tests/tes... | null | true | 2021-06-28T04:00:55Z | 2 | 63 | 3 | 485 | 0 | 0.85 | 1 | 0.4 | 1 | 0.290833 | 75.9225 | ||
2,150 | swe_gym::train::1999 | swe_gym | train | 1,999 | Project-MONAI__MONAI-3378 | Project-MONAI/MONAI | project-monai/monai | python | 37930a9bc433ae3faf11e762550362cb8a241c43 | 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/333... | diff --git a/monai/apps/pathology/transforms/spatial/array.py b/monai/apps/pathology/transforms/spatial/array.py
--- a/monai/apps/pathology/transforms/spatial/array.py
+++ b/monai/apps/pathology/transforms/spatial/array.py
@@ -15,7 +15,9 @@
import torch
from numpy.lib.stride_tricks import as_strided
+from monai.con... | diff --git a/tests/test_split_on_grid.py b/tests/test_split_on_grid.py
--- a/tests/test_split_on_grid.py
+++ b/tests/test_split_on_grid.py
@@ -11,11 +11,11 @@
import unittest
-import numpy as np
import torch
from parameterized import parameterized
from monai.apps.pathology.transforms import SplitOnGrid
+from ... | ["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_dict.py::TestSplitOnGridDict::test_split... | ["tests/test_split_on_grid.py::TestSplitOnGrid::test_split_patch_single_call_14", "tests/test_split_on_grid_dict.py::TestSplitOnGridDict::test_split_patch_single_call_12", "tests/test_split_on_grid.py::TestSplitOnGrid::test_split_patch_single_call_09", "tests/test_split_on_grid_dict.py::TestSplitOnGridDict::test_split_... | null | true | 2021-11-22T03:09:58Z | 2 | 68 | 22 | 333 | 0 | 0.85 | 1 | 0.4 | 1 | 0.282167 | 75.8965 | ||
2,151 | swe_gym::train::1009 | swe_gym | train | 1,009 | dask__dask-10723 | dask/dask | dask/dask | python | 31b26dfa4bf15f23a7070155ac67e6ba285de76f | DEPR: pandas 3.0 deprecations and the migration to dask-expr
pandas deprecated a bunch of things in the 2.x series that will be removed in pandas 3.0. Some of these things are changes in behaviour that are hard to replace but other things are just syntactic sugar. Examples like this are:
- [ ] GroupBy.fillna -> you ca... | diff --git a/dask/dataframe/core.py b/dask/dataframe/core.py
--- a/dask/dataframe/core.py
+++ b/dask/dataframe/core.py
@@ -3735,6 +3735,12 @@ def resample(self, rule, closed=None, label=None):
return Resampler(self, rule, closed=closed, label=label)
+ @_deprecated(
+ message=(
+ "Will ... | diff --git a/dask/dataframe/tests/test_dataframe.py b/dask/dataframe/tests/test_dataframe.py
--- a/dask/dataframe/tests/test_dataframe.py
+++ b/dask/dataframe/tests/test_dataframe.py
@@ -4676,13 +4676,22 @@ def test_first_and_last(method):
for offset in offsets:
with _check_warning(PANDAS_GE_210, ... | ["dask/dataframe/tests/test_groupby.py::test_cumulative_axis[tasks-cumprod]", "dask/dataframe/tests/test_groupby.py::test_cumulative_axis[disk-cumsum]", "dask/dataframe/tests/test_groupby.py::test_df_groupby_idx_axis[disk-1-idxmin]", "dask/dataframe/tests/test_groupby.py::test_groupby_shift_basic_input[disk-0-1-2]", "d... | ["dask/dataframe/tests/test_dataframe.py::test_repartition_npartitions[<lambda>1-float-2-5-False]", "dask/dataframe/tests/test_groupby.py::test_groupby_aggregate_categorical_observed[std-disk-unobserved-cat_1-unordererd-unknown]", "dask/dataframe/tests/test_groupby.py::test_groupby_sort_argument[disk-True-count-c]", "d... | null | true | 2023-12-19T12:32:01Z | 3 | 44 | 97 | 806 | 0 | 0.85 | 1 | 0.4 | 1 | 0.281 | 75.893 | ||
2,152 | swe_gym::train::643 | swe_gym | train | 643 | conan-io__conan-14051 | conan-io/conan | conan-io/conan | python | a930709b420553593032fb86e747b05d4e025566 | [feature] add prefix var to pkg-config alias
### What is your suggestion?
When a package contains components, conan pkg-config generator generates one .pc file per component, plus a root .pc file that includes all the components .pc files.
However, the generated root .pc file does not contain the `prefix` variable. W... | diff --git a/conan/tools/gnu/pkgconfigdeps.py b/conan/tools/gnu/pkgconfigdeps.py
--- a/conan/tools/gnu/pkgconfigdeps.py
+++ b/conan/tools/gnu/pkgconfigdeps.py
@@ -148,6 +148,12 @@ class _PCContentGenerator:
""")
shortened_template = textwrap.dedent("""\
+ prefix={{ prefix_path }}
+ {% if pkg_c... | diff --git a/conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py b/conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py
--- a/conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py
+++ b/conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py
@@ -380,13 +380,20 @@ def test_pkg_config_name_fu... | ["conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py::test_pkg_config_name_full_aliases"] | ["conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py::test_pkg_with_public_deps_and_component_requires_2", "conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py::test_multiple_include", "conans/test/integration/toolchains/gnu/test_pkgconfigdeps.py::test_tool_requires", "conans/test/integration/toolcha... | null | true | 2023-06-08T18:13:10Z | 1 | 27 | 1 | 1,140 | 0 | 0.85 | 1 | 0.4 | 1 | 0.28 | 75.89 | ||
2,153 | swe_gym::train::2428 | swe_gym | train | 2,428 | modin-project__modin-5952 | modin-project/modin | modin-project/modin | python | 6fd9b8f0e585876e119f703e373ad83bf9081217 | Precompute new dtype for boolean setitem
At the first glance, putting these lines [here](https://github.com/modin-project/modin/blob/67efa96e14e7cd2339c68f90e81703f1fa755b3e/modin/core/storage_formats/pandas/query_compiler.py#L2348) should do the thing:
```python
if self._modin_frame._dtypes is not None and is_scalar(i... | diff --git a/modin/core/storage_formats/pandas/query_compiler.py b/modin/core/storage_formats/pandas/query_compiler.py
--- a/modin/core/storage_formats/pandas/query_compiler.py
+++ b/modin/core/storage_formats/pandas/query_compiler.py
@@ -33,6 +33,7 @@
is_datetime64_any_dtype,
is_bool_dtype,
)
+from pandas.c... | diff --git a/modin/pandas/test/dataframe/test_indexing.py b/modin/pandas/test/dataframe/test_indexing.py
--- a/modin/pandas/test/dataframe/test_indexing.py
+++ b/modin/pandas/test/dataframe/test_indexing.py
@@ -2400,6 +2400,38 @@ def test_iloc_assigning_scalar_none_to_string_frame():
df_equals(modin_df, pandas_df)... | ["modin/test/storage_formats/pandas/test_internals.py::test_setitem_bool_preserve_dtypes"] | ["modin/pandas/test/dataframe/test_indexing.py::test_reset_index_with_multi_index_no_drop[True-1-False-0-no_col_level-0-False-3-float_nan_data-True]", "modin/pandas/test/dataframe/test_indexing.py::test_reset_index_with_multi_index_no_drop[mixed_1st_None-0-False-None-2-no_level-False-3-float_nan_data-True]", "modin/pan... | null | true | 2023-04-06T15:13:17Z | 1 | 26 | 1 | 491 | 0.071429 | 0.85 | 1 | 0.55 | 1 | 0.1685 | 75.86425 | ||
2,154 | swe_gym::train::2414 | swe_gym | train | 2,414 | modin-project__modin-6992 | modin-project/modin | modin-project/modin | python | a96639529a2e121f24b8c5462e1e76c243b85ede | Unify type of log_level in logging module
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. What kind of performance improvements would you like to see with this new API?
The logging module currently has a handful of functions that take in a `log... | diff --git a/modin/logging/class_logger.py b/modin/logging/class_logger.py
--- a/modin/logging/class_logger.py
+++ b/modin/logging/class_logger.py
@@ -19,6 +19,7 @@
from typing import Dict, Optional
+from .config import LogLevel
from .logger_decorator import enable_logging
@@ -38,7 +39,7 @@ def __init_subclas... | diff --git a/modin/test/test_logging.py b/modin/test/test_logging.py
--- a/modin/test/test_logging.py
+++ b/modin/test/test_logging.py
@@ -27,8 +27,8 @@ def __init__(self, namespace):
self.messages = collections.defaultdict(list)
self.namespace = namespace
- def info(self, message, *args, **kw):
... | ["modin/test/test_logging.py::test_function_decorator_on_outer_function_6237", "modin/test/test_logging.py::test_function_decorator", "modin/test/test_logging.py::test_class_inheritance", "modin/test/test_logging.py::test_class_decorator"] | [] | null | true | 2024-03-04T08:49:39Z | 3 | 46 | 4 | 684 | 0 | 0.85 | 1 | 0.4 | 1 | 0.267333 | 75.852 | ||
2,155 | swe_gym::train::5 | swe_gym | train | 5 | getmoto__moto-7082 | getmoto/moto | getmoto/moto | python | 8a16a6a86286983ea0c60591edbee729219b729f | Logs: create_export_task() currently does not export any data to S3
Two reasons:
- the `filter_log_events` does not check any streams (as it passes an empty list)
- the date filtering is wrong, where we pass seconds and compare them to milliseconds (or vice versa..)
We should have an AWS-compatible test to verify th... | diff --git a/moto/logs/exceptions.py b/moto/logs/exceptions.py
--- a/moto/logs/exceptions.py
+++ b/moto/logs/exceptions.py
@@ -11,7 +11,8 @@ class ResourceNotFoundException(LogsClientError):
def __init__(self, msg: Optional[str] = None):
self.code = 400
super().__init__(
- "ResourceNot... | diff --git a/tests/test_logs/test_export_tasks.py b/tests/test_logs/test_export_tasks.py
new file mode 100644
--- /dev/null
+++ b/tests/test_logs/test_export_tasks.py
@@ -0,0 +1,269 @@
+import copy
+import json
+import os
+from datetime import datetime, timedelta
+from uuid import UUID, uuid4
+
+import boto3
+import py... | ["tests/test_logs/test_export_tasks.py::test_create_export_executes_export_task", "tests/test_logs/test_logs_query/test_boto3.py::test_start_query__unknown_log_group", "tests/test_logs/test_integration.py::test_delete_subscription_filter_errors", "tests/test_logs/test_logs.py::test_describe_subscription_filters_errors"... | ["tests/test_logs/test_logs.py::test_create_log_group[arn:aws:kms:us-east-1:000000000000:key/51d81fab-b138-4bd2-8a09-07fd6d37224d]", "tests/test_logs/test_logs_query/test_boto3.py::test_get_query_results", "tests/test_logs/test_logs.py::test_describe_log_streams_invalid_order_by[LogStreamname]", "tests/test_logs/test_l... | null | true | 2023-11-30 22:25:53 | 3 | 60 | 8 | 369 | 0 | 0.85 | 1 | 0.4 | 1 | 0.2615 | 75.8345 | ||
2,156 | swe_gym::train::2152 | swe_gym | train | 2,152 | Project-MONAI__MONAI-1095 | Project-MONAI/MONAI | project-monai/monai | python | 666e2653b45b0781cbfdbb1db3e4d42f533f8871 | padding mode for Zoom and RandZoom
**Is your feature request related to a problem? Please describe.**
when `keep_size` is True, the zooming transform may pad the image.
the padding mode is currently hard-coded:
https://github.com/Project-MONAI/MONAI/blob/9f51893d162e5650f007dff8e0bcc09f0d9a6680/monai/transforms/spatial... | diff --git a/monai/transforms/spatial/array.py b/monai/transforms/spatial/array.py
--- a/monai/transforms/spatial/array.py
+++ b/monai/transforms/spatial/array.py
@@ -481,6 +481,10 @@ class Zoom(Transform):
mode: {``"nearest"``, ``"linear"``, ``"bilinear"``, ``"bicubic"``, ``"trilinear"``, ``"area"``}
... | diff --git a/tests/test_zoom.py b/tests/test_zoom.py
--- a/tests/test_zoom.py
+++ b/tests/test_zoom.py
@@ -52,6 +52,13 @@ def test_invalid_inputs(self, zoom, mode, raises):
zoom_fn = Zoom(zoom=zoom, mode=mode)
zoom_fn(self.imt[0])
+ def test_padding_mode(self):
+ zoom_fn = Zoom(zoo... | ["tests/test_zoom.py::TestZoom::test_padding_mode"] | ["tests/test_zoom.py::TestZoom::test_invalid_inputs_0", "tests/test_zoom.py::TestZoom::test_correct_results_2", "tests/test_zoom.py::TestZoom::test_correct_results_3", "tests/test_zoom.py::TestZoom::test_correct_results_0", "tests/test_zoom.py::TestZoom::test_invalid_inputs_1", "tests/test_zoom.py::TestZoom::test_corre... | null | true | 2020-10-10T08:27:42Z | 2 | 55 | 1 | 464 | 0 | 0.85 | 1 | 0.4 | 1 | 0.260667 | 75.832 | ||
2,157 | swe_gym::train::2325 | swe_gym | train | 2,325 | Project-MONAI__MONAI-3532 | Project-MONAI/MONAI | project-monai/monai | python | 08f9bac8b1bc304ee4d61d32e060eb1c3646da3a | Missing `copy_cache` and `progress` args in several subclass of CacheDataset
**Is your feature request related to a problem? Please describe.**
We added `copy_cache` and `progress` args in `CacheDataset` for better performance and user experience:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/data/dataset.py#L6... | diff --git a/monai/apps/datasets.py b/monai/apps/datasets.py
--- a/monai/apps/datasets.py
+++ b/monai/apps/datasets.py
@@ -51,6 +51,12 @@ class MedNISTDataset(Randomizable, CacheDataset):
will take the minimum of (cache_num, data_length x cache_rate, data_length).
num_workers: the number of worker... | diff --git a/tests/test_decathlondataset.py b/tests/test_decathlondataset.py
--- a/tests/test_decathlondataset.py
+++ b/tests/test_decathlondataset.py
@@ -47,6 +47,7 @@ def _test_dataset(dataset):
transform=transform,
section="validation",
download=True,
+ ... | ["tests/test_decathlondataset.py::TestDecathlonDataset::test_values"] | [] | null | true | 2021-12-22T00:31:13Z | 2 | 58 | 1 | 391 | 0 | 0.85 | 1 | 0.4 | 1 | 0.2585 | 75.8255 | ||
2,158 | swe_gym::train::420 | swe_gym | train | 420 | python__mypy-11290 | python/mypy | python/mypy | python | e6b91bdc5c253cefba940b0864a8257d833f0d8b | Use `_typeshed.NoneType` for the type of `None`
Currently mypy uses a hardcoded type for `NoneType`, I think it should use the one from typeshed.
```py
reveal_type(None.__bool__()) # note: Revealed type is "builtins.bool"
``` | This is defined correctly in typeshed.
```python
@final
class NoneType:
def __bool__(self) -> Literal[False]: ...
```
I'm not sure why mypy is revealing `bool` rather than `Literal[False]` in this case. Pyright reveals `Literal[False]` based on the above typeshed definition.
It's possible this was fix... | diff --git a/mypy/checkmember.py b/mypy/checkmember.py
--- a/mypy/checkmember.py
+++ b/mypy/checkmember.py
@@ -317,17 +317,18 @@ def analyze_union_member_access(name: str, typ: UnionType, mx: MemberContext) ->
def analyze_none_member_access(name: str, typ: NoneType, mx: MemberContext) -> Type:
- if mx.chk.shoul... | diff --git a/test-data/unit/check-basic.test b/test-data/unit/check-basic.test
--- a/test-data/unit/check-basic.test
+++ b/test-data/unit/check-basic.test
@@ -401,9 +401,18 @@ def foo(
[case testNoneHasBool]
none = None
b = none.__bool__()
-reveal_type(b) # N: Revealed type is "builtins.bool"
+reveal_type(b) # N: ... | ["mypy/test/testcheck.py::TypeCheckSuite::testNoneHasBool", "mypy/test/testcheck.py::TypeCheckSuite::testNoneHasBoolShowNoneErrorsFalse"] | ["mypy/test/testcheck.py::TypeCheckSuite::testAssignmentInvariantNoteForList"] | null | true | 2021-10-07T08:52:56Z | 1 | 7 | 2 | 227 | 0 | 0.85 | 1 | 0.35 | 1 | 0.061167 | 75.8085 | |
2,159 | swe_gym::train::2202 | swe_gym | train | 2,202 | Project-MONAI__MONAI-2436 | Project-MONAI/MONAI | project-monai/monai | python | 91ea1b676a8fda066fd07ba6b55e87151da16dde | support dynamic data list for the dataset APIs (2/July)
**Is your feature request related to a problem? Please describe.**
At the workflow level, would be great to have the capability of changing the input training dataset on the fly, without restarting the running engine. This would require some extra works for the ca... | diff --git a/monai/data/dataset.py b/monai/data/dataset.py
--- a/monai/data/dataset.py
+++ b/monai/data/dataset.py
@@ -130,6 +130,8 @@ class PersistentDataset(Dataset):
Subsequent uses of a dataset directly read pre-processed results from `cache_dir`
followed by applying the random dependant parts of transfor... | diff --git a/tests/test_cachedataset.py b/tests/test_cachedataset.py
--- a/tests/test_cachedataset.py
+++ b/tests/test_cachedataset.py
@@ -19,7 +19,7 @@
from parameterized import parameterized
from monai.data import CacheDataset, DataLoader, PersistentDataset, SmartCacheDataset
-from monai.transforms import Compose... | ["tests/test_smartcachedataset.py::TestSmartCacheDataset::test_set_data", "tests/test_cachedataset.py::TestCacheDataset::test_set_data"] | ["tests/test_cachedataset.py::TestCacheThread::test_thread_safe_07", "tests/test_cachedataset.py::TestCacheThread::test_thread_safe_08", "tests/test_lmdbdataset.py::TestMPLMDBDataset::test_mp_cache", "tests/test_cachedataset.py::TestCacheThread::test_thread_safe_06", "tests/test_smartcachedataset.py::TestSmartCacheData... | null | true | 2021-06-24T09:00:28Z | 1 | 57 | 2 | 372 | 0 | 0.85 | 1 | 0.4 | 1 | 0.252 | 75.806 | ||
2,160 | swe_gym::train::2213 | swe_gym | train | 2,213 | Project-MONAI__MONAI-3125 | Project-MONAI/MONAI | project-monai/monai | python | e29a6eaff71f2b115d23c869758a4cc29a1189af | Add support to track `engine.state.XXX` in handlers
**Is your feature request related to a problem? Please describe.**
Referring to the latest ignite built-in handlers, I think we can add support to track specified state in `StatsHandler`, etc.
https://github.com/pytorch/ignite/blob/master/ignite/contrib/handlers/base... | diff --git a/monai/handlers/mlflow_handler.py b/monai/handlers/mlflow_handler.py
--- a/monai/handlers/mlflow_handler.py
+++ b/monai/handlers/mlflow_handler.py
@@ -9,7 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from typing import TYPE_CHECKING, Any... | diff --git a/tests/test_handler_mlflow.py b/tests/test_handler_mlflow.py
--- a/tests/test_handler_mlflow.py
+++ b/tests/test_handler_mlflow.py
@@ -35,10 +35,11 @@ def _train_func(engine, batch):
def _update_metric(engine):
current_metric = engine.state.metrics.get("acc", 0.1)
... | ["tests/test_handler_stats.py::TestHandlerStats::test_attributes_print", "tests/test_handler_tb_stats.py::TestHandlerTBStats::test_metrics_writer", "tests/test_handler_mlflow.py::TestHandlerMLFlow::test_metrics_track"] | ["tests/test_handler_stats.py::TestHandlerStats::test_loss_print", "tests/test_handler_stats.py::TestHandlerStats::test_loss_dict", "tests/test_handler_stats.py::TestHandlerStats::test_exception", "tests/test_handler_stats.py::TestHandlerStats::test_metrics_print", "tests/test_handler_stats.py::TestHandlerStats::test_l... | null | true | 2021-10-14T04:42:29Z | 3 | 58 | 3 | 334 | 0 | 0.85 | 1 | 0.4 | 1 | 0.249 | 75.797 | ||
2,161 | swe_gym::train::327 | swe_gym | train | 327 | getmoto__moto-6578 | getmoto/moto | getmoto/moto | python | 38b7ffade2b2a72a70386e3cd2878f26414b52a8 | create_vpc_endpoint_service_configuration does not include `Owner` key in resource
When using `create_vpc_endpoint_service_configuration` function, the created service does not have the `owner` key that AWS automatically associates with your account_id.
So, when I use the `describe_vpc_endpoint_services` function, the ... | diff --git a/moto/ec2/models/vpc_service_configuration.py b/moto/ec2/models/vpc_service_configuration.py
--- a/moto/ec2/models/vpc_service_configuration.py
+++ b/moto/ec2/models/vpc_service_configuration.py
@@ -41,6 +41,21 @@ def __init__(
self.principals: List[str] = []
self.ec2_backend = ec2_backend... | diff --git a/tests/test_ec2/test_vpc_service_configuration.py b/tests/test_ec2/test_vpc_service_configuration.py
--- a/tests/test_ec2/test_vpc_service_configuration.py
+++ b/tests/test_ec2/test_vpc_service_configuration.py
@@ -3,6 +3,7 @@
from botocore.exceptions import ClientError
from moto import mock_ec2, mock_e... | ["tests/test_ec2/test_vpc_service_configuration.py::test_create_vpc_endpoint_service_configuration_with_options"] | ["tests/test_ec2/test_vpc_service_configuration.py::test_describe_vpc_endpoint_service_configurations", "tests/test_ec2/test_vpc_service_configuration.py::test_describe_vpc_endpoint_service_configurations_with_tags[tags1]", "tests/test_ec2/test_vpc_service_configuration.py::test_create_vpc_endpoint_service_configuratio... | null | true | 2023-07-31 20:54:33 | 2 | 22 | 1 | 1,023 | 0 | 0.85 | 1 | 0.4 | 1 | 0.243833 | 75.7815 | ||
2,162 | swe_gym::train::2075 | swe_gym | train | 2,075 | Project-MONAI__MONAI-543 | Project-MONAI/MONAI | project-monai/monai | python | d42f15dd02e88fe0077163db5bb5efeb407c8f35 | Change to use PIL in PNGWriter
**Is your feature request related to a problem? Please describe.**
As we already changed the `resize` to PyTorch API, it has 2 benefits to change to PIL Image API:
1. It can help to remove the dependency on `skimage`.
2. Use a similar logic with LoadPNG, which read PNG image by PIL Image ... | diff --git a/monai/data/png_saver.py b/monai/data/png_saver.py
--- a/monai/data/png_saver.py
+++ b/monai/data/png_saver.py
@@ -34,7 +34,7 @@ def __init__(
output_ext: str = ".png",
resample: bool = True,
interp_order: str = "nearest",
- scale: bool = False,
+ scale=None,
):... | diff --git a/tests/test_handler_segmentation_saver.py b/tests/test_handler_segmentation_saver.py
--- a/tests/test_handler_segmentation_saver.py
+++ b/tests/test_handler_segmentation_saver.py
@@ -38,7 +38,7 @@ def _train_func(engine, batch):
engine = Engine(_train_func)
# set up testing handler
- ... | ["tests/test_png_rw.py::TestPngWrite::test_write_gray_1height", "tests/test_png_rw.py::TestPngWrite::test_write_gray_1channel"] | ["tests/test_png_rw.py::TestPngWrite::test_write_2channels", "tests/test_png_rw.py::TestPngWrite::test_write_gray", "tests/test_handler_segmentation_saver.py::TestHandlerSegmentationSaver::test_save_resized_content_1__png", "tests/test_png_saver.py::TestPNGSaver::test_saved_content_three_channel", "tests/test_png_saver... | null | true | 2020-06-12T05:49:24Z | 3 | 56 | 2 | 324 | 0 | 0.85 | 1 | 0.4 | 1 | 0.240667 | 75.772 | ||
2,163 | swe_gym::train::2310 | swe_gym | train | 2,310 | Project-MONAI__MONAI-3735 | Project-MONAI/MONAI | project-monai/monai | python | 2e498fdaf001c13493c71dc4400764453c7813e6 | Dimension is hardcoded for softmax/argmax for PostTransform
For both Dictionary and Array based post transform, the dimension is hardcoded.
Softmax:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/post/array.py#L115
Argmax:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/post/array.p... | diff --git a/monai/transforms/post/array.py b/monai/transforms/post/array.py
--- a/monai/transforms/post/array.py
+++ b/monai/transforms/post/array.py
@@ -55,7 +55,7 @@
class Activations(Transform):
"""
- Add activation operations to the model output, typically `Sigmoid` or `Softmax`.
+ Activation operati... | diff --git a/tests/test_activations.py b/tests/test_activations.py
--- a/tests/test_activations.py
+++ b/tests/test_activations.py
@@ -38,6 +38,15 @@
]
)
+ TEST_CASES.append(
+ [
+ {"sigmoid": False, "softmax": True, "other": None, "unused": True, "dim": 1},
+ p([[[0.0, 1... | ["tests/test_activations.py::TestActivations::test_value_shape_10", "tests/test_as_discrete.py::TestAsDiscrete::test_value_shape_07", "tests/test_activationsd.py::TestActivationsd::test_value_shape_6", "tests/test_activationsd.py::TestActivationsd::test_value_shape_3", "tests/test_as_discrete.py::TestAsDiscrete::test_v... | ["tests/test_as_discreted.py::TestAsDiscreted::test_value_shape_09", "tests/test_activations.py::TestActivations::test_value_shape_07", "tests/test_as_discrete.py::TestAsDiscrete::test_value_shape_04", "tests/test_activations.py::TestActivations::test_monai_activations_value_shape_1_memswish", "tests/test_activations.p... | null | true | 2022-01-28T11:07:57Z | 2 | 44 | 13 | 547 | 0 | 0.85 | 1 | 0.4 | 1 | 0.237833 | 75.7635 | ||
2,164 | swe_gym::train::2079 | swe_gym | train | 2,079 | Project-MONAI__MONAI-5119 | Project-MONAI/MONAI | project-monai/monai | python | 59aeab098d439415c9be4c83df17d6dbf12c8ce9 | Support multiple config files for MonaiAlgo
**Is your feature request related to a problem? Please describe.**
Current MonaiAlgo doesn't support several train configs that might be needed, e.g. for multigpu training.
**Describe the solution you'd like**
Support lists of config files in MonaiAlgo arguments. Note, Confi... | diff --git a/monai/fl/client/monai_algo.py b/monai/fl/client/monai_algo.py
--- a/monai/fl/client/monai_algo.py
+++ b/monai/fl/client/monai_algo.py
@@ -12,7 +12,7 @@
import logging
import os
import sys
-from typing import Optional
+from typing import Optional, Union
import torch
@@ -96,9 +96,11 @@ class MonaiAlg... | diff --git a/tests/test_fl_monai_algo.py b/tests/test_fl_monai_algo.py
--- a/tests/test_fl_monai_algo.py
+++ b/tests/test_fl_monai_algo.py
@@ -38,6 +38,20 @@
"config_filters_filename": None,
}
]
+TEST_TRAIN_3 = [
+ {
+ "bundle_root": os.path.join(os.path.dirname(__file__)),
+ "config_tra... | ["tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_train_2", "tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_get_weights_3", "tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_evaluate_2"] | ["tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_train_1", "tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_get_weights_2", "tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_train_0", "tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_get_weights_1", "tests/test_fl_monai_algo.py::TestFLMonaiAlgo::test_get_wei... | null | true | 2022-09-09T19:10:37Z | 1 | 50 | 3 | 425 | 0 | 0.85 | 1 | 0.4 | 1 | 0.2375 | 75.7625 | ||
2,165 | swe_gym::train::2172 | swe_gym | train | 2,172 | Project-MONAI__MONAI-2156 | Project-MONAI/MONAI | project-monai/monai | python | 2a4c9e514bbc603191e49120e9d598a9414c0e75 | Add sample count in metric_summary report
**Is your feature request related to a problem? Please describe.**
Need to add the sample count for every class in the `metric_summary` report, and enhance the doc-string of average computation progress.
Feature request from internal research team. | diff --git a/monai/handlers/metrics_saver.py b/monai/handlers/metrics_saver.py
--- a/monai/handlers/metrics_saver.py
+++ b/monai/handlers/metrics_saver.py
@@ -47,13 +47,22 @@ class MetricsSaver:
if not None, every metric_details array will save a separate `{metric name}_raw.csv` file.
batch_transf... | diff --git a/tests/test_handler_metrics_saver.py b/tests/test_handler_metrics_saver.py
--- a/tests/test_handler_metrics_saver.py
+++ b/tests/test_handler_metrics_saver.py
@@ -28,7 +28,7 @@ def test_content(self):
metrics=["metric1", "metric2"],
metric_details=["metric3", "metric4"],
... | ["tests/test_handler_metrics_saver.py::TestHandlerMetricsSaver::test_content", "tests/test_handler_metrics_saver_dist.py::DistributedMetricsSaver::test_content", "tests/test_write_metrics_reports.py::TestWriteMetricsReports::test_content"] | [] | null | true | 2021-05-07T03:43:41Z | 3 | 55 | 3 | 290 | 0 | 0.85 | 1 | 0.4 | 1 | 0.231667 | 75.745 | ||
2,166 | swe_gym::train::173 | swe_gym | train | 173 | getmoto__moto-7211 | getmoto/moto | getmoto/moto | python | 455fbd5eaa0270e03eac85a532e47ec75c7acd21 | [Enhancement] Add support for `invoke_endpoint_async` in `sagemaker-runtime`
Hi Moto team,
Thanks so much for this great library! I saw recently that you all shipped support for `sagemaker-runtime`'s `invoke_endpoint` method (https://github.com/getmoto/moto/issues/4180 and https://github.com/getmoto/moto/pull/6747). I... | diff --git a/moto/sagemakerruntime/models.py b/moto/sagemakerruntime/models.py
--- a/moto/sagemakerruntime/models.py
+++ b/moto/sagemakerruntime/models.py
@@ -1,6 +1,8 @@
+import json
from typing import Dict, List, Tuple
from moto.core import BackendDict, BaseBackend
+from moto.moto_api._internal import mock_random... | diff --git a/tests/test_sagemakerruntime/test_sagemakerruntime.py b/tests/test_sagemakerruntime/test_sagemakerruntime.py
--- a/tests/test_sagemakerruntime/test_sagemakerruntime.py
+++ b/tests/test_sagemakerruntime/test_sagemakerruntime.py
@@ -1,7 +1,10 @@
+import json
+
import boto3
import requests
-from moto impor... | ["tests/test_sagemakerruntime/test_sagemakerruntime.py::test_invoke_endpoint_async"] | ["tests/test_sagemakerruntime/test_sagemakerruntime.py::test_invoke_endpoint", "tests/test_sagemakerruntime/test_sagemakerruntime.py::test_invoke_endpoint__default_results"] | null | true | 2024-01-13 19:36:37 | 3 | 48 | 1 | 406 | 0 | 0.85 | 1 | 0.4 | 1 | 0.227667 | 75.733 | ||
2,167 | swe_gym::train::2182 | swe_gym | train | 2,182 | Project-MONAI__MONAI-6544 | Project-MONAI/MONAI | project-monai/monai | python | 4bd93c033b26524eb922e4762ca59d9e4bf6727d | implement a softmax version of focal loss
**Is your feature request related to a problem? Please describe.**
```
The softmax version of focal loss is:
FL(p_t) = -alpha * (1 - p_t)**gamma * log(p_t),
where p_i = exp(s_i) / sum_j exp(s_j), t is the target (ground truth) class, and
s_j is the unnormalized score for cl... | I can work on this issue and PR later if no one is working on this. | diff --git a/monai/losses/focal_loss.py b/monai/losses/focal_loss.py
--- a/monai/losses/focal_loss.py
+++ b/monai/losses/focal_loss.py
@@ -28,10 +28,10 @@ class FocalLoss(_Loss):
FocalLoss is an extension of BCEWithLogitsLoss that down-weights loss from
high confidence correct predictions.
- Reimplementa... | diff --git a/tests/test_focal_loss.py b/tests/test_focal_loss.py
--- a/tests/test_focal_loss.py
+++ b/tests/test_focal_loss.py
@@ -13,16 +13,78 @@
import unittest
+import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
+from parameterized import parameterized
from monai.losses ... | ["tests/test_focal_loss.py::TestFocalLoss::test_script", "tests/test_focal_loss.py::TestFocalLoss::test_multi_class_seg_2d", "tests/test_focal_loss.py::TestFocalLoss::test_empty_class_2d", "tests/test_focal_loss.py::TestFocalLoss::test_bin_seg_3d", "tests/test_focal_loss.py::TestFocalLoss::test_result_6", "tests/test_f... | ["tests/test_focal_loss.py::TestFocalLoss::test_result_2", "tests/test_focal_loss.py::TestFocalLoss::test_ill_class_weight", "tests/test_focal_loss.py::TestFocalLoss::test_consistency_with_cross_entropy_2d_onehot_label", "tests/test_focal_loss.py::TestFocalLoss::test_result_4", "tests/test_focal_loss.py::TestFocalLoss:... | null | true | 2023-05-23T16:54:05Z | 1 | 160 | 9 | 603 | 0.028571 | 0.85 | 1 | 0.55 | 0.75 | 0.6005 | 75.72125 | |
2,168 | swe_gym::train::2093 | swe_gym | train | 2,093 | Project-MONAI__MONAI-6793 | Project-MONAI/MONAI | project-monai/monai | python | 11546e80a0b0ad24472d1bc60501c48e5025ca71 | SSIMLoss supports set_data_range
follow-up of https://github.com/Project-MONAI/tutorials/pull/1351
should we set the `data_range` as a property that could be set and reset anytime, so that we don't need to initialize a new object every time we need to change the `data_range` parameter?
_Originally posted by @binliunl... | diff --git a/monai/transforms/intensity/array.py b/monai/transforms/intensity/array.py
--- a/monai/transforms/intensity/array.py
+++ b/monai/transforms/intensity/array.py
@@ -493,8 +493,8 @@ def __init__(
fixed_mean: subtract the mean intensity before scaling with `factor`, then add the same value after sc... | diff --git a/tests/test_rand_scale_intensity.py b/tests/test_rand_scale_intensity.py
--- a/tests/test_rand_scale_intensity.py
+++ b/tests/test_rand_scale_intensity.py
@@ -33,6 +33,22 @@ def test_value(self, p):
expected = p((self.imt * (1 + np.random.uniform(low=-0.5, high=0.5))).astype(np.float32))
a... | ["tests/test_rand_scale_intensity.py::TestRandScaleIntensity::test_channel_wise_0", "tests/test_rand_scale_intensity.py::TestRandScaleIntensity::test_channel_wise_1", "tests/test_rand_scale_intensity.py::TestRandScaleIntensity::test_channel_wise_2", "tests/test_rand_scale_intensityd.py::TestRandScaleIntensityd::test_ch... | ["tests/test_rand_scale_intensity.py::TestRandScaleIntensity::test_value_2", "tests/test_rand_scale_intensityd.py::TestRandScaleIntensityd::test_value", "tests/test_rand_scale_intensity.py::TestRandScaleIntensity::test_value_1", "tests/test_rand_scale_intensity.py::TestRandScaleIntensity::test_value_0"] | null | true | 2023-07-28T07:22:11Z | 2 | 47 | 4 | 401 | 0 | 0.85 | 1 | 0.4 | 1 | 0.2235 | 75.7205 | ||
2,169 | swe_gym::train::2331 | swe_gym | train | 2,331 | modin-project__modin-6844 | modin-project/modin | modin-project/modin | python | 7ef544f4467ddea18cfbb51ad2a6fcbbb12c0db3 | BUG: Using Concat to Merge Two GroupBy DataFrames
### Modin version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest released version of Modin.
- [ ] I have confirmed this bug exists on the main branch of Modin. (In order to do this you c... | Hi @wsxqaza12, thanks for opening this issue. I can reproduce it on latest master.
@dchigarev, it looks like `_cols_with_unknown_dtypes` can be a RangeIndex, but we assume it as a list. Can you take this on? https://github.com/modin-project/modin/blob/7ef544f4467ddea18cfbb51ad2a6fcbbb12c0db3/modin/core/dataframe/pan... | diff --git a/modin/core/dataframe/pandas/metadata/dtypes.py b/modin/core/dataframe/pandas/metadata/dtypes.py
--- a/modin/core/dataframe/pandas/metadata/dtypes.py
+++ b/modin/core/dataframe/pandas/metadata/dtypes.py
@@ -517,7 +517,7 @@ def _merge_dtypes(
if dtypes_are_unknown:
return DtypesDescri... | diff --git a/modin/pandas/test/test_concat.py b/modin/pandas/test/test_concat.py
--- a/modin/pandas/test/test_concat.py
+++ b/modin/pandas/test/test_concat.py
@@ -197,6 +197,26 @@ def test_concat_5776():
)
+def test_concat_6840():
+ groupby_objs = []
+ for idx, lib in enumerate((pd, pandas)):
+ df... | ["modin/pandas/test/test_concat.py::test_concat_6840"] | ["modin/pandas/test/test_concat.py::test_concat_empty[inner-0-data13-None-None-None]", "modin/pandas/test/test_concat.py::test_concat_empty[inner-0-None-None-data21-index21]", "modin/pandas/test/test_concat.py::test_concat_empty[inner-0-None-None-None-index26]", "modin/pandas/test/test_concat.py::test_concat_dictionary... | null | true | 2024-01-02T15:44:36Z | 1 | 2 | 1 | 15,738 | 0 | 0.85 | 1 | 0.8 | 0.4 | 0.506667 | 75.72 | |
2,170 | swe_gym::train::2156 | swe_gym | train | 2,156 | Project-MONAI__MONAI-5982 | Project-MONAI/MONAI | project-monai/monai | python | 3122e1ab222434b23536979df75b621dd3b09024 | Getting the wrong shape in training when pixelshuffle in FlexibleUNet
**Describe the bug**
I get an error shape in the decoder When I use A for training,.
**To Reproduce**
```python
import torch
from monai.networks.nets import BasicUNetPlusPlus, FlexibleUNet
model1 = FlexibleUNet(1, 1, backbone='efficientnet-b8',ups... | Hi @binliunls ,
Could you please help take a look at this question?
Thanks in advance.
| diff --git a/monai/networks/nets/flexible_unet.py b/monai/networks/nets/flexible_unet.py
--- a/monai/networks/nets/flexible_unet.py
+++ b/monai/networks/nets/flexible_unet.py
@@ -309,7 +309,7 @@ def __init__(
bias=decoder_bias,
upsample=upsample,
interp_mode=interp_mode,
- ... | diff --git a/tests/test_flexible_unet.py b/tests/test_flexible_unet.py
--- a/tests/test_flexible_unet.py
+++ b/tests/test_flexible_unet.py
@@ -173,29 +173,32 @@ def make_shape_cases(
num_classes=10,
input_shape=64,
norm=("batch", {"eps": 1e-3, "momentum": 0.01}),
+ upsample=("nontrainable", "deconv", ... | ["tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_008", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_173", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_164", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_086", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_... | ["tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_075", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_087", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_076", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_067", "tests/test_flexible_unet.py::TestFLEXIBLEUNET::test_shape_... | null | true | 2023-02-12T15:54:16Z | 1 | 2 | 58 | 6,157 | 0 | 0.85 | 1 | 0.8 | 0.4 | 0.506667 | 75.72 | |
2,171 | swe_gym::train::135 | swe_gym | train | 135 | getmoto__moto-5959 | getmoto/moto | getmoto/moto | python | d1e3f50756fdaaea498e8e47d5dcd56686e6ecdf | KMS `encrypt` operation doesn't resolve aliases as expected
Hi, I'm trying to use Moto's KMS implementation to test some code that uses boto3's KMS client to encrypt and decrypt data. When using key aliases, I'm running into some unexpected behavior that doesn't seem to match the behavior of AWS proper: I'm unable to s... | Hi @rolandcrosby-dbt, thanks for raising this! Looks like this is simply a bug in Moto where we do not handle the `encrypt(KeyId=alias)`-case properly. | diff --git a/moto/kms/models.py b/moto/kms/models.py
--- a/moto/kms/models.py
+++ b/moto/kms/models.py
@@ -363,7 +363,7 @@ def any_id_to_key_id(self, key_id):
key_id = self.get_alias_name(key_id)
key_id = self.get_key_id(key_id)
if key_id.startswith("alias/"):
- key_id = self.get_k... | diff --git a/tests/test_kms/test_kms_boto3.py b/tests/test_kms/test_kms_boto3.py
--- a/tests/test_kms/test_kms_boto3.py
+++ b/tests/test_kms/test_kms_boto3.py
@@ -43,19 +43,6 @@ def test_create_key_without_description():
metadata.should.have.key("Description").equal("")
-@mock_kms
-def test_create_key_with_emp... | ["tests/test_kms/test_kms_encrypt.py::test_encrypt_using_alias_name", "tests/test_kms/test_kms_encrypt.py::test_encrypt_using_alias_arn"] | ["tests/test_kms/test_kms_boto3.py::test__create_alias__raises_if_alias_has_restricted_characters[alias/my-alias!]", "tests/test_kms/test_kms_boto3.py::test_update_key_description", "tests/test_kms/test_kms_boto3.py::test_verify_happy[some", "tests/test_kms/test_kms_encrypt.py::test_decrypt[some", "tests/test_kms/test_... | null | true | 2023-02-21 22:11:30 | 1 | 2 | 2 | 7,479 | 0 | 0.85 | 1 | 0.8 | 0.4 | 0.506667 | 75.72 | |
2,172 | swe_gym::train::278 | swe_gym | train | 278 | getmoto__moto-7336 | getmoto/moto | getmoto/moto | python | 0ba2561539e9bb03447b0ff1ab952626ece8f548 | Default IAM user is not support in AWS China. user/moto
I have a code like that,
```
def assume_cross_account_role_via_arn(role_arn, role_session_name=None, region_name=None) -> boto3.Session:
_session = boto3.Session(region_name=region_name)
session = assume_role(_session, role_arn, RoleSessionName=role_sessio... | Hi @Galvin-wjw! I'll mark this as an enhancement to change when the region is set to China.
Moto is quite `aws`-centric - that partition is hardcoded for about 400 ARN's across the codebase. Do you have any other ARN's that cause a problem?
To answer your second question: you can create a user + access key, and then... | diff --git a/moto/core/utils.py b/moto/core/utils.py
--- a/moto/core/utils.py
+++ b/moto/core/utils.py
@@ -390,3 +390,11 @@ def params_sort_function(item: Tuple[str, Any]) -> Tuple[str, int, str]:
def gzip_decompress(body: bytes) -> bytes:
return decompress(body)
+
+
+def get_partition_from_region(region_name: ... | diff --git a/tests/test_sts/test_sts.py b/tests/test_sts/test_sts.py
--- a/tests/test_sts/test_sts.py
+++ b/tests/test_sts/test_sts.py
@@ -66,9 +66,12 @@ def test_get_federation_token_boto3():
@freeze_time("2012-01-01 12:00:00")
@mock_aws
-def test_assume_role():
- client = boto3.client("sts", region_name="us-ea... | ["tests/test_sts/test_sts.py::test_assume_role_with_web_identity_boto3[cn-north-1-aws-cn]", "tests/test_sts/test_sts.py::test_get_caller_identity_with_assumed_role_credentials[cn-north-1-aws-cn]", "tests/test_sts/test_sts.py::test_assume_role[cn-north-1-aws-cn]", "tests/test_sts/test_sts.py::test_get_caller_identity_wi... | ["tests/test_sts/test_sts.py::test_get_federation_token_boto3", "tests/test_sts/test_sts.py::test_get_session_token_boto3", "tests/test_sts/test_sts.py::test_get_caller_identity_with_iam_user_credentials[us-east-1-aws]", "tests/test_sts/test_sts.py::test_assume_role_with_saml", "tests/test_sts/test_sts.py::test_assume_... | null | true | 2024-02-11 19:42:00 | 5 | 73 | 5 | 1,764 | 0.068966 | 0.85 | 1 | 0.55 | 0.85 | 0.537333 | 75.717 | |
2,173 | swe_bench_verified::test::475 | swe_bench_verified | test | 475 | sympy__sympy-20428 | sympy/sympy | sympy/sympy | python | c0e85160406f9bf2bcaa2992138587668a1cd0bc | Result from clear_denoms() prints like zero poly but behaves wierdly (due to unstripped DMP)
The was the immediate cause of the ZeroDivisionError in #17990.
Calling `clear_denoms()` on a complicated constant poly that turns out to be zero:
```
>>> from sympy import *
>>> x = symbols("x")
>>> f = Poly(sympify("-117968... | diff --git a/sympy/polys/domains/expressiondomain.py b/sympy/polys/domains/expressiondomain.py
--- a/sympy/polys/domains/expressiondomain.py
+++ b/sympy/polys/domains/expressiondomain.py
@@ -120,7 +120,7 @@ def __ne__(f, g):
return not f == g
def __bool__(f):
- return f.ex != 0
+ ... | diff --git a/sympy/polys/tests/test_polytools.py b/sympy/polys/tests/test_polytools.py
--- a/sympy/polys/tests/test_polytools.py
+++ b/sympy/polys/tests/test_polytools.py
@@ -1458,6 +1458,20 @@ def test_Poly_rat_clear_denoms():
assert f.rat_clear_denoms(g) == (f, g)
+def test_issue_20427():
+ f = Poly(-1179... | ["test_issue_20427"] | ["test_Poly_mixed_operations", "test_Poly_from_dict", "test_Poly_from_list", "test_Poly_from_poly", "test_Poly_from_expr", "test_poly_from_domain_element", "test_Poly__new__", "test_Poly__args", "test_Poly__gens", "test_Poly_zero", "test_Poly_one", "test_Poly__unify", "test_Poly_free_symbols", "test_PurePoly_free_symbo... | null | true | 2020-11-14T05:56:31Z | 1 | 2 | 1 | 3,619 | 0 | 1 | 1 | 0.77 | 0.4 | 0.506667 | 75.715 | ||
2,174 | swe_gym::train::223 | swe_gym | train | 223 | getmoto__moto-7270 | getmoto/moto | getmoto/moto | python | 496c1cd5594831bb8dcc55d5e11de7167cbf3c6f | Fix: Moto Doesn't Support Boto3 ListSecrets Key Filters for: 'primary-region', 'owning-service' etc.
Via this section in Moto: https://github.com/getmoto/moto/blob/master/moto/secretsmanager/models.py#L29
It's clear that Moto is not currently supporting the same criteria that Boto supports for Key Filter values. Those... | diff --git a/moto/secretsmanager/exceptions.py b/moto/secretsmanager/exceptions.py
--- a/moto/secretsmanager/exceptions.py
+++ b/moto/secretsmanager/exceptions.py
@@ -62,3 +62,10 @@ def __init__(self, message: str):
class ValidationException(SecretsManagerClientError):
def __init__(self, message: str):
s... | diff --git a/tests/test_secretsmanager/test_list_secrets.py b/tests/test_secretsmanager/test_list_secrets.py
--- a/tests/test_secretsmanager/test_list_secrets.py
+++ b/tests/test_secretsmanager/test_list_secrets.py
@@ -269,3 +269,13 @@ def test_with_filter_with_negation():
secret_names = list(map(lambda s: s["Na... | ["tests/test_secretsmanager/test_secrets_duplication.py::test_replicate_secret", "tests/test_secretsmanager/test_secrets_duplication.py::test_create_secret_that_duplicates__in_same_region", "tests/test_secretsmanager/test_secrets_duplication.py::test_replicate_secret__overwrite_existing_secret", "tests/test_secretsmana... | ["tests/test_secretsmanager/test_list_secrets.py::test_with_no_filter_values", "tests/test_secretsmanager/test_list_secrets.py::test_with_name_filter", "tests/test_secretsmanager/test_list_secrets.py::test_with_filter_with_multiple_values", "tests/test_secretsmanager/test_list_secrets.py::test_with_duplicate_filter_key... | null | true | 2024-01-29 18:33:33 | 4 | 269 | 11 | 3,202 | 0 | 0.85 | 1 | 0.62 | 0.6375 | 1 | 75.710625 | ||
2,175 | swe_gym::train::702 | swe_gym | train | 702 | iterative__dvc-5888 | iterative/dvc | iterative/dvc | python | 42cf394fde776b61f205374b3c40de2e22a6fc93 | list: Add --show-json (or similar flag)
In the vs code project we have a view that uses `dvc list . --dvc-only` to show all paths that are tracked by DVC in a tree view. Reasons for this view, some discussion around it and a short demo are shown here: https://github.com/iterative/vscode-dvc/issues/318.
At the moment ... | diff --git a/dvc/command/ls/__init__.py b/dvc/command/ls/__init__.py
--- a/dvc/command/ls/__init__.py
+++ b/dvc/command/ls/__init__.py
@@ -34,7 +34,11 @@ def run(self):
recursive=self.args.recursive,
dvc_only=self.args.dvc_only,
)
- if entries:
+ if s... | diff --git a/tests/unit/command/ls/test_ls.py b/tests/unit/command/ls/test_ls.py
--- a/tests/unit/command/ls/test_ls.py
+++ b/tests/unit/command/ls/test_ls.py
@@ -1,3 +1,6 @@
+import json
+import logging
+
from dvc.cli import parse_args
from dvc.command.ls import CmdList
@@ -52,3 +55,18 @@ def test_list_outputs_onl... | ["tests/unit/command/ls/test_ls.py::test_show_json"] | ["tests/unit/command/ls/test_ls.py::test_list_git_ssh_rev", "tests/unit/command/ls/test_ls.py::test_list_recursive", "tests/unit/command/ls/test_ls.py::test_list", "tests/unit/command/ls/test_ls.py::test_list_outputs_only", "tests/unit/command/ls/test_ls.py::test_list_targets"] | null | true | 2021-04-27T11:41:40Z | 1 | 9 | 1 | 1,133 | 0 | 0.85 | 1 | 0.4 | 1 | 0.218833 | 75.7065 | ||
2,176 | swe_gym::train::2279 | swe_gym | train | 2,279 | Project-MONAI__MONAI-3560 | Project-MONAI/MONAI | project-monai/monai | python | ba23afdd95e0d1ab0f9d17e43857f55897f54c1c | Enhance `DatasetSummary` for several points
**Is your feature request related to a problem? Please describe.**
Thanks for @dongyang0122 's great work to develop `DatasetSummary`, would be nice to enhance the below items:
1. It only has `meta_key_postfix` arg, missed `meta_key` to be consistent with other MONAI modules ... | diff --git a/monai/data/dataset_summary.py b/monai/data/dataset_summary.py
--- a/monai/data/dataset_summary.py
+++ b/monai/data/dataset_summary.py
@@ -15,8 +15,11 @@
import numpy as np
import torch
+from monai.config import KeysCollection
from monai.data.dataloader import DataLoader
from monai.data.dataset import... | diff --git a/tests/test_dataset_summary.py b/tests/test_dataset_summary.py
--- a/tests/test_dataset_summary.py
+++ b/tests/test_dataset_summary.py
@@ -22,6 +22,15 @@
from monai.utils import set_determinism
+def test_collate(batch):
+ elem = batch[0]
+ elem_type = type(elem)
+ if isinstance(elem, np.ndarra... | ["tests/test_dataset_summary.py::TestDatasetSummary::test_spacing_intensity"] | ["tests/test_dataset_summary.py::TestDatasetSummary::test_anisotropic_spacing"] | null | true | 2021-12-31T09:20:39Z | 1 | 30 | 1 | 706 | 0 | 0.85 | 1 | 0.4 | 1 | 0.217667 | 75.703 | ||
2,177 | swe_gym::train::664 | swe_gym | train | 664 | conan-io__conan-14397 | conan-io/conan | conan-io/conan | python | aca81fcad474ee783855a40ff6a815ac5662d7db | Add cli_args argument to cmake.install()
> > if self.settings.build_type == 'Release':
>
> Ok, makes sense, though nowadays, I'd expect that `Release` builds already don't contain any debug information to be stripped, I understand it might not be the case for all platforms and tools, so I am ok with makin... | diff --git a/conan/tools/cmake/cmake.py b/conan/tools/cmake/cmake.py
--- a/conan/tools/cmake/cmake.py
+++ b/conan/tools/cmake/cmake.py
@@ -163,7 +163,7 @@ def build(self, build_type=None, target=None, cli_args=None, build_tool_args=Non
self._conanfile.output.info("Running CMake.build()")
self._build(b... | diff --git a/conans/test/unittests/tools/cmake/test_cmake_install.py b/conans/test/unittests/tools/cmake/test_cmake_install.py
--- a/conans/test/unittests/tools/cmake/test_cmake_install.py
+++ b/conans/test/unittests/tools/cmake/test_cmake_install.py
@@ -63,3 +63,59 @@ def test_run_install_strip():
cmake = CMake(c... | ["conans/test/unittests/tools/cmake/test_cmake_install.py::test_run_install_cli_args_strip", "conans/test/unittests/tools/cmake/test_cmake_install.py::test_run_install_cli_args"] | ["conans/test/unittests/tools/cmake/test_cmake_install.py::test_run_install_component", "conans/test/unittests/tools/cmake/test_cmake_install.py::test_run_install_strip"] | null | true | 2023-07-30T10:24:41Z | 1 | 10 | 2 | 1,081 | 0 | 0.85 | 1 | 0.4 | 1 | 0.2135 | 75.6905 | ||
2,178 | swe_gym::train::2231 | swe_gym | train | 2,231 | Project-MONAI__MONAI-5254 | Project-MONAI/MONAI | project-monai/monai | python | 5b3b74143f9c8b985974e583b0a6f4029eef50e1 | `SpacingD` transform bug for certain affine input
I use the `SpacingD` transforms after `LoadImageD` and `AddChannelD`. I read in a nifti file of shape [368, 336, 368] , the input to the `spacingD` [1, 368, 336, 368]. The outputs of spacingD is a matrix with zeros.
I followed the trace and the last time I see non-ze... | diff --git a/monai/data/utils.py b/monai/data/utils.py
--- a/monai/data/utils.py
+++ b/monai/data/utils.py
@@ -875,17 +875,19 @@ def compute_shape_offset(
corners_out = inv_mat @ corners
corners_out = corners_out[:-1] / corners_out[-1]
out_shape = np.round(corners_out.ptp(axis=1)) if scale_extent else np... | diff --git a/tests/test_spacing.py b/tests/test_spacing.py
--- a/tests/test_spacing.py
+++ b/tests/test_spacing.py
@@ -230,6 +230,24 @@
*device,
]
)
+ TESTS.append( # 5D input
+ [
+ {"pixdim": 0.5, "padding_mode": "zeros", "mode": "nearest", "scale_extent": True},
+ ... | ["tests/test_spacing.py::TestSpacingCase::test_spacing_17"] | ["tests/test_spacing.py::TestSpacingCase::test_inverse_mn_mx_7", "tests/test_spacing.py::TestSpacingCase::test_spacing_torch_2", "tests/test_spacing.py::TestSpacingCase::test_spacing_10", "tests/test_spacing.py::TestSpacingCase::test_inverse_2", "tests/test_spacing.py::TestSpacingCase::test_inverse_mn_mx_5", "tests/tes... | null | true | 2022-10-03T17:24:48Z | 1 | 12 | 1 | 1,010 | 0 | 0.85 | 1 | 0.4 | 1 | 0.208333 | 75.675 | ||
2,179 | swe_gym::train::352 | swe_gym | train | 352 | python__mypy-10392 | python/mypy | python/mypy | python | 322ef60ba7231bbd4f735b273e88e67afb57ad17 | Look into @python2 subdirectories of mypy search path entries in Python 2 mode
Typeshed uses the `@python2` subdirectory for Python 2 variants of stubs. Mypy could also support this convention for custom search paths. This would make dealing with mixed Python 2/3 codebases a little easier.
If there is a user-defined m... | diff --git a/mypy/modulefinder.py b/mypy/modulefinder.py
--- a/mypy/modulefinder.py
+++ b/mypy/modulefinder.py
@@ -627,6 +627,25 @@ def _make_abspath(path: str, root: str) -> str:
return os.path.join(root, os.path.normpath(path))
+def add_py2_mypypath_entries(mypypath: List[str]) -> List[str]:
+ """Add ... | diff --git a/test-data/unit/check-modules.test b/test-data/unit/check-modules.test
--- a/test-data/unit/check-modules.test
+++ b/test-data/unit/check-modules.test
@@ -2843,3 +2843,41 @@ __all__ = ['C']
[file m4.pyi]
class C: pass
[builtins fixtures/list.pyi]
+
+[case testMypyPathAndPython2Dir_python2]
+# flags: --co... | ["mypy/test/testcheck.py::TypeCheckSuite::testMypyPathAndPython2Dir_python2"] | ["mypy/test/testcheck.py::TypeCheckSuite::testMypyPathAndPython2Dir"] | null | true | 2021-04-30T15:58:20Z | 1 | 24 | 1 | 761 | 0 | 0.85 | 1 | 0.4 | 1 | 0.206833 | 75.6705 | ||
2,180 | swe_gym::train::2197 | swe_gym | train | 2,197 | Project-MONAI__MONAI-2178 | Project-MONAI/MONAI | project-monai/monai | python | 6b0df49aa94560ea855a77eb9018ed1ea0645a83 | Add max_roi_size support in `RandSpatialCrop`
**Is your feature request related to a problem? Please describe.**
Currently, when we do spatial crop, we can select a random size in (roi_size, image_size) where roi_size is the min_size. So we also need to support a max roi_size. | diff --git a/monai/transforms/croppad/array.py b/monai/transforms/croppad/array.py
--- a/monai/transforms/croppad/array.py
+++ b/monai/transforms/croppad/array.py
@@ -298,15 +298,23 @@ class RandSpatialCrop(Randomizable):
roi_size: if `random_size` is True, it specifies the minimum crop region.
if... | diff --git a/tests/test_inverse.py b/tests/test_inverse.py
--- a/tests/test_inverse.py
+++ b/tests/test_inverse.py
@@ -159,9 +159,9 @@
)
)
-TESTS.append(("RandSpatialCropd 2d", "2D", 0, RandSpatialCropd(KEYS, [96, 93], True, False)))
+TESTS.append(("RandSpatialCropd 2d", "2D", 0, RandSpatialCropd(KEYS, [96, 93]... | ["tests/test_rand_spatial_cropd.py::TestRandSpatialCropd::test_random_shape_1", "tests/test_rand_spatial_cropd.py::TestRandSpatialCropd::test_random_shape_0", "tests/test_rand_spatial_crop.py::TestRandSpatialCrop::test_random_shape_0", "tests/test_rand_spatial_crop.py::TestRandSpatialCrop::test_random_shape_1"] | ["tests/test_inverse.py::TestInverse::test_inverse_170_RandSpatialCropd_3d_Compose", "tests/test_inverse.py::TestInverse::test_inverse_140_RandSpatialCropd1D_odd_Compose", "tests/test_inverse.py::TestInverse::test_inverse_202_Transposed_3d_Compose", "tests/test_inverse.py::TestInverse::test_inverse_162_SpatialCropdbad_... | null | true | 2021-05-12T04:10:26Z | 2 | 47 | 4 | 277 | 0 | 0.85 | 1 | 0.4 | 1 | 0.202833 | 75.6585 | ||
2,181 | swe_gym::train::1952 | swe_gym | train | 1,952 | bokeh__bokeh-13422 | bokeh/bokeh | bokeh/bokeh | python | cf57b9ae0073ecf0434a8c10002a70f6bf2079cd | bokeh info should report jupyter_bokeh version if installed
Currently have to actively solicit this information in bug reports, having `bokeh info` report it would save some back and forth.
The module to update is here:
https://github.com/bokeh/bokeh/blob/branch-3.3/src/bokeh/command/subcommands/info.py
And the corr... | diff --git a/src/bokeh/command/subcommands/info.py b/src/bokeh/command/subcommands/info.py
--- a/src/bokeh/command/subcommands/info.py
+++ b/src/bokeh/command/subcommands/info.py
@@ -17,14 +17,15 @@
.. code-block:: none
- Python version : 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46)
... | diff --git a/tests/unit/bokeh/command/subcommands/test_info.py b/tests/unit/bokeh/command/subcommands/test_info.py
--- a/tests/unit/bokeh/command/subcommands/test_info.py
+++ b/tests/unit/bokeh/command/subcommands/test_info.py
@@ -18,6 +18,7 @@
# Standard library imports
from os.path import join
+from typing import... | ["tests/unit/bokeh/command/subcommands/test_info.py::test_run"] | ["tests/unit/bokeh/command/subcommands/test_info.py::test_name", "tests/unit/bokeh/command/subcommands/test_info.py::test_run_static", "tests/unit/bokeh/command/subcommands/test_info.py::test_help", "tests/unit/bokeh/command/subcommands/test_info.py::test_create", "tests/unit/bokeh/command/subcommands/test_info.py::tes... | null | true | 2023-10-10T12:34:44Z | 1 | 38 | 1 | 448 | 0 | 0.85 | 1 | 0.4 | 1 | 0.201333 | 75.654 | ||
2,182 | swe_gym::train::217 | swe_gym | train | 217 | getmoto__moto-7647 | getmoto/moto | getmoto/moto | python | 98ad497eb4de25943ceadabe7c2c5c73cc810e27 | Use execution parameters in Athena backend
I'm trying to update the AthenaBackend, so I will be able to create a mock based on common SQL statements I use in my tests.
I changes the start_query_execution and get_query_results methods, and it works well for me.
I'm missing in both statements the query execution paramet... | diff --git a/moto/athena/models.py b/moto/athena/models.py
--- a/moto/athena/models.py
+++ b/moto/athena/models.py
@@ -86,13 +86,19 @@ def __init__(
class Execution(BaseModel):
def __init__(
- self, query: str, context: str, config: Dict[str, Any], workgroup: WorkGroup
+ self,
+ query: str,... | diff --git a/tests/test_athena/test_athena.py b/tests/test_athena/test_athena.py
--- a/tests/test_athena/test_athena.py
+++ b/tests/test_athena/test_athena.py
@@ -174,6 +174,22 @@ def test_get_query_execution(location):
assert "WorkGroup" not in details
+@mock_aws
+def test_get_query_execution_with_execution_p... | ["tests/test_athena/test_athena.py::test_get_query_execution_with_execution_parameters"] | ["tests/test_athena/test_athena.py::test_stop_query_execution", "tests/test_athena/test_athena.py::test_start_query_execution_without_result_configuration", "tests/test_athena/test_athena.py::test_get_query_execution[s3://bucket-name/prefix/]", "tests/test_athena/test_athena.py::test_get_query_results_queue", "tests/te... | null | true | 2024-04-30 19:03:32 | 2 | 32 | 1 | 566 | 0 | 0.85 | 1 | 0.4 | 1 | 0.201 | 75.653 | ||
2,183 | swe_bench_promax::test::25 | swe_bench_promax | test | 25 | davidesantangelo__krep-18 | davidesantangelo/krep | davidesantangelo/krep | c | 0f58b802d94436ef066b87d52d918138a87fe2e0 | The library’s search entry points have transitioned to a struct-based public API centered on `search_params_t`, but the test suite still mixes legacy “direct argument” calls with struct-based calls across different compilation units. This causes compilation failures and, depending on include order, can also lead to inc... | diff --git a/aho_corasick.h b/aho_corasick.h
new file mode 100644
--- /dev/null
+++ b/aho_corasick.h
@@ -0,0 +1,41 @@
+/* aho_corasick.h - Header for memory-optimized implementation of Aho-Corasick algorithm
+ *
+ * This file declares the interface for the Aho-Corasick string matching algorithm
+ * used in krep for eff... | diff --git a/test/test_compat.h b/test/test_compat.h
--- a/test/test_compat.h
+++ b/test/test_compat.h
@@ -214,12 +214,78 @@ static inline uint64_t memchr_short_search_compat(
return memchr_short_search(¶ms, text, effective_len, NULL);
}
-/* Redefine the function names to use the compatibility versions */
+... | null | null | key4127/refactor-dockerhub:davidesantangelo__krep-18 | true | 1744106117 | 1 | 41 | null | 3,265 | 0 | 0.9 | 1 | 0.32 | 1 | 0.636667 | 75.63 | ||
2,184 | swe_gym::train::1118 | swe_gym | train | 1,118 | pydantic__pydantic-6043 | pydantic/pydantic | pydantic/pydantic | python | d476599cdd956284595034d7d9fd046569a0574c | Produce best-effort deterministically sorted json schemas
A lot of our tests, and probably user tests as well, at least via FastAPI, make assertions about the JSON schemas. It is very convenient for the order of keys and items in these schemas to be as deterministic as possible so that tests don't have to change if the... | diff --git a/pydantic/json_schema.py b/pydantic/json_schema.py
--- a/pydantic/json_schema.py
+++ b/pydantic/json_schema.py
@@ -261,7 +261,7 @@ def generate_definitions(
refs_map[(key, mode)] = defs_ref
self._used = True
- return refs_map, self.definitions
+ return refs_map,... | diff --git a/tests/test_json_schema.py b/tests/test_json_schema.py
--- a/tests/test_json_schema.py
+++ b/tests/test_json_schema.py
@@ -114,7 +114,7 @@ class ApplePie(BaseModel):
},
'required': ['Snap'],
}
- assert list(ApplePie.model_json_schema(by_alias=True)['properties'].keys()) == ['Snap',... | ["tests/test_json_schema.py::test_by_alias"] | ["tests/test_json_schema.py::test_ipv6network_type", "tests/test_json_schema.py::test_override_generate_json_schema", "tests/test_json_schema.py::test_secret_types[SecretStr-string]", "tests/test_json_schema.py::test_invalid_json_schema_extra", "tests/test_json_schema.py::test_model_with_schema_extra_callable_config_cl... | null | true | 2023-06-08T03:05:00Z | 1 | 19 | 1 | 780 | 0 | 0.85 | 1 | 0.4 | 1 | 0.193333 | 75.63 | ||
2,185 | swe_gym::train::2008 | swe_gym | train | 2,008 | Project-MONAI__MONAI-7318 | Project-MONAI/MONAI | project-monai/monai | python | b1c8b42d03bf3c1daabd6c39a35fcbdadb57e8b0 | Support specified filenames in `Saveimage`
Now `SaveImage` only supports specified the `output_name_formatter` which makes it a little complicated for users.
https://github.com/Project-MONAI/MONAI/blob/b1c8b42d03bf3c1daabd6c39a35fcbdadb57e8b0/monai/transforms/io/array.py#L393C14-L393C14
Add support specified `filename... | diff --git a/monai/transforms/io/array.py b/monai/transforms/io/array.py
--- a/monai/transforms/io/array.py
+++ b/monai/transforms/io/array.py
@@ -414,6 +414,9 @@ def __init__(
self.fname_formatter = output_name_formatter
self.output_ext = output_ext.lower() or output_format.lower()
+ sel... | diff --git a/tests/test_save_image.py b/tests/test_save_image.py
--- a/tests/test_save_image.py
+++ b/tests/test_save_image.py
@@ -37,6 +37,8 @@
False,
]
+TEST_CASE_5 = [torch.randint(0, 255, (3, 2, 4, 5), dtype=torch.uint8), ".dcm", False]
+
@unittest.skipUnless(has_itk, "itk not installed")
class TestSave... | ["tests/test_save_image.py::TestSaveImage::test_saved_content_with_filename_0"] | ["tests/test_save_image.py::TestSaveImage::test_saved_content_3", "tests/test_save_image.py::TestSaveImage::test_saved_content_1", "tests/test_save_image.py::TestSaveImage::test_saved_content_0", "tests/test_save_image.py::TestSaveImage::test_saved_content_2"] | null | true | 2023-12-13T09:26:00Z | 1 | 17 | 1 | 795 | 0 | 0.85 | 1 | 0.4 | 1 | 0.189167 | 75.6175 | ||
2,186 | swe_gym::train::132 | swe_gym | train | 132 | getmoto__moto-5509 | getmoto/moto | getmoto/moto | python | 3118090fdc38de64e0a7aef969b3b1992c1703f5 | moto's ec2 ReplaceRouteTableAssociationResponse lacks associationState element
Calling ec2:ReplaceRouteTableAssociation returns an incomplete response, lacking associationState element, which may confuse some external tools.
This is fixed by an upcoming patch. This bug report is for issue tracking purposes only. | diff --git a/moto/ec2/models/route_tables.py b/moto/ec2/models/route_tables.py
--- a/moto/ec2/models/route_tables.py
+++ b/moto/ec2/models/route_tables.py
@@ -25,8 +25,10 @@ def __init__(self, ec2_backend, route_table_id, vpc_id, main=False):
self.ec2_backend = ec2_backend
self.id = route_table_id
... | diff --git a/tests/test_ec2/test_route_tables.py b/tests/test_ec2/test_route_tables.py
--- a/tests/test_ec2/test_route_tables.py
+++ b/tests/test_ec2/test_route_tables.py
@@ -185,7 +185,7 @@ def test_route_tables_filters_associations():
)["RouteTables"]
association1_route_tables.should.have.length_of(1)
... | ["tests/test_ec2/test_route_tables.py::test_route_table_associations", "tests/test_ec2/test_route_tables.py::test_route_tables_filters_associations", "tests/test_ec2/test_route_tables.py::test_associate_route_table_by_gateway", "tests/test_ec2/test_route_tables.py::test_route_table_replace_route_table_association_for_m... | ["tests/test_ec2/test_route_tables.py::test_create_route_with_invalid_destination_cidr_block_parameter", "tests/test_ec2/test_route_tables.py::test_routes_additional", "tests/test_ec2/test_route_tables.py::test_describe_route_tables_with_nat_gateway", "tests/test_ec2/test_route_tables.py::test_route_tables_defaults", "... | null | true | 2022-09-30 18:57:18 | 2 | 41 | 6 | 314 | 0 | 0.85 | 1 | 0.4 | 1 | 0.189 | 75.617 | ||
2,187 | swe_gym::train::773 | swe_gym | train | 773 | iterative__dvc-4848 | iterative/dvc | iterative/dvc | python | 251a3269c2c5f7e39938274b06fca319de1bf79b | dvc version: show external cache and remotes being used
This would have made my life easier when investigating https://github.com/iterative/dvc/pull/4570.
Another question to ask is that `dvc version` can only have a limited amount of information. Should there be `dvc version --json`? | diff --git a/dvc/info.py b/dvc/info.py
--- a/dvc/info.py
+++ b/dvc/info.py
@@ -8,7 +8,7 @@
from dvc.repo import Repo
from dvc.scm.base import SCMError
from dvc.system import System
-from dvc.tree import TREES
+from dvc.tree import TREES, get_tree_cls, get_tree_config
from dvc.utils import error_link
from dvc.utils... | diff --git a/tests/func/test_version.py b/tests/func/test_version.py
--- a/tests/func/test_version.py
+++ b/tests/func/test_version.py
@@ -11,4 +11,6 @@ def test_(tmp_dir, dvc, scm, caplog):
assert re.search(f"Platform: {PYTHON_VERSION_REGEX} on .*", caplog.text)
assert re.search(r"Supports: .*", caplog.text)... | ["tests/unit/test_info.py::test_caches", "tests/func/test_version.py::test_", "tests/unit/test_info.py::test_remotes", "tests/unit/test_info.py::test_remotes_empty"] | ["tests/unit/test_info.py::test_fs_info_outside_of_repo", "tests/unit/test_info.py::test_info_in_repo[True]", "tests/unit/test_info.py::test_info_outside_of_repo", "tests/unit/test_info.py::test_fs_info_in_repo", "tests/unit/test_info.py::test_info_in_repo[False]", "tests/unit/test_info.py::test_info_in_subdir", "tests... | null | true | 2020-11-05T15:37:15Z | 2 | 42 | 4 | 286 | 0 | 0.85 | 1 | 0.4 | 1 | 0.187667 | 75.613 | ||
2,188 | swe_bench_verified::test::294 | swe_bench_verified | test | 294 | psf__requests-2317 | psf/requests | psf/requests | python | 091991be0da19de9108dbe5e3752917fea3d7fdc | method = builtin_str(method) problem
In requests/sessions.py is a command:
method = builtin_str(method)
Converts method from
b’GET’
to
"b'GET’"
Which is the literal string, no longer a binary string. When requests tries to use the method "b'GET’”, it gets a 404 Not Found response.
I am using python3.4 and python-ne... | Ugh. This should have been caught and replaced with `to_native_str`. This is definitely a requests bug.
| diff --git a/requests/sessions.py b/requests/sessions.py
--- a/requests/sessions.py
+++ b/requests/sessions.py
@@ -13,7 +13,7 @@
from datetime import datetime
from .auth import _basic_auth_str
-from .compat import cookielib, OrderedDict, urljoin, urlparse, builtin_str
+from .compat import cookielib, OrderedDict, ur... | diff --git a/test_requests.py b/test_requests.py
--- a/test_requests.py
+++ b/test_requests.py
@@ -1389,6 +1389,11 @@ def test_total_timeout_connect(self):
except ConnectTimeout:
pass
+ def test_encoded_methods(self):
+ """See: https://github.com/kennethreitz/requests/issues/2316"""
+ ... | ["test_requests.py::RequestsTestCase::test_HTTP_302_ALLOW_REDIRECT_GET", "test_requests.py::RequestsTestCase::test_POSTBIN_GET_POST_FILES", "test_requests.py::RequestsTestCase::test_POSTBIN_GET_POST_FILES_WITH_DATA", "test_requests.py::RequestsTestCase::test_basicauth_with_netrc", "test_requests.py::RequestsTestCase::t... | ["test_requests.py::RequestsTestCase::test_BASICAUTH_TUPLE_HTTP_200_OK_GET", "test_requests.py::RequestsTestCase::test_DIGESTAUTH_QUOTES_QOP_VALUE", "test_requests.py::RequestsTestCase::test_DIGESTAUTH_WRONG_HTTP_401_GET", "test_requests.py::RequestsTestCase::test_DIGEST_AUTH_RETURNS_COOKIE", "test_requests.py::Request... | null | true | 2014-11-01T02:20:16Z | 1 | 4 | 8 | 839 | 0 | 1 | 1 | 0.4 | 0.8 | 0.153167 | 75.6095 | |
2,189 | swe_gym::train::2165 | swe_gym | train | 2,165 | Project-MONAI__MONAI-3796 | Project-MONAI/MONAI | project-monai/monai | python | e2fcb974d7f9d85bb4549f422cc3831086d8b5ae | Add `ensure_channel_first` option to LoadImaged
**Is your feature request related to a problem? Please describe.**
After offline discussion with @wyli and @holgerroth , seems for most user cases, need to call `LoadImaged` + `EnsureChannelFirstd` together and we came across the channel dim issue multiple times.
Would b... | diff --git a/monai/transforms/io/array.py b/monai/transforms/io/array.py
--- a/monai/transforms/io/array.py
+++ b/monai/transforms/io/array.py
@@ -24,11 +24,12 @@
import numpy as np
import torch
-from monai.config import DtypeLike, PathLike
+from monai.config import DtypeLike, NdarrayOrTensor, PathLike
from monai.... | diff --git a/tests/test_load_image.py b/tests/test_load_image.py
--- a/tests/test_load_image.py
+++ b/tests/test_load_image.py
@@ -116,7 +116,11 @@ def get_data(self, _obj):
TEST_CASE_13 = [{"reader": "nibabelreader", "channel_dim": 0}, "test_image.nii.gz", (3, 128, 128, 128)]
-TEST_CASE_14 = [{"reader": "nibabelr... | ["tests/test_load_image.py::TestLoadImage::test_channel_dim_1", "tests/test_load_imaged.py::TestConsistency::test_png"] | ["tests/test_load_image.py::TestLoadImage::test_channel_dim_2", "tests/test_load_image.py::TestLoadImage::test_my_reader", "tests/test_load_image.py::TestLoadImage::test_nibabel_reader_2", "tests/test_load_image.py::TestLoadImage::test_nibabel_reader_6", "tests/test_load_image.py::TestLoadImage::test_nibabel_reader_1",... | null | true | 2022-02-12T16:32:55Z | 2 | 30 | 2 | 512 | 0 | 0.85 | 1 | 0.4 | 1 | 0.185333 | 75.606 | ||
2,190 | swe_gym::train::753 | swe_gym | train | 753 | iterative__dvc-6845 | iterative/dvc | iterative/dvc | python | 922eb20e44ba4da8e0bb3ccc9e8da5fd41d9717b | plots --open: not working on macOS
We use relpath to open files in the browser.
https://github.com/iterative/dvc/blob/59cfc2c4a43e9b9d2fdb583da80d24e82ae39c26/dvc/command/plots.py#L60
This is mostly done to support `wsl`, and the fact that all other Platform seem to work, if it's relative or absolute.
The reason why... | diff --git a/dvc/command/plots.py b/dvc/command/plots.py
--- a/dvc/command/plots.py
+++ b/dvc/command/plots.py
@@ -68,8 +68,12 @@ def run(self):
if self.args.open:
import webbrowser
+ from platform import uname
- opened = webbrowser.open(index_path)
+ ... | diff --git a/tests/unit/command/test_plots.py b/tests/unit/command/test_plots.py
--- a/tests/unit/command/test_plots.py
+++ b/tests/unit/command/test_plots.py
@@ -1,5 +1,6 @@
import os
import posixpath
+from pathlib import Path
import pytest
@@ -149,12 +150,31 @@ def test_plots_diff_open(tmp_dir, dvc, mocker, ca... | ["tests/unit/command/test_plots.py::test_plots_diff_open_WSL", "tests/unit/command/test_plots.py::test_plots_diff_open_failed", "tests/unit/command/test_plots.py::test_plots_diff_open"] | ["tests/unit/command/test_plots.py::test_plots_path_is_quoted_and_resolved_properly[quote]", "tests/unit/command/test_plots.py::test_plots_show_vega", "tests/unit/command/test_plots.py::test_should_call_render[some_out]", "tests/unit/command/test_plots.py::test_should_call_render[to/subdir]", "tests/unit/command/test_p... | null | true | 2021-10-20T21:32:07Z | 1 | 6 | 3 | 979 | 0 | 0.85 | 1 | 0.4 | 1 | 0.183167 | 75.5995 | ||
2,191 | swe_gym::train::936 | swe_gym | train | 936 | dask__dask-8610 | dask/dask | dask/dask | python | 08eee6d655459e9b8494d67957b6fe908e1b8c67 | Add scheduler option to `assert_eq` utilities
In https://github.com/dask/dask/pull/8559 we added a `scheduler=` keyword argument to `dask.dataframe.assert_eq` to allow for cases where we want to run the computes that happen in `assert_eq` on a specified scheduler. As a follow-up, we should add a similar `scheduler=` ke... | diff --git a/dask/array/utils.py b/dask/array/utils.py
--- a/dask/array/utils.py
+++ b/dask/array/utils.py
@@ -226,7 +226,9 @@ def _check_chunks(x):
return x
-def _get_dt_meta_computed(x, check_shape=True, check_graph=True, check_chunks=True):
+def _get_dt_meta_computed(
+ x, check_shape=True, check_graph=T... | diff --git a/dask/array/tests/test_array_utils.py b/dask/array/tests/test_array_utils.py
--- a/dask/array/tests/test_array_utils.py
+++ b/dask/array/tests/test_array_utils.py
@@ -2,7 +2,9 @@
import pytest
import dask.array as da
+from dask.array.core import Array
from dask.array.utils import assert_eq, meta_from_a... | ["dask/array/tests/test_array_utils.py::test_assert_eq_scheduler[a2-b2]"] | ["dask/array/tests/test_array_utils.py::test_meta_from_array_literal[bool-0]", "dask/array/tests/test_array_utils.py::test_meta_from_array_literal[bool-str1]", "dask/array/tests/test_array_utils.py::test_meta_from_array[asarray]", "dask/array/tests/test_array_utils.py::test_meta_from_array_literal[None-str1]", "dask/ar... | null | true | 2022-01-23T09:26:32Z | 2 | 25 | 1 | 599 | 0 | 0.85 | 1 | 0.4 | 1 | 0.183167 | 75.5995 | ||
2,192 | swe_gym::train::2186 | swe_gym | train | 2,186 | Project-MONAI__MONAI-1608 | Project-MONAI/MONAI | project-monai/monai | python | 75b78cd165362fb2b84f4d1fd242a83a7bd82318 | Replace previous checkpoints while resuming training
`CheckpointSaver` saves model checkpoints for `key_metric_n_saved` number of best validation score and `n_saved`number of the last model. While resuming training, the filename buffer starts from empty. Thus it creates a whole new set of checkpoint files after each re... | diff --git a/monai/handlers/checkpoint_saver.py b/monai/handlers/checkpoint_saver.py
--- a/monai/handlers/checkpoint_saver.py
+++ b/monai/handlers/checkpoint_saver.py
@@ -10,6 +10,7 @@
# limitations under the License.
import logging
+import warnings
from typing import TYPE_CHECKING, Dict, Optional
from monai.ut... | diff --git a/tests/test_handler_checkpoint_saver.py b/tests/test_handler_checkpoint_saver.py
--- a/tests/test_handler_checkpoint_saver.py
+++ b/tests/test_handler_checkpoint_saver.py
@@ -20,9 +20,9 @@
from ignite.engine import Engine
from parameterized import parameterized
-from monai.handlers import CheckpointSave... | ["tests/test_handler_checkpoint_saver.py::TestHandlerCheckpointSaver::test_file_1", "tests/test_handler_checkpoint_saver.py::TestHandlerCheckpointSaver::test_file_0", "tests/test_handler_checkpoint_saver.py::TestHandlerCheckpointSaver::test_file_4", "tests/test_handler_checkpoint_saver.py::TestHandlerCheckpointSaver::t... | ["tests/test_handler_checkpoint_saver.py::TestHandlerCheckpointSaver::test_exception"] | null | true | 2021-02-22T04:06:36Z | 1 | 33 | 8 | 436 | 0 | 0.85 | 1 | 0.4 | 1 | 0.182667 | 75.598 | ||
2,193 | swe_gym::train::1960 | swe_gym | train | 1,960 | Project-MONAI__MONAI-4800 | Project-MONAI/MONAI | project-monai/monai | python | 288edee10dee580f99c594bdcc4909bd1623c6b5 | 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 futurewarning
... | diff --git a/monai/utils/deprecate_utils.py b/monai/utils/deprecate_utils.py
--- a/monai/utils/deprecate_utils.py
+++ b/monai/utils/deprecate_utils.py
@@ -27,15 +27,19 @@ class DeprecatedError(Exception):
pass
-def warn_deprecated(obj, msg):
+def warn_deprecated(obj, msg, warning_category=FutureWarning):
... | diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
--- a/tests/test_deprecated.py
+++ b/tests/test_deprecated.py
@@ -38,7 +38,7 @@ def test_warning_milestone(self):
def foo2():
pass
- self.assertWarns(DeprecationWarning, foo2)
+ self.assertWarns(FutureWarning, foo2)
... | ["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_deprecated.py::TestDeprecated::test_class_warnin... | ["tests/test_deprecated.py::TestDeprecated::test_replacement_arg2", "tests/test_deprecated.py::TestDeprecatedRC::test_warning_beyond", "tests/test_deprecated.py::TestDeprecated::test_class_except1", "tests/test_deprecated.py::TestDeprecatedRC::test_warning_last", "tests/test_deprecated.py::TestDeprecated::test_future",... | null | true | 2022-07-30T16:19:18Z | 1 | 25 | 9 | 591 | 0 | 0.85 | 1 | 0.4 | 1 | 0.181833 | 75.5955 | ||
2,194 | swe_bench_verified::test::74 | swe_bench_verified | test | 74 | django__django-12193 | django/django | django/django | python | 3fb7c12158a2402f0f80824f6778112071235803 | SplitArrayField with BooleanField always has widgets checked after the first True value.
Description
(last modified by Peter Andersen)
When providing a SplitArrayField BooleanField with preexisting data, the final_attrs dict is updated to include 'checked': True after the for loop has reached the first True value i... | Changes available here: https://github.com/django/django/pull/12193
Thanks for the report. Reproduced at 5708327c3769262b845730996ca2784245ada4d1. | diff --git a/django/forms/widgets.py b/django/forms/widgets.py
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -522,9 +522,7 @@ def format_value(self, value):
def get_context(self, name, value, attrs):
if self.check_test(value):
- if attrs is None:
- attrs = {}
-... | diff --git a/tests/forms_tests/widget_tests/test_checkboxinput.py b/tests/forms_tests/widget_tests/test_checkboxinput.py
--- a/tests/forms_tests/widget_tests/test_checkboxinput.py
+++ b/tests/forms_tests/widget_tests/test_checkboxinput.py
@@ -89,3 +89,8 @@ def test_value_from_datadict_string_int(self):
def test_va... | ["test_get_context_does_not_mutate_attrs (forms_tests.widget_tests.test_checkboxinput.CheckboxInputTest)"] | ["test_render_check_exception (forms_tests.widget_tests.test_checkboxinput.CheckboxInputTest)", "test_render_check_test (forms_tests.widget_tests.test_checkboxinput.CheckboxInputTest)", "test_render_empty (forms_tests.widget_tests.test_checkboxinput.CheckboxInputTest)", "test_render_false (forms_tests.widget_tests.test... | null | true | 2019-12-08T01:38:25Z | 1 | 4 | 1 | 768 | 0 | 1 | 1 | 0.4 | 0.8 | 0.141333 | 75.574 | |
2,195 | swe_gym::train::2270 | swe_gym | train | 2,270 | Project-MONAI__MONAI-6271 | Project-MONAI/MONAI | project-monai/monai | python | bb4df37ab17e2e1fc136fd3a28ce3178506db654 | Upgrade base PyTorch docker to 23.03
**Is your feature request related to a problem? Please describe.**
As PyTorch 23.03 was released, and we plan to use it as the final base docker for MONAI 1.2.
https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch
Would be nice to upgrade the base docker and CI tests to 23.0... | diff --git a/monai/networks/blocks/selfattention.py b/monai/networks/blocks/selfattention.py
--- a/monai/networks/blocks/selfattention.py
+++ b/monai/networks/blocks/selfattention.py
@@ -25,13 +25,21 @@ class SABlock(nn.Module):
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://ar... | diff --git a/tests/test_selfattention.py b/tests/test_selfattention.py
--- a/tests/test_selfattention.py
+++ b/tests/test_selfattention.py
@@ -52,6 +52,26 @@ def test_ill_arg(self):
with self.assertRaises(ValueError):
SABlock(hidden_size=620, num_heads=8, dropout_rate=0.4)
+ def test_access_a... | ["tests/test_selfattention.py::TestResBlock::test_access_attn_matrix"] | ["tests/test_selfattention.py::TestResBlock::test_shape_06", "tests/test_selfattention.py::TestResBlock::test_shape_58", "tests/test_selfattention.py::TestResBlock::test_shape_27", "tests/test_selfattention.py::TestResBlock::test_shape_52", "tests/test_selfattention.py::TestResBlock::test_shape_37", "tests/test_selfatt... | null | true | 2023-04-03T02:20:21Z | 2 | 36 | 1 | 327 | 0 | 0.85 | 1 | 0.4 | 1 | 0.1745 | 75.5735 | ||
2,196 | swe_gym::train::1945 | swe_gym | train | 1,945 | bokeh__bokeh-12902 | bokeh/bokeh | bokeh/bokeh | python | 00fd457ddb08027915d25a2fed7368bbbae95807 | `load_notebook()` uses non-unique DOM element IDs
In jupyter lab this can result in autoload nb code not being able to update "BokehJS is loading ..." in the current tab, because it updates it in a different one. This makes it look like bokehjs failed to load. | diff --git a/src/bokeh/embed/util.py b/src/bokeh/embed/util.py
--- a/src/bokeh/embed/util.py
+++ b/src/bokeh/embed/util.py
@@ -38,7 +38,7 @@
from ..settings import settings
from ..themes.theme import Theme
from ..util.dataclasses import dataclass, field
-from ..util.serialization import make_globally_unique_id
+from... | diff --git a/tests/unit/bokeh/embed/test_standalone.py b/tests/unit/bokeh/embed/test_standalone.py
--- a/tests/unit/bokeh/embed/test_standalone.py
+++ b/tests/unit/bokeh/embed/test_standalone.py
@@ -217,8 +217,9 @@ def test_return_type(self) -> None:
assert isinstance(divs3, OrderedDict)
assert all(is... | ["tests/unit/bokeh/util/test_util__serialization.py::test_make_globally_unique_css_safe_id", "tests/unit/bokeh/embed/test_standalone.py::Test_components::test_plot_dict_returned_when_wrap_plot_info_is_false", "tests/unit/bokeh/embed/test_standalone.py::Test_components::test_div_attrs"] | ["tests/unit/bokeh/embed/test_standalone.py::Test_json_item::test_apply_theme", "tests/unit/bokeh/util/test_util__serialization.py::test_transform_array[dt1]", "tests/unit/bokeh/util/test_util__serialization.py::test_convert_datetime_type_array_ignores_non_datetime_array", "tests/unit/bokeh/util/test_util__serializatio... | null | true | 2023-03-05T13:35:25Z | 3 | 39 | 3 | 260 | 0 | 0.85 | 1 | 0.4 | 1 | 0.173333 | 75.57 | ||
2,197 | swe_gym::train::2053 | swe_gym | train | 2,053 | Project-MONAI__MONAI-3113 | Project-MONAI/MONAI | project-monai/monai | python | e0f84f2a858bbcab341251898438a53dc9700095 | Reduce code duplication -- Random dictionary transforms that can't call their array version
We have both array and dictionary transforms. In a lot of cases, our dictionary transforms include a for loop that repeatedly call the matching array transform. However, because most random array transforms have something like t... | diff --git a/monai/transforms/spatial/array.py b/monai/transforms/spatial/array.py
--- a/monai/transforms/spatial/array.py
+++ b/monai/transforms/spatial/array.py
@@ -722,19 +722,24 @@ def __init__(self, prob: float = 0.1, max_k: int = 3, spatial_axes: Tuple[int, i
self._rand_k = 0
def randomize(self, d... | diff --git a/tests/test_integration_determinism.py b/tests/test_integration_determinism.py
--- a/tests/test_integration_determinism.py
+++ b/tests/test_integration_determinism.py
@@ -81,7 +81,7 @@ def test_training(self):
loss, step = run_test(device=self.device)
print(f"Deterministic loss {loss} at t... | ["tests/test_rand_rotated.py::TestRandRotated2D::test_correct_results_4", "tests/test_rand_zoomd.py::TestRandZoomd::test_correct_results_0", "tests/test_rand_rotated.py::TestRandRotated2D::test_correct_results_6", "tests/test_rand_rotated.py::TestRandRotated2D::test_correct_results_3", "tests/test_rand_axis_flipd.py::T... | ["tests/test_rand_rotated.py::TestRandRotated3D::test_correct_shapes_14", "tests/test_rand_rotated.py::TestRandRotated3D::test_correct_shapes_05", "tests/test_rand_rotate90.py::TestRandRotate90::test_k", "tests/test_rand_rotate90d.py::TestRandRotate90d::test_no_key", "tests/test_rand_rotated.py::TestRandRotated3D::test... | null | true | 2021-10-12T11:43:07Z | 2 | 316 | 12 | 1,337 | 0 | 0.85 | 1 | 0.55 | 0.75 | 0.722833 | 75.556 | ||
2,198 | swe_gym::train::2293 | swe_gym | train | 2,293 | Project-MONAI__MONAI-4721 | Project-MONAI/MONAI | project-monai/monai | python | 345b8ae72870828d23383013a2b4e222f8898b26 | Enhance bundle.read_config to pick either yaml or json automatically
https://github.com/Project-MONAI/model-zoo/tree/dev/models/pancreas_ct_dints_segmentation/configs
vs
https://github.com/Project-MONAI/model-zoo/tree/dev/models/spleen_ct_segmentation/configs
One using yaml and other using json.
If we want to use htt... | diff --git a/monai/bundle/config_parser.py b/monai/bundle/config_parser.py
--- a/monai/bundle/config_parser.py
+++ b/monai/bundle/config_parser.py
@@ -178,11 +178,27 @@ def get(self, id: str = "", default: Optional[Any] = None):
def set(self, config: Any, id: str = ""):
"""
- Set config by ``id``... | diff --git a/tests/test_config_parser.py b/tests/test_config_parser.py
--- a/tests/test_config_parser.py
+++ b/tests/test_config_parser.py
@@ -104,6 +104,8 @@ def test_config_content(self):
# test nested ids
parser["dataset#_target_"] = "Dataset"
self.assertEqual(parser["dataset#_target_"], "... | ["tests/test_config_parser.py::TestConfigParser::test_config_content"] | ["tests/test_config_parser.py::TestConfigParser::test_list_expressions", "tests/test_config_parser.py::TestConfigParser::test_parse_0", "tests/test_config_parser.py::TestConfigParser::test_contains", "tests/test_config_parser.py::TestConfigParser::test_function_0", "tests/test_config_parser.py::TestConfigParser::test_a... | null | true | 2022-07-19T07:25:25Z | 2 | 21 | 1 | 576 | 0 | 0.85 | 1 | 0.4 | 1 | 0.166 | 75.548 | ||
2,199 | swe_gym::train::1909 | swe_gym | train | 1,909 | facebookresearch__hydra-1733 | facebookresearch/hydra | facebookresearch/hydra | python | bba4a79bd3ef0cf5ef2f55106ef100243abea02d | Enable Hydra 1.0 instantiate to receive _recursive_=False
Hydra 1.1 adds support for recursive instantiation and makes it the default.
This present a challenge for code that needs to work with both Hydra 1.0 and 1.1 and is depending on instantiate not being recursive.
(This is typically code that would benefit from rec... | diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py
--- a/hydra/_internal/utils.py
+++ b/hydra/_internal/utils.py
@@ -608,6 +608,13 @@ def _get_kwargs(config: Union[ObjectConf, DictConfig], **kwargs: Any) -> Any:
for k, v in passthrough.items():
final_kwargs[k] = v
+
+ _recursive_ = fina... | diff --git a/tests/test_utils.py b/tests/test_utils.py
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -168,6 +168,41 @@ def test(conf: Any) -> None:
test(OmegaConf.create(input_conf))
+@pytest.mark.parametrize( # type: ignore
+ "input_conf, passthrough, expected",
+ [
+ pytest.param(
+ ... | ["tests/test_utils.py::test_class_instantiate__future_compat_recursive[class]"] | ["tests/test_utils.py::test_class_instantiate_deprecated[passthrough0]", "tests/test_utils.py::test_instantiate_adam_conf", "tests/test_utils.py::test_class_instantiate[class+override+interpolation]", "tests/test_utils.py::test_class_instantiate_deprecated[builtin_types]", "tests/test_utils.py::test_a_class_eq", "tests... | null | true | 2021-07-22T02:12:04Z | 1 | 7 | 1 | 836 | 0 | 0.85 | 1 | 0.4 | 1 | 0.162667 | 75.538 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.