Skip to content

Remove Jupyter infra - #2982

Merged
copybara-service[bot] merged 1 commit into
google:mainfrom
j2kun:remove-jupyter
May 26, 2026
Merged

Remove Jupyter infra#2982
copybara-service[bot] merged 1 commit into
google:mainfrom
j2kun:remove-jupyter

Conversation

@j2kun

@j2kun j2kun commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Now that we have both a PyPI distribution and rules_heir, there is no longer a significant reason to have a Jupyter integration.

Also, since it is not tested, it is almost surely out of date and broken. I'd prefer we instead direct our efforts toward improving the Python frontend to encapsulate whatever usability might still be desired from the jupyter cell magics.

@j2kun
j2kun requested a review from AlexanderViand May 21, 2026 22:14
@j2kun
j2kun force-pushed the remove-jupyter branch from bafd69b to 758b98e Compare May 21, 2026 22:15

@AlexanderViand AlexanderViand 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.

100% agree - in place of the old heir_play package, I've been using this snippet in notebooks:

from heir.heir_cli import heir_cli, heir_cli_config

# expose heir-opt to Python (bypassing the normal HEIR Python frontend)
heir_opt = heir_cli.HeirOptBackend(heir_cli_config.from_pip_installation().heir_opt_path)

which can be used like this:

# put MLIR in here
program = """
func.func @example(%x : f32) -> f32 {
  %0 = math.exp %x {degree = 5 : i32, domain_lower = -4.0 : f64, domain_upper = 4.0 : f64} : f32
  return %0 : f32
}
"""

print(heir_opt.run_binary(
            input=program,
            options=["--secretize", "--torch-linalg-to-ckks"]
        ))

It might be a good idea to provide the heir_cli.HeirOptBackend(heir_cli_config.from_pip_installation().heir_opt_path) under a nicer name for exactly this use case?

Now that we have both a PyPI distribution and rules_heir, there
is no longer a significant reason to have a Jupyter integration.

Also, since it is not tested, it is almost surely out of date and
broken. I'd prefer we instead direct our efforts toward improving
the Python frontend to encapsulate whatever usability might still be
desired from the jupyter cell magics.
@j2kun
j2kun force-pushed the remove-jupyter branch from 758b98e to fe808f8 Compare May 26, 2026 18:51
@j2kun j2kun added the pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing label May 26, 2026
@copybara-service
copybara-service Bot merged commit 385e815 into google:main May 26, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants