diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 745dc409..1d345d57 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -10,13 +10,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11','3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] os: [ubuntu-latest, windows-latest] include: - os: macos-latest python-version: '3.8' - os: macos-latest - python-version: '3.12' + python-version: '3.13' steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -30,7 +30,7 @@ jobs: - name: Run integration tests run: invoke integration - - if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12 + - if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.13 name: Upload integration codecov report uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/minimum.yml b/.github/workflows/minimum.yml index 2c3d4a76..e846d2b2 100644 --- a/.github/workflows/minimum.yml +++ b/.github/workflows/minimum.yml @@ -11,13 +11,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11','3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] os: [ubuntu-latest, windows-latest] include: - os: macos-13 python-version: '3.8' - os: macos-latest - python-version: '3.12' + python-version: '3.13' steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index 6f9f57ea..1ff4c1c9 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11','3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] os: [ubuntu-latest, macos-latest] # skip windows bc rundoc fails steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 1cbd1113..3be8df14 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -10,13 +10,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11','3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] os: [ubuntu-latest, windows-latest] include: - os: macos-latest python-version: '3.8' - os: macos-latest - python-version: '3.12' + python-version: '3.13' steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -30,7 +30,7 @@ jobs: - name: Run unit tests run: invoke unit - - if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12 + - if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.13 name: Upload unit codecov report uses: codecov/codecov-action@v4 with: diff --git a/ctgan/synthesizers/base.py b/ctgan/synthesizers/base.py index add0dd7e..14b4f9c9 100644 --- a/ctgan/synthesizers/base.py +++ b/ctgan/synthesizers/base.py @@ -119,7 +119,7 @@ def save(self, path): def load(cls, path): """Load the model stored in the passed `path`.""" device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') - model = torch.load(path) + model = torch.load(path, weights_only=False) model.set_device(device) return model diff --git a/pyproject.toml b/pyproject.toml index 28cc4627..09375ba8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,26 +13,29 @@ classifiers = [ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Scientific/Engineering :: Artificial Intelligence', ] keywords = ['ctgan', 'CTGAN'] dynamic = ['version'] license = { text = 'BSL-1.1' } -requires-python = '>=3.8,<3.13' +requires-python = '>=3.8,<3.14' readme = 'README.md' dependencies = [ "numpy>=1.21.0;python_version<'3.10'", "numpy>=1.23.3;python_version>='3.10' and python_version<'3.12'", - "numpy>=1.26.0;python_version>='3.12'", + "numpy>=1.26.0;python_version>='3.12' and python_version<'3.13'", + "numpy>=2.1.0;python_version>='3.13'", "pandas>=1.4.0;python_version<'3.11'", "pandas>=1.5.0;python_version>='3.11' and python_version<'3.12'", - "pandas>=2.1.1;python_version>='3.12'", - "torch>=1.9.0;python_version<'3.10'", - "torch>=1.11.0;python_version>='3.10' and python_version<'3.11'", + "pandas>=2.1.1;python_version>='3.12' and python_version<'3.13'", + "pandas>=2.2.3;python_version>='3.13'", + "torch>=1.13.0;python_version<'3.11'", "torch>=2.0.0;python_version>='3.11' and python_version<'3.12'", - "torch>=2.2.0;python_version>='3.12'", + "torch>=2.2.0;python_version>='3.12' and python_version<'3.13'", + "torch>=2.6.0;python_version>='3.13'", 'tqdm>=4.29,<5', - 'rdt>=1.11.0', + 'rdt>=1.14.0', ] [project.urls] diff --git a/tox.ini b/tox.ini index 5c2feee2..b344cf45 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py39-lint, py3{8,9,10,11,12}-{unit,integration,readme} +envlist = py39-lint, py3{8,9,10,11,12,13}-{unit,integration,readme} [testenv] skipsdist = false