diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cf6763fe..3d8f17ce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e7b3c12..172f2995 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,13 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - id: check-toml - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black # It is recommended to specify the latest version of Python @@ -22,7 +22,7 @@ repos: name: isort (python) - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.6.2 + rev: v0.7.3 hooks: - id: ruff - repo: https://github.com/numpy/numpydoc diff --git a/doc/changes/DM-47482.misc.md b/doc/changes/DM-47482.misc.md new file mode 100644 index 00000000..4567c40a --- /dev/null +++ b/doc/changes/DM-47482.misc.md @@ -0,0 +1,2 @@ +Remove explicit calls to garbage collector during in-process execution. +Garbage collection can be slow and it is not useful in our common use cases. diff --git a/python/lsst/ctrl/mpexec/mpGraphExecutor.py b/python/lsst/ctrl/mpexec/mpGraphExecutor.py index c2185019..0a918cc3 100644 --- a/python/lsst/ctrl/mpexec/mpGraphExecutor.py +++ b/python/lsst/ctrl/mpexec/mpGraphExecutor.py @@ -29,7 +29,6 @@ __all__ = ["MPGraphExecutor", "MPGraphExecutorError", "MPTimeoutError"] -import gc import importlib import logging import multiprocessing @@ -596,11 +595,6 @@ def _executeQuantaInProcess(self, graph: QuantumGraph, report: Report) -> None: qnode.quantum.dataId, exc_info=exc, ) - finally: - # sqlalchemy has some objects that can last until a garbage - # collection cycle is run, which can happen at unpredictable - # times, run a collection loop here explicitly. - gc.collect() _LOG.info( "Executed %d quanta successfully, %d failed and %d remain out of total %d quanta.",