Skip to content

Adding TabSyn examples and ensemble attack code#143

Merged
lotif merged 80 commits into
mainfrom
marcelo/tabsyn-ensemble
Jul 13, 2026
Merged

Adding TabSyn examples and ensemble attack code#143
lotif merged 80 commits into
mainfrom
marcelo/tabsyn-ensemble

Conversation

@lotif

@lotif lotif commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

PR Type

Feature

Short Description

Clickup Ticket(s): https://app.clickup.com/t/10524786/868jvwvax

A few things in this PR:

  • Adding an example for TabSyn full pipeline (train, synthesize and evaluate)
  • Adding an example for Ensemble Attack using TabSyn
  • Adding EnsembleAttackTabSynModelRunner to src/midst_toolkit/attacks/ensemble/models.py so the attack knows how to run the model
  • Renaming test_attack_model.py files to stop pytest thinking they are test files
  • A few small refactorings to simplify things

FYI a lot of the code in the examples was copied from the CTGAN example, and the EnsembleAttackTabSynModelRunner was adapted from the existing TabSyn automated test.

Tests Added

No tests added.

lotif and others added 9 commits July 8, 2026 13:14
Upgrading the libraries to address vulnerabilities. This required some code changes with the new libraries functionality and new APIs. None of the fixes were major, but did require some digging and test fixes.
@lotif
lotif requested a review from emersodb July 9, 2026 18:54

@emersodb emersodb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes in response to my comments and those of CodeRabbit look good to me.

For the integration tests, I'm going to have to trust that you've ensured that no changes of significance have happened here.

[
cfg.ks_tv.run,
cfg.ci_overlap.run,
cfg.ks_tv.run,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this guy go?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is repeated a couple of lines above this one, so it's an useless line.

Comment thread examples/tabsyn/train.py
train_data = TabularDataset(numerical_features_train.float(), categorical_features_train)

# move test data to gpu if available
numerical_features_test = numerical_features_test.float().to(DEVICE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we just do both for consistency? The move is idempotent. So if it's already on the device it will no-op anyway.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the single table integration tests were passing?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the upgrades, the values still match on local but not on github anymore, so I have to make new expected values for github actions :/

@lotif
lotif merged commit da4ce6b into main Jul 13, 2026
6 checks passed
@lotif
lotif deleted the marcelo/tabsyn-ensemble branch July 13, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants