Skip to content

[Do not submit] test4#4433

Draft
aireenmei wants to merge 1 commit into
mainfrom
aireen/scan_squash
Draft

[Do not submit] test4#4433
aireenmei wants to merge 1 commit into
mainfrom
aireen/scan_squash

Conversation

@aireenmei

Copy link
Copy Markdown
Collaborator

Description

Start with a short description of what the PR does and how this is a change from
the past.

The rest of the description includes relevant details and context, examples:

  • why is this change being made,
  • the problem being solved and any relevant context,
  • why this is a good solution,
  • some information about the specific implementation,
  • shortcomings of the solution and possible future improvements.

If the change fixes a bug or a Github issue, please include a link, e.g.,:
FIXES: b/123456
FIXES: #123456

You can also provide a comma-separated list. If you don't want to close a bug but
simply to reference it, use BUGS, e.g.:
BUGS: b/123456

Notice 1: Once all tests pass, the "pull ready" label will automatically be assigned.
This label is used for administrative purposes. Please do not add it manually.

Notice 2: For external contributions, our settings currently require an approval from a MaxText maintainer to trigger CI tests.

Tests

Please describe how you tested this change, and include any instructions and/or
commands to reproduce.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 CI Failure Investigation Report

I have analyzed the recent test failures in the CI pipeline and identified the following:

🔍 What Failed

  • Job/Matrix: code_quality_check / Static code-quality checkers
  • Failing Test: Static code quality linter checks
  • Error: pylint C0116 (missing docstring) and pylint C0301 (line too long)

🪵 Error Details & Stack Trace

************* Module maxtext.models.gemma4
src/maxtext/models/gemma4.py:486:2: C0116: Missing function or method docstring (missing-function-docstring)
************* Module model_test
tests/unit/model_test.py:238:0: C0301: Line too long (131/125) (line-too-long)

💡 Root Cause Analysis & Context

Confidence: high

The CI run for PR #4433 failed during the static code-quality check job.

  • src/maxtext/models/gemma4.py: The newly added method _apply_local_layers was missing a docstring.
  • tests/unit/model_test.py: A long assertion line on line 238 exceeded the line length limit of 125 characters, which was flagged by pylint.
  • Formatting: The files were also not fully formatted in accordance with the pyink standard.

This caused the code_quality_check job to exit with code 1, which in turn skipped all the test execution stages (cpu-torch-reference tests, maxtext_tpu_pathways_unit_tests, etc.), leading to the pipeline's failure.

🛠️ Recommended Fix

The issues have been resolved by adding the missing docstring to _apply_local_layers and running pyink to auto-format the files. The updated changes are fully compliant with the repository's linting and formatting configuration (which was verified by running pre-commit locally).

# In src/maxtext/models/gemma4.py:
  def _apply_local_layers(
      self,
      y,
      decoder_segment_ids,
      decoder_positions,
      deterministic,
      model_mode,
      slot=None,
      page_state=None,
      previous_chunk=None,
      bidirectional_mask=None,
  ):
    """Applies the local sliding-window attention layers to the inputs."""
    def apply_layer(layer, carry):
...

# In tests/unit/model_test.py:
    self.assertEqual(
        logits.shape, (new_config.global_batch_size_to_train_on, new_config.max_target_length, new_config.vocab_size)
    )

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