Skip to content

Conversation

@vaharoni
Copy link
Contributor

In the beginner's tutorials > load and process data > pandas.DataFrame there is the following code:

class MyModel(tf.keras.Model): def __init__(self): # Create all the internal layers in init. super().__init__(self) self.normalizer = tf.keras.layers.Normalization(axis=-1) # ...

It seems like super().__init__(self) is incorrect here, sending self as one of the args to the base class tf.keras.Model. The documentation of tf.keras.Model uses super().__init__(), so I suggest to align it.

@vaharoni vaharoni requested a review from a team as a code owner August 26, 2023 21:52
@github-actions
Copy link

Preview

Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.

Format and style

Use the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:
$ python3 -m pip install -U --user git+https://github.com/tensorflow/docs 
$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin tutorial_load_pandas_fix
@8bitmp3 8bitmp3 added the review in progress Someone is actively reviewing this PR label Aug 29, 2023
@8bitmp3 8bitmp3 changed the title pandas df loading tutorial: Fix incorrect suer().__init__() call pandas df loading tutorial: Fix incorrect super().__init__() call Aug 29, 2023
@github-actions github-actions bot added the lgtm Community-added approval label Aug 30, 2023
@MarkDaoust MarkDaoust added ready to pull Start merge process and removed review in progress Someone is actively reviewing this PR labels Aug 30, 2023
@MarkDaoust
Copy link
Member

Thanks.

Yeah, how does that pass our tests?

@MarkDaoust MarkDaoust added ready to pull Start merge process and removed ready to pull Start merge process labels Sep 27, 2023
@copybara-service copybara-service bot merged commit c2d6161 into tensorflow:master Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Community-added approval ready to pull Start merge process

4 participants