Skip to content

Latest commit

 

History

History
103 lines (68 loc) · 4.31 KB

README.md

File metadata and controls

103 lines (68 loc) · 4.31 KB

Computer Vision

Generate seeded noisy 8×8 geometric-pattern images from the bundled input specification, validate labels, augment only training images, learn class centroids, and evaluate classification on held-out images. This small offline dataset is not CIFAR-10.

Fresh local checkout

Requires Go and Python 3.12+. Run this command from the directory in which you keep your repositories:

git clone https://github.com/UFFeScience/akoflow-examples.git
cd akoflow-examples/machine-learning/computer-vision
./prepare.sh && ./run.sh

prepare.sh downloads the pinned Python packages (when required) and Go module once. run.sh then executes the local stages offline in dependency waves. Results are in outputs/; inspect manifest.json, dag-validation.json, and each stage-<name>.json. Independent branches run concurrently.

Run

./run.sh

Requires Go and Python 3 for the standalone smoke test and Docker for execution through AkôFlow. The workflow graph is in workflow.yaml; the expected contract is in expected/manifest.json.

Published image: ghcr.io/uffescience/akoflow-examples/showcase-computer-vision:v1.

Run locally step by step

1. Check the prerequisites

Install Go, Python 3, Docker, and a local AkôFlow server/Desktop. Set the local API connection, then confirm every prerequisite:

export AKOFLOW_API_URL=http://127.0.0.1:8080/akoflow-api
export AKOFLOW_API_TOKEN=akoflow-development-token

python3 --version
docker version
curl --fail -H "Authorization: Bearer $AKOFLOW_API_TOKEN" "$AKOFLOW_API_URL/health/"

2. Run the deterministic smoke test

From this showcase directory:

./run.sh

The command recreates outputs/, launches one process per activity in dependency waves (siblings run concurrently), and validates every artifact declared in expected/manifest.json.

3. Build the image used by the workflow

IMAGE=$(sed -n 's/^[[:space:]]*image: //p' workflow.yaml | head -n 1)
docker build -f docker/Dockerfile -t "$IMAGE" .

The workflow command is authoritative. The image intentionally has no competing ENTRYPOINT.

4. Register the local infrastructure and workflow

for item in "environments environment.yaml" "execution-scopes scope.yaml" "network-topologies topology.yaml" "workflow-definitions workflow.yaml"
do
  set -- $item
  curl --fail-with-body -H "Authorization: Bearer $AKOFLOW_API_TOKEN" -H 'Content-Type: application/yaml' --data-binary "@$2" "$AKOFLOW_API_URL/$1/"
done

The order matters: the execution scope references the environment version, the topology references the scope, and the workflow references its namespaced local runtime.

5. Plan and execute in AkôFlow Desktop

  1. Open Workflows → Definitions and select this showcase.
  2. Choose Generate plan.
  3. Select the execution scope imported from scope.yaml.
  4. Run HEFT and select its feasible candidate.
  5. Choose Execute plan and confirm Real execution.
  6. Wait until the run is completed and every activity is settled.

6. Verify the result

Open the completed run and inspect:

  • Activities for the engine-rendered DAG and per-activity status;
  • Workflow for the observed execution lifecycle and timing decomposition;
  • Data for workspace transfers;
  • the final activity's Generated files table for file names, sizes, and SHA-256 checksums.

Historical captures are stored in screenshots/. They predate the corrected DAG and must not be used to verify this revision. New daemon execution and one capture per activity are still required before claiming Desktop verification. Current local evidence is outputs/dag-validation.json plus outputs/stage-<activity>.json.

Historical capture names:

  • workflow.png: completed activity DAG;
  • execution.png: observed execution lifecycle and timing decomposition;
  • outputs.png: data transfers between activity workspaces;
  • generated-files.png: files observed in the final output-producing activity.

Current execution evidence

The current completed daemon run is recorded in evidence/daemon-run.json. One capture for every activity and the observed DAG are in screenshots/current/; capture-manifest.json identifies their exact run and image. Older captures directly under screenshots/ are historical and do not verify this revision.