Manifest
Definitions
Manifest
A set of related cloud and/or local datasets, metadata, and helper methods. Typically produced by or needed for processing by an Octue service.
Tip
Use a manifest to send datasets to an Octue service as a question (for processing) - the service will send an output manifest back with its answer if the answer includes output datasets.
Key features
Send datasets to a service
Get an Octue service to analyse data for you as part of a larger analysis.
from octue.resources import Child
child = Child(
id="octue/wind-speed:latest",
backend={"name": "GCPPubSubBackend", "project_name": "my-project"},
)
answer = child.ask(input_manifest=manifest)
See here for more information.
Receive datasets from a service
Get output datasets from an Octue service from the cloud when you’re ready.
answer["output_manifest"]["an_output_dataset"].files
>>> <FilterSet({<Datafile('my_file.csv')>, <Datafile('another_file.csv')>})>
Hint
Datasets in an output manifest are stored in the cloud. You’ll need to keep a reference to where they are to access them - the output manifest is this reference. You’ll need to use it straight away or save it to make use of it.
Further information
Manifests of local datasets
You can include local datasets in your manifest if you can guarantee all services that need them can access them. A use
case for this is, for example, a supercomputer cluster running several octue
services locally that process and
transfer large amounts of data. It is much faster to store and access the required datasets locally than upload them to
the cloud and then download them again for each service (as would happen with cloud datasets).
Warning
If you want to ask a child a question that includes a manifest containing one or more local datasets, you must
include the allow_local_files
parameter. For example, if you have an
analysis object with a child called “wind_speed”:
input_manifest = Manifest(
datasets={
"my_dataset_0": "gs://my-bucket/my_dataset_0",
"my_dataset_1": "local/path/to/my_dataset_1",
}
)
analysis.children["wind_speed"].ask(
input_values=analysis.input_values,
input_manifest=analysis.input_manifest,
allow_local_files=True,
)