fiftyone.factory.repos.execution_store¶
Execution store repository.
Classes:
|
Base class for execution store repositories. |
|
MongoDB implementation of execution store repository. |
-
class
fiftyone.factory.repos.execution_store.
ExecutionStoreRepo
(collection: pymongo.synchronous.collection.Collection, dataset_id: Optional[bson.objectid.ObjectId] = None)¶ Bases:
object
Base class for execution store repositories.
Each instance of this repository has a context:
If a
dataset_id
is provided, it operates on stores associated with that datasetIf no
dataset_id
is provided, it 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.Attributes:
Methods:
create_store
(store_name[, metadata])Creates a store associated with the current context.
get_store
(store_name)Gets a store associated with the current context.
has_store
(store_name)Checks whether a store with the given name exists in the current context.
Lists the stores associated with the current context.
Counts the stores associated with the current context.
delete_store
(store_name)Deletes the specified store.
set_key
(store_name, key, value[, ttl])Sets or updates a key in the specified store.
has_key
(store_name, key)Determines whether a key exists in the specified store.
get_key
(store_name, key)Gets a key from the specified store.
update_ttl
(store_name, key, ttl)Updates the TTL for a key.
delete_key
(store_name, key)Deletes the document that matches the store name and key, if one exists.
list_keys
(store_name)Lists all keys in the specified store.
count_keys
(store_name)Counts the keys in the specified store.
cleanup
()Deletes all stores and keys associated with the current context.
has_store_global
(store_name)Determines whether a store with the given name exists across all datasets and the global context.
Lists stores across all datasets and the global context.
Counts stores across all datasets and the global context.
delete_store_global
(store_name)Deletes the specified store across all datasets and the global context.
-
COLLECTION_NAME
= 'execution_store'¶
-
create_store
(store_name, metadata: Optional[Dict[str, Any]] = None) → fiftyone.operators.store.models.StoreDocument¶ Creates a store associated with the current context.
-
get_store
(store_name) → fiftyone.operators.store.models.StoreDocument¶ Gets a store associated with the current context.
-
has_store
(store_name) → bool¶ Checks whether a store with the given name exists in the current context.
-
list_stores
() → list¶ Lists the stores associated with the current context.
-
count_stores
() → int¶ Counts the stores associated with the current context.
-
delete_store
(store_name) → int¶ Deletes the specified store.
-
set_key
(store_name, key, value, ttl=None) → fiftyone.operators.store.models.KeyDocument¶ Sets or updates a key in the specified store.
-
has_key
(store_name, key) → bool¶ Determines whether a key exists in the specified store.
-
get_key
(store_name, key) → fiftyone.operators.store.models.KeyDocument¶ Gets a key from the specified store.
-
update_ttl
(store_name, key, ttl) → bool¶ Updates the TTL for a key.
-
delete_key
(store_name, key) → bool¶ Deletes the document that matches the store name and key, if one exists.
-
list_keys
(store_name) → list¶ Lists all keys in the specified store.
-
count_keys
(store_name) → int¶ Counts the keys in the specified store.
-
cleanup
() → int¶ Deletes all stores and keys associated with the current context.
-
has_store_global
(store_name)¶ Determines whether a store with the given name exists across all datasets and the global context.
-
list_stores_global
() → list¶ Lists stores across all datasets and the global context.
-
count_stores_global
() → int¶ Counts stores across all datasets and the global context.
-
delete_store_global
(store_name) → int¶ Deletes the specified store across all datasets and the global context.
-
class
fiftyone.factory.repos.execution_store.
MongoExecutionStoreRepo
(collection: pymongo.synchronous.collection.Collection, dataset_id: Optional[bson.objectid.ObjectId] = None)¶ Bases:
fiftyone.factory.repos.execution_store.ExecutionStoreRepo
MongoDB implementation of execution store repository.
Attributes:
Methods:
cleanup
()Deletes all stores and keys associated with the current context.
count_keys
(store_name)Counts the keys in the specified store.
Counts the stores associated with the current context.
Counts stores across all datasets and the global context.
create_store
(store_name[, metadata])Creates a store associated with the current context.
delete_key
(store_name, key)Deletes the document that matches the store name and key, if one exists.
delete_store
(store_name)Deletes the specified store.
delete_store_global
(store_name)Deletes the specified store across all datasets and the global context.
get_key
(store_name, key)Gets a key from the specified store.
get_store
(store_name)Gets a store associated with the current context.
has_key
(store_name, key)Determines whether a key exists in the specified store.
has_store
(store_name)Checks whether a store with the given name exists in the current context.
has_store_global
(store_name)Determines whether a store with the given name exists across all datasets and the global context.
list_keys
(store_name)Lists all keys in the specified store.
Lists the stores associated with the current context.
Lists stores across all datasets and the global context.
set_key
(store_name, key, value[, ttl])Sets or updates a key in the specified store.
update_ttl
(store_name, key, ttl)Updates the TTL for a key.
-
COLLECTION_NAME
= 'execution_store'¶
-
cleanup
() → int¶ Deletes all stores and keys associated with the current context.
-
count_keys
(store_name) → int¶ Counts the keys in the specified store.
-
count_stores
() → int¶ Counts the stores associated with the current context.
-
count_stores_global
() → int¶ Counts stores across all datasets and the global context.
-
create_store
(store_name, metadata: Optional[Dict[str, Any]] = None) → fiftyone.operators.store.models.StoreDocument¶ Creates a store associated with the current context.
-
delete_key
(store_name, key) → bool¶ Deletes the document that matches the store name and key, if one exists.
-
delete_store
(store_name) → int¶ Deletes the specified store.
-
delete_store_global
(store_name) → int¶ Deletes the specified store across all datasets and the global context.
-
get_key
(store_name, key) → fiftyone.operators.store.models.KeyDocument¶ Gets a key from the specified store.
-
get_store
(store_name) → fiftyone.operators.store.models.StoreDocument¶ Gets a store associated with the current context.
-
has_key
(store_name, key) → bool¶ Determines whether a key exists in the specified store.
-
has_store
(store_name) → bool¶ Checks whether a store with the given name exists in the current context.
-
has_store_global
(store_name)¶ Determines whether a store with the given name exists across all datasets and the global context.
-
list_keys
(store_name) → list¶ Lists all keys in the specified store.
-
list_stores
() → list¶ Lists the stores associated with the current context.
-
list_stores_global
() → list¶ Lists stores across all datasets and the global context.
-
set_key
(store_name, key, value, ttl=None) → fiftyone.operators.store.models.KeyDocument¶ Sets or updates a key in the specified store.
-
update_ttl
(store_name, key, ttl) → bool¶ Updates the TTL for a key.
-