Skip to content

Conversation

@AkshithAI
Copy link

Hello! This PR fixes an incorrect type hint in RotaryEmbedding._compute_concentration_and_inv_freq.

The function returns a tuple[float, torch.Tensor], but the type hint was incorrectly specified as -> torch.Tensor:.

This change ensures the signature is correct, which will prevent errors with static type checkers like mypy and improves overall code clarity.

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

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

import math
import os
from dataclasses import dataclass
from typing import tuple

Choose a reason for hiding this comment

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

P0 Badge Remove invalid typing import

from typing import tuple will raise an ImportError when this module is imported because typing only exposes Tuple (capitalized) in Python 3.12+. The return annotation already uses the built‑in tuple[...] and does not require any import, so this new line makes the package fail to import entirely.

Useful? React with 👍 / 👎.

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