Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytensor/compile/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def _build_and_cache_lop_op(
f"Need to override {nin} gradients, got {len(custom_input_grads)}",
custom_input_grads,
)
# compute non-overriding downsteam grads from upstreams grads
# compute non-overriding downstream grads from upstreams grads
# it's normal some input may be disconnected, thus the 'ignore'
wrt = [
lin
Expand Down
2 changes: 1 addition & 1 deletion pytensor/configdefaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def add_optimizer_configvars():
"are allowed, but it makes the compilation faster."
"The interaction of which one give the lower peak memory usage is"
"complicated and not predictable, so if you are close to the peak"
"memory usage, triyng both could give you a small gain.",
"memory usage, trying both could give you a small gain.",
EnumStr("regular", ["fast"]),
in_c_key=False,
)
Expand Down
2 changes: 1 addition & 1 deletion pytensor/graph/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def goto(self, checkpoint):
check=False,
)

# Remove history changes caused by the foward/backward!
# Remove history changes caused by the forward/backward!
self.bw = self.bw[:history_len]
self.fw = self.fw[:history_len]
self.pointer = pointer
Expand Down
2 changes: 1 addition & 1 deletion pytensor/graph/rewriting/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ def chin_(node, i, r, new_r, reason):
for node_rewriter in self.node_tracker.get_trackers(node.op):
nb = change_tracker.nb_imported
t_rewrite = time.perf_counter()
# Tracks are already enfoced by `self.node_tracker.get_trackers`
# Tracks are already enforced by `self.node_tracker.get_trackers`
node_rewriter_change = self.process_node(
fgraph, node, node_rewriter, enforce_tracks=False
)
Expand Down
2 changes: 1 addition & 1 deletion pytensor/graph/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def add_tag_trace[T: "Apply" | "Variable"](thing: T, user_line: int | None = Non
skips = []

tr = simple_extract_stack(limit=user_line, skips=skips)
# Different python version use different sementic for
# Different python version use different semantic for
# limit. python 2.7 include the call to extrack_stack. The -1 get
# rid of it.

Expand Down
2 changes: 1 addition & 1 deletion pytensor/link/c/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ def in_sig(i, topological_pos, i_idx):
if not len(fgraph.clients[var])
)

# crystalize the signature and version
# crystallize the signature and version
sig = tuple(sig)
version = tuple(version)
for v in version:
Expand Down
8 changes: 4 additions & 4 deletions pytensor/link/c/cmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def get_module_hash(src_code: str, key) -> str:
to_hash += list(map(str, key[0]))
c_link_key = key[1]
# Currently, in order to catch potential bugs early, we are very
# convervative about the structure of the key and raise an exception
# conservative about the structure of the key and raise an exception
# if it does not match exactly what we expect. In the future we may
# modify this behavior to be less strict and be able to accommodate
# changes to the key in an automatic way.
Expand Down Expand Up @@ -1562,11 +1562,11 @@ def clear_unversioned(self, min_age=None):
continue
age = time_now - last_access_time(path)

# In normal case, the processus that created this
# directory will delete it. However, if this processus
# In normal case, the process that created this
# directory will delete it. However, if this process
# crashes, it will not be cleaned up.
# As we don't know if this directory is still used,
# we wait one week and suppose that the processus
# we wait one week and suppose that the process
# crashed, and we take care of the clean-up.
if age > min_age:
to_del.append(os.path.join(self.dirname, filename))
Expand Down
2 changes: 1 addition & 1 deletion pytensor/link/jax/linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def create_thunk_inputs(self, storage_map):
for n in self.fgraph.inputs:
sinput = storage_map[n]
if isinstance(sinput[0], Generator):
# Neet to convert Generator into JAX PRNGkey
# Need to convert Generator into JAX PRNGkey
sinput[0] = jax_typify(sinput[0])
thunk_inputs.append(sinput)

Expand Down
2 changes: 1 addition & 1 deletion pytensor/link/numba/dispatch/vectorize_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def _wrap_negative_index(idx_val, dim_size, signed):
*safe,
)
if core_scalar and core_ndim == 0:
# Retrive scalar item at index
# Retrieve scalar item at index
read_val = builder.load(read_ptr)
# read_val.set_metadata("alias.scope", input_scope_set)
# read_val.set_metadata("noalias", output_scope_set)
Expand Down
2 changes: 1 addition & 1 deletion pytensor/scan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

"""

__docformat__ = "restructedtext en"
__docformat__ = "restructuredtext en"
__authors__ = (
"Razvan Pascanu "
"Frederic Bastien "
Expand Down
2 changes: 1 addition & 1 deletion pytensor/scan/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def wrap_into_list(x):
)
outs_info[i]["taps"] = [-1]
elif outs_info[i].get("taps", None) is not None:
# Check that taps are valid (< 0 and all dfferent)
# Check that taps are valid (< 0 and all different)
taps = outs_info[i]["taps"]
if len(taps) > len(set(taps)):
raise ValueError(
Expand Down
2 changes: 1 addition & 1 deletion pytensor/scan/rewriting/inner_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def numba_rewrite_scan_inner_graph(linker, op, node, inner, *, mode):

Because the last untraced updates are returned as is, the inner function is not allowed to
alias sequences, non_sequences, or other untraced inputs and outputs (violates the outer alias restriction).
Untraced updates are not allowed to alias traced reads (risks corruption by subsequent overwrittes),
Untraced updates are not allowed to alias traced reads (risks corruption by subsequent overwrites),
but can alias traced updates, since the immediate copy to their buffer that follows, will break the alias.

Because untraced inputs are immediately discarded (and protected from alias with other updates),
Expand Down
2 changes: 1 addition & 1 deletion pytensor/scan/rewriting/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def scan_reduce_trace_rewrite(
buffers before grad() is called, the gradient will be silently wrong.
TODO: Use a subclass that raises explicitly on `L_op`

Paramaters
Parameters
----------
backend_supports_output_pre_allocation: bool
When the backend supports output pre-allocation Scan must keep buffers
Expand Down
2 changes: 1 addition & 1 deletion pytensor/xtensor/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def dtype(self) -> str:

@property
def broadcastable(self):
# The concept of broadcastable is not revelant for XTensorVariables, but part of the codebase may request it
# The concept of broadcastable is not relevant for XTensorVariables, but part of the codebase may request it
return self.type.broadcastable

# DataArray contents
Expand Down