Skip to content

Conversation

@ywuenthought
Copy link

@ywuenthought ywuenthought commented Dec 30, 2025

Closes #755
Closes #758

This PR

  • replaces mask_value with mask_token
  • avoids mutating features dict

For reviewers:

You can manually test the fixed notebook using the following link

https://colab.research.google.com/github/ywuenthought/recommenders/blob/fix/dcn-notebook-bugs/docs/examples/dcn.ipynb

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Author

Choose a reason for hiding this comment

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

After fixing the mask_value issue, a new error shows up

/usr/local/lib/python3.12/dist-packages/keras/src/backend/tensorflow/trainer.py in multi_step_on_iterator(iterator)
    131             if self.steps_per_execution == 1:
    132                 return tf.experimental.Optional.from_value(
--> 133                     one_step_on_data(iterator.get_next())
    134                 )
    135 

ValueError: TensorFlowTrainer._make_function.<locals>.one_step_on_data(data) should not modify its Python input arguments. Modifying a copy is allowed. The following parameter(s) were modified: data

This is due to the direct mutation of features in the compute_loss method of DCN.

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.

ValueError: Unrecognized keyword argument(s): {'mask_value': None} DCN notebook example deosn't run the full movielens section

1 participant