Skip to content

feat: Add support for CFVAE#3

Merged
zkhotanlou merged 1 commit intomainfrom
chengao-changes
Feb 2, 2026
Merged

feat: Add support for CFVAE#3
zkhotanlou merged 1 commit intomainfrom
chengao-changes

Conversation

@zkhotanlou
Copy link
Owner

No description provided.

@zkhotanlou
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +528 to +532
train_dataset = train_x
preference_dataset = {"x_prefer": {}, "y_prefer": {}}
for x, xp, yp in train_x, x_prefer, y_prefer:
preference_dataset["x_prefer"][x] = xp
preference_dataset["y_prefer"][x] = yp

Choose a reason for hiding this comment

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

P1 Badge Build preference dataset without zipping iterables

The loop that is supposed to pair train_x, x_prefer, and y_prefer iterates over the three tensors as a tuple and tries to unpack each entire tensor into (x, xp, yp). For any non‑trivial dataset this raises ValueError: too many values to unpack (expected 3) before the dictionary is populated. In addition, the loop stores the tensors as dictionary keys, but torch.Tensor objects are unhashable, so even after fixing the iteration the code will crash with TypeError: unhashable type: 'Tensor'. This makes load_adult_preference_dataset unusable for training with example-based constraints.

Useful? React with 👍 / 👎.

Comment on lines +213 to +216
for column in dataloader.categorical_feature_names:
diff_count += np.sum(
np.array(x_ori[column], dtype=pd.Series)
!= np.array(x_pred[column], dtype=pd.Series)

Choose a reason for hiding this comment

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

P1 Badge Invalid dtype when comparing categorical proximity

The categorical proximity metric converts each column with np.array(x_ori[column], dtype=pd.Series). pd.Series is not a valid NumPy dtype, so calling this function raises TypeError: data type 'pandas.core.series.Series' not understood before any comparison occurs. This prevents cat_proximity from running and breaks the evaluation pipeline for CFVAE.

Useful? React with 👍 / 👎.

@zkhotanlou zkhotanlou merged commit 851495e into main Feb 2, 2026
1 check failed
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.

1 participant