Comments (1)
It has become even more, now > 100 warnings in CI.
=============================== warnings summary ===============================
torchquad/tests/boole_test.py: 6 warnings
torchquad/tests/gauss_test.py: 4 warnings
torchquad/tests/gradient_test.py: 3 warnings
torchquad/tests/integrator_types_test.py: 4 warnings
torchquad/tests/monte_carlo_test.py: 4 warnings
torchquad/tests/simpson_test.py: 7 warnings
torchquad/tests/trapezoid_test.py: 4 warnings
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/utils.py:255: UserWarning: DEPRECATION WARNING: In future versions of torchquad, an array-like object will be returned.
warnings.warn(
torchquad/tests/boole_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /home/conda/feedstock_root/build_artifacts/pytorch-recipe_1680607356157/work/aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor.py:878: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
return torch.tensor(other, dtype=dtype, device=self.device) ** self
torchquad/tests/boole_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/boole.py:67: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
n_per_dim = int(N ** (1.0 / dim) + 1e-8)
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/utils.py:192: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if dim < 1:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/utils.py:194: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if num_bounds != 2:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/integration_grid.py:112: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if N ** (1.0 / dim) < 2:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/integration_grid.py:57: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
self._N = int(N ** (1.0 / self._dim) + 1e-8) # convert to points per dim
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/grid_integrator.py:221: TracerWarning: torch.Tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
torch.Tensor([n_per_dim]),
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/grid_integrator.py:86: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert new_shape == list(
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:548: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if self.numel() == 0 and not self.is_sparse:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:288: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if self.numel() == 0:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:327: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
formatter = _Formatter(get_summarized_data(self) if summarize else self)
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:119: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if nonzero_finite_vals.numel() == 0:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:128: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).
for value in nonzero_finite_vals:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:129: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if value != torch.ceil(value):
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:153: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
nonzero_finite_max / nonzero_finite_min > 1000.0
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:154: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
or nonzero_finite_max > 1.0e8
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:155: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
or nonzero_finite_min < 1.0e-4
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:164: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).
for value in nonzero_finite_vals:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor.py:872: TracerWarning: Converting a tensor to a Python number might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
return self.item().__format__(format_spec)
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:231: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if summarize and self.size(0) > 2 * PRINT_OPTS.edgeitems:
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:238: TracerWarning: Converting a tensor to a Python list might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
data = [_val_formatter(val) for val in self.tolist()]
torchquad/tests/boole_test.py::test_integrate_torch
torchquad/tests/gauss_test.py::test_integrate_torch
torchquad/tests/monte_carlo_test.py::test_integrate_torch
torchquad/tests/simpson_test.py::test_integrate_torch
torchquad/tests/trapezoid_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:259: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if summarize and self.size(0) > 2 * PRINT_OPTS.edgeitems:
torchquad/tests/boole_test.py::test_integrate_tensorflow
torchquad/tests/monte_carlo_test.py::test_integrate_tensorflow
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/tensorflow/python/autograph/impl/api.py:371: UserWarning: DEPRECATION WARNING: In future versions of torchquad, an array-like object will be returned.
return py_builtins.overload_of(f)(*args)
torchquad/tests/gauss_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/autoray/autoray.py:79: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
return get_lib_fn(backend, fn)(*args, **kwargs)
torchquad/tests/gauss_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/autoray/autoray.py:79: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
return get_lib_fn(backend, fn)(*args, **kwargs)
torchquad/tests/monte_carlo_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:137: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
nonzero_finite_max / nonzero_finite_min > 1000.0
torchquad/tests/monte_carlo_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:138: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
or nonzero_finite_max > 1.0e8
torchquad/tests/monte_carlo_test.py::test_integrate_torch
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/torch/_tensor_str.py:147: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).
for value in nonzero_finite_vals:
torchquad/tests/monte_carlo_test.py::test_integrate_jax
/home/runner/micromamba-root/envs/torchquad/lib/python3.10/site-packages/autoray/autoray.py:79: UserWarning: Explicitly requested dtype <class 'jax.numpy.float64'> requested in array is not available, and will be truncated to dtype float32. To enable more dtypes, set the jax_enable_x64 configuration option or the JAX_ENABLE_X64 shell environment variable. See https://github.com/google/jax#current-gotchas for more.
return get_lib_fn(backend, fn)(*args, **kwargs)
torchquad/tests/simpson_test.py::test_integrate_torch
/home/runner/work/torchquad/torchquad/torchquad/tests/../integration/simpson.py:65: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
n_per_dim = int(N ** (1.0 / dim) + 1e-8)
from torchquad.
Related Issues (20)
- Backend strategy HOT 14
- Fix wrong return type in docstrings HOT 1
- Low Discrepancy Sequences for MonteCarlo and VEGAS
- Move the release process for torchquad from JIRA HOT 1
- Suggestions for VEGAS algorithm changes
- Code style in the tests
- Improve autoformatting of PRs HOT 1
- Release 0.3.0
- Change behavior of 'backend' HOT 6
- Elementwise numerical integration HOT 28
- Let user choose which GPU to use HOT 4
- torch dataloader crashed after `set_up_backend` HOT 4
- Cannot import torchquad (conda install) HOT 2
- Add tests for JIT HOT 2
- Evaluate many different integrands over the different domain HOT 6
- Coverage check fails on PRs HOT 1
- Release 0.4.0 HOT 8
- Tests failing on GPU HOT 15
- torch.tensor containing integers as integration domain returns zero with non-compiled integrator HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchquad.