Skip to content
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

Hinting in model API to allow discarding input data #362

Open
martin-traverse opened this issue Mar 28, 2023 · 0 comments
Open

Hinting in model API to allow discarding input data #362

martin-traverse opened this issue Mar 28, 2023 · 0 comments

Comments

@martin-traverse
Copy link
Contributor

Feature Request

Description of Problem:

Provide a hint to allow model input data to be discarded after an input is accessed, for memory management in cases where models are dealing with very large inputs.

Potential Solutions:

This should be a hint rather than a command. One solution is to add a "retain" parameter to get_*_table methods, which can be True, False or None. None means take the default value, which may differ depending on various factors (requested format, data size etc).

To implement this hint, the runtime must have the ability to re-load data on demand if it is no longer held in the context. This facility will also allow for lazy-loading of datasets. The runtime can decide (a) whether to pre-load each dataset and (b) whether to discard them after they are accessed. If the model requests a dataset that is not available (either because it was discarded or never loaded), the runtime will re-load the dataset from source.

Following this pattern the hint will have no functional impact on the model.

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

No branches or pull requests

1 participant