Skip to content

tensorflow: Add some functions from the config module. #11325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 31, 2024

Conversation

hoel-bagard
Copy link
Contributor

Add some functions related to PhysicalDevices.

@hoel-bagard hoel-bagard changed the title Add some functions from the config module. Add some functions from the TF2 config module. Jan 27, 2024
@hoel-bagard hoel-bagard changed the title Add some functions from the TF2 config module. `tensorflow: Add some functions from the config module. Jan 27, 2024
@hoel-bagard hoel-bagard changed the title `tensorflow: Add some functions from the config module. tensorflow: Add some functions from the config module. Jan 27, 2024
@hoel-bagard
Copy link
Contributor Author

@hmc-cs-mdrissi If you have time to review it.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Thanks, one optional comment


def get_memory_info(device: str) -> _MemoryInfo: ...
def reset_memory_stats(device: str) -> None: ...
def get_memory_usage(device: PhysicalDevice) -> int: ...
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this is deprecated:

@deprecation.deprecated(
    None,
    "Use tf.config.experimental.get_memory_info(device)['current'] instead.")

Consider marking it with @typing_extensions.deprecated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 9898dc7

This comment has been minimized.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit 284afde into python:main Jan 31, 2024
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