Skip to content

feat: get_laoded_kernels()#428

Open
cbensimon wants to merge 8 commits intohuggingface:mainfrom
cbensimon:feat/get-loaded-kernels
Open

feat: get_laoded_kernels()#428
cbensimon wants to merge 8 commits intohuggingface:mainfrom
cbensimon:feat/get-loaded-kernels

Conversation

@cbensimon
Copy link
Copy Markdown

@cbensimon cbensimon commented Apr 7, 2026

TODO

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@cbensimon cbensimon marked this pull request as draft April 7, 2026 17:16
@cbensimon cbensimon marked this pull request as ready for review April 8, 2026 10:18
_loaded_kernels: dict[str, LoadedKernel] = {}


def get_loaded_kernels() -> dict[str, LoadedKernel]:
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.

I know this is still a TODO, but I am curious what the use case of this function is, since it maps internal module names. I don't think we want to expose this to the user?

Copy link
Copy Markdown
Member

@danieldk danieldk Apr 8, 2026

Choose a reason for hiding this comment

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

If the loaded kernels need to be externally probed, maybe we can give the kernel a more predictable name in sys.modules (e.g. a kernels-specific prefix)? In that way the module table could be probed and it would be more resistant against e.g. someone unloading modules.

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.

3 participants