class ExecutionStoreService(object): (source)
Constructor: ExecutionStoreService(repo, dataset_id, collection_name)
Service for managing execution store operations.
Note that each instance of this service has a context:
- If a dataset_id is provided (or a repo associated with one), this instance operates on stores associated with that dataset
- If no dataset_id is provided (or a repo is provided that is not associated with one), this instance operates on stores that are not associated with a dataset
To operate on all stores across all contexts, use the XXX_global() methods that this class provides.
Parameters | |
repo | a
fiftyone.factory.repos.execution_store.ExecutionStoreRepo |
dataset | a dataset ID to scope operations to |
Method | __init__ |
Undocumented |
Method | cleanup |
Deletes all stores associated with the current context. |
Method | count |
Counts the keys in the specified store. |
Method | count |
Counts the stores for the current context. |
Method | count |
Counts the stores across all datasets and the global context. |
Method | create |
Creates a new store with the specified name. |
Method | delete |
Deletes the specified key from the store. |
Method | delete |
Deletes the specified store. |
Method | delete |
Deletes the specified store across all datasets and the global context. |
Method | get |
Retrieves the value of a key from the specified store. |
Method | get |
Gets the specified store for the current context. |
Method | has |
Determines whether the specified key exists in the specified store. |
Method | has |
Determines whether the specified store exists in the current context. |
Method | has |
Determines whether a store with the given name exists across all datasets and the global context. |
Method | list |
Lists all keys in the specified store. |
Method | list |
Lists all stores for the current context. |
Method | list |
Lists the stores across all datasets and the global context. |
Method | set |
Sets the value of a key in the specified store. |
Method | update |
Updates the TTL of the specified key in the store. |
Instance Variable | _dataset |
Undocumented |
Instance Variable | _repo |
Undocumented |
ExecutionStoreRepo | None
= None, dataset_id: ObjectId | None
= None, collection_name: str
= None):
(source)
¶
Undocumented
Deletes the specified store.
Parameters | |
storestr | the name of the store |
Returns | |
StoreDocument | a fiftyone.store.models.StoreDocument |
Deletes the specified store across all datasets and the global context.
Parameters | |
store | the name of the store |
Returns | |
int | the number of stores deleted |
Retrieves the value of a key from the specified store.
Parameters | |
storestr | the name of the store |
key:str | the key to retrieve |
Returns | |
KeyDocument | a fiftyone.store.models.KeyDocument |
Gets the specified store for the current context.
Parameters | |
storestr | the name of the store |
Returns | |
StoreDocument | a fiftyone.store.models.StoreDocument |
Determines whether the specified store exists in the current context.
Parameters | |
store | the name of the store |
Returns | |
bool | True/False |
Determines whether a store with the given name exists across all datasets and the global context.
Parameters | |
store | the name of the store |
Returns | |
bool | True/False |
Lists the stores across all datasets and the global context.
Returns | |
list[ | a list of fiftyone.store.models.StoreDocument |
str
, key: str
, value: Any
, ttl: int | None
= None) -> KeyDocument
:
(source)
¶
Sets the value of a key in the specified store.
Parameters | |
storestr | the name of the store |
key:str | the key to set |
value:Any | the value to set |
ttl:None | an optional TTL in seconds |
Returns | |
KeyDocument | a fiftyone.store.models.KeyDocument |
Updates the TTL of the specified key in the store.
Parameters | |
storestr | the name of the store |
key:str | the key to update the TTL for |
newint | the new TTL in seconds |
Returns | |
KeyDocument | a fiftyone.store.models.KeyDocument |