Commit 9fc4edd
Context Manager API Enhancement (#159)
Summary:
## Overview
This PR enhances the `TritonParseManager` context manager by adding support for tensor blob storage configuration.
## Changes
- **New Parameters Added to `TritonParseManager.__init__`**:
- `enable_tensor_blob_storage` (bool, default: `False`): Enables tensor blob storage when set to `True`
- `tensor_storage_quota` (int, optional, default: `None`): Sets storage quota in bytes for tensor blobs (default quota is 100GB when enabled)
- **Implementation Details**:
- The new parameters are properly stored as instance attributes
- Parameters are passed through to the `init()` function in the `__enter__` method
- Uses conditional inclusion: `tensor_storage_quota` is only passed to `init()` when explicitly set (not `None`)
## Impact
- Backward compatible: All new parameters have default values
- Provides users with fine-grained control over tensor blob storage behavior
- Maintains clean API design by conditionally passing parameters only when needed
Pull Request resolved: #159
Reviewed By: sfzhu93
Differential Revision: D84107701
Pulled By: FindHao
fbshipit-source-id: d8918a948f7c14a820e5a701c1ef15079e30583d1 parent c991a5e commit 9fc4edd
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
0 commit comments