Skip to content

Commit 9f4b89d

Browse files
committed
Remove unused ContextsParam
1 parent d9ed1e2 commit 9f4b89d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

pytensor/configparser.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -538,22 +538,6 @@ def __str__(self):
538538
return f"{self.name} ({self.default})"
539539

540540

541-
class ContextsParam(ConfigParam):
542-
def __init__(self):
543-
super().__init__("", apply=self._apply, mutable=False)
544-
545-
def _apply(self, val):
546-
if val == "":
547-
return val
548-
for v in val.split(";"):
549-
s = v.split("->")
550-
if len(s) != 2:
551-
raise ValueError(f"Malformed context map: {v}")
552-
if s[0] == "cpu" or s[0].startswith("cuda") or s[0].startswith("opencl"):
553-
raise ValueError(f"Cannot use {s[0]} as context name")
554-
return val
555-
556-
557541
def parse_config_string(
558542
config_string: str, issue_warnings: bool = True
559543
) -> dict[str, str]:

0 commit comments

Comments
 (0)