Skip to content

[chore]: improve public api checks and error reporting - #1096

Open
sayakpaul wants to merge 11 commits into
mainfrom
check-version-public-api
Open

[chore]: improve public api checks and error reporting#1096
sayakpaul wants to merge 11 commits into
mainfrom
check-version-public-api

Conversation

@sayakpaul

@sayakpaul sayakpaul commented Aug 24, 2026

Copy link
Copy Markdown
Member

#1095 bumped the version but the API check still complained. This PR fixes that. Additionally, it broadens the coverage of potential suspects that warrant a version bump as laid down here.

Closes #1030

@sayakpaul
sayakpaul requested a review from drbh August 24, 2026 09:59
@github-actions github-actions Bot added the chore Version bumps, releases, misc maintenance label Aug 24, 2026

@danieldk danieldk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Added a bunch of comments.

Comment thread scripts/check_public_api.py Outdated
Comment thread scripts/check_public_api.py Outdated
Comment thread scripts/check_public_api.py Outdated
Comment thread scripts/check_public_api.py Outdated
def report(
kernel: str, base: dict, head: dict, limit: int = 20, preview: int = 6
) -> bool:
) -> tuple:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tuple typing, especially because the return statement is somewhat hard to read.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't understand the suggestion here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I changed it to a dict which I believe is more readable and easier to parse cognitively.

Comment thread scripts/check_public_api.py Outdated
_tree(items)
return True

grown = [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't there only one __all__? If so, why a list comprehension?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would also benefit from some comments. E.g. what is the difference between added and grown?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

scattermoe has more than one:

  • torch-ext/scattermoe/__init__.py
  • torch-ext/scattermoe/kernels/__init__.py

Comment thread scripts/check_public_api.py Outdated
print(f" => version bumped {old_version} -> {new_version}")
continue

flavour = additive_safe(head_src)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seeing the call site, why is additive_safe stringly typed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What would you prefer? Enum?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changed to Enum and I think it reads more explicit.

@sayakpaul
sayakpaul requested a review from danieldk August 24, 2026 12:53
@sayakpaul

Copy link
Copy Markdown
Member Author

@danieldk addressed your comments

@sayakpaul

Copy link
Copy Markdown
Member Author

@drbh / @danieldk a review on it will be appreciated.

@drbh drbh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm!

**might be best for Daniel to give another once over before merging in case any of the comments need follow up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Version bumps, releases, misc maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve API-change check: gate on version bump and allow additive-only changes

3 participants