-
Notifications
You must be signed in to change notification settings - Fork 135
Update Ruff 11.13 #1462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
juanitorduz
wants to merge
2
commits into
pymc-devs:main
Choose a base branch
from
juanitorduz:update_ruff_11_13_v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Update Ruff 11.13 #1462
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With some of the automated changes some tests break like pytest -v tests/compile/test_profiling.py
================================================ test session starts ================================================
platform darwin -- Python 3.12.11, pytest-8.4.0, pluggy-1.6.0 -- /Users/juan.orduz/.local/share/mamba/envs/pytensor-env/bin/python3.12
cachedir: .pytest_cache
benchmark: 5.1.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/juan.orduz/Documents/pytensor
configfile: pyproject.toml
plugins: mock-3.14.1, benchmark-5.1.0, sphinx-0.6.3, cov-6.1.1
collected 2 items
tests/compile/test_profiling.py::TestProfiling::test_profiling FAILED [ 50%]
tests/compile/test_profiling.py::TestProfiling::test_ifelse PASSED [100%]
===================================================== FAILURES ======================================================
___________________________________________ TestProfiling.test_profiling ____________________________________________
self = VMLinker(use_cloop=True, lazy=None, allow_partial_eval=None, allow_gc=True), profiler = None
input_storage = [[None], [None], [None]], output_storage = [[None], [None], [None], [None]]
storage_map = {val0: [None], val1: [None], val2: [None], Shape_i{0}.0: [None], ...}
def make_all(
self,
profiler=None,
input_storage=None,
output_storage=None,
storage_map=None,
):
fgraph = self.fgraph
order = self.schedule(fgraph)
input_storage, output_storage, storage_map = map_storage(
fgraph, order, input_storage, output_storage, storage_map
)
compute_map = {}
for k in storage_map:
compute_map[k] = [k.owner is None]
thunks = []
t0 = time.perf_counter()
linker_make_thunk_time = {}
impl = None
if self.c_thunks is False:
impl = "py"
for node in order:
try:
thunk_start = time.perf_counter()
# no-recycling is done at each VM.__call__ So there is
# no need to cause duplicate c code by passing
# no_recycling here.
thunks.append(
> node.op.make_thunk(node, storage_map, compute_map, [], impl=impl)
)
pytensor/link/vm.py:1230:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pytensor/link/c/op.py:125: in make_thunk
return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pytensor/link/c/op.py:84: in make_c_thunk
outputs = cl.make_thunk(
pytensor/link/c/basic.py:1185: in make_thunk
cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
pytensor/link/c/basic.py:1102: in __compile__
thunk, module = self.cthunk_factory(
pytensor/link/c/basic.py:1626: in cthunk_factory
module = cache.module_from_key(key=key, lnk=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pytensor/link/c/cmodule.py:1251: in module_from_key
module = lnk.compile_cmodule(location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pytensor/link/c/basic.py:1527: in compile_cmodule
module = c_compiler.compile_str(
... |
@juanitorduz can you show the full traceback, that doesn't give enough info |
ricardoV94
reviewed
Jun 10, 2025
@@ -24,7 +24,7 @@ | |||
|
|||
def print_help(exit_status): | |||
if exit_status: | |||
print(f"command \"{' '.join(sys.argv)}\" not recognized") | |||
print(f'command "{" ".join(sys.argv)}" not recognized') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you still need different quotes inside?
Suggested change
print(f'command "{" ".join(sys.argv)}" not recognized') | |
print(f'command "{' '.join(sys.argv)}" not recognized') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes ixes #1095
📚 Documentation preview 📚: https://pytensor--1462.org.readthedocs.build/en/1462/