Skip to content

Commit

Permalink
fix: tweaks to support running tests locally on apple silicon; probab…
Browse files Browse the repository at this point in the history
…ly arm generally
  • Loading branch information
starpit committed Mar 29, 2023
1 parent 183393d commit f89e4e2
Show file tree
Hide file tree
Showing 23 changed files with 324 additions and 3 deletions.
25 changes: 25 additions & 0 deletions tests/kind/profiles/non-gpu1/keep-it-simple.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "keep-it-simple.arm64",
"creationTime": 1664149787016,
"lastModifiedTime": 1676828268772,
"lastUsedTime": 1680126266770,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": "{\"Number of Workers\":1,\"CPUs per worker\":\"500m\",\"GPUs per worker\":0,\"Memory per worker\":\"1.5Gi\",\"Ephemeral Storage per worker\":\"5Gi\"}",
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Keep It Simple"
}
}
File renamed without changes.
33 changes: 33 additions & 0 deletions tests/kind/profiles/non-gpu1/mcad-coscheduler.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "mcad-coscheduler",
"creationTime": 1660657756574,
"lastModifiedTime": 1664150418757,
"lastUsedTime": 1677700501499,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": {
"Number of Workers": 1,
"CPUs per worker": "200m",
"GPUs per worker": 0,
"Memory per worker": "1.25Gi",
"Ephemeral Storage per worker": "5Gi"
},
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Use the Multi-user Enhanced Kubernetes Scheduler",
"kubernetes/mcad/choose/job-priority": "Default Priority",
"kubernetes/mcad/choose/scheduler": "MCAD with the Advanced Coscheduler"
}
}
27 changes: 27 additions & 0 deletions tests/kind/profiles/non-gpu1/mcad-default.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "mcad-default.arm64",
"creationTime": 1660657756574,
"lastModifiedTime": 1660747919298,
"lastUsedTime": 1680126433820,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": "{\"Number of Workers\":1,\"CPUs per worker\":\"200m\",\"GPUs per worker\":0,\"Memory per worker\":\"1.25Gi\",\"Ephemeral Storage per worker\":\"5Gi\"}",
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Use the Multi-user Enhanced Kubernetes Scheduler",
"kubernetes/mcad/choose/job-priority": "Default Priority",
"kubernetes/mcad/choose/scheduler": "MCAD with the Default Kubernetes Scheduler"
}
}
File renamed without changes.
33 changes: 33 additions & 0 deletions tests/kind/profiles/non-gpu1/mcad-preinstalled.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "mcad-preinstalled",
"creationTime": 1660657756574,
"lastModifiedTime": 1660747919298,
"lastUsedTime": 1668210325310,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": {
"Number of Workers": 1,
"CPUs per worker": "200m",
"GPUs per worker": 0,
"Memory per worker": "1.25Gi",
"Ephemeral Storage per worker": "5Gi"
},
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Use the Multi-user Enhanced Kubernetes Scheduler",
"kubernetes/mcad/choose/job-priority": "Default Priority",
"kubernetes/mcad/choose/scheduler": "My administrator has already installed and configured MCAD"
}
}
31 changes: 31 additions & 0 deletions tests/kind/profiles/non-gpu1/ray-autoscaler.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "ray-autoscaler",
"creationTime": 1660657756574,
"lastModifiedTime": 1660675440396,
"lastUsedTime": 1664202470263,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": {
"Number of Workers": 1,
"CPUs per worker": "200m",
"GPUs per worker": 0,
"Memory per worker": "1.25Gi",
"Ephemeral Storage per worker": "5Gi"
},
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Use the Ray Autoscaler"
}
}
File renamed without changes.
31 changes: 31 additions & 0 deletions tests/kind/profiles/non-gpu2/keep-it-simple.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "keep-it-simple",
"creationTime": 1660657756574,
"lastModifiedTime": 1660658307175,
"lastUsedTime": 1678746664684,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": {
"Number of Workers": 1,
"CPUs per worker": "500m",
"GPUs per worker": 0,
"Memory per worker": "1.5Gi",
"Ephemeral Storage per worker": "5Gi"
},
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Keep It Simple"
}
}
File renamed without changes.
31 changes: 31 additions & 0 deletions tests/kind/profiles/non-gpu3/keep-it-simple.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "keep-it-simple",
"creationTime": 1660657756574,
"lastModifiedTime": 1660658307175,
"lastUsedTime": 1660742079201,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": {
"Number of Workers": 1,
"CPUs per worker": "500m",
"GPUs per worker": 0,
"Memory per worker": "1.5Gi",
"Ephemeral Storage per worker": "5Gi"
},
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Keep It Simple"
}
}
File renamed without changes.
31 changes: 31 additions & 0 deletions tests/kind/profiles/non-gpu4/keep-it-simple.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "keep-it-simple",
"creationTime": 1660657756574,
"lastModifiedTime": 1660658307175,
"lastUsedTime": 1660742079201,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": {
"Number of Workers": 1,
"CPUs per worker": "500m",
"GPUs per worker": 0,
"Memory per worker": "1.5Gi",
"Ephemeral Storage per worker": "5Gi"
},
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Keep It Simple"
}
}
File renamed without changes.
25 changes: 25 additions & 0 deletions tests/kind/profiles/non-gpu5/keep-it-simple.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "keep-it-simple",
"creationTime": 1664149787016,
"lastModifiedTime": 1676828268772,
"lastUsedTime": 1678152542012,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Ray Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/qiskit\",\"Base image\":\"rayproject/ray:2.3.0-py38-aarch64\",\"Command line prefix\":\"python3 main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": "{\"Number of Workers\":1,\"CPUs per worker\":\"500m\",\"GPUs per worker\":0,\"Memory per worker\":\"1.5Gi\",\"Ephemeral Storage per worker\":\"5Gi\"}",
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Keep It Simple"
}
}
File renamed without changes.
25 changes: 25 additions & 0 deletions tests/kind/profiles/non-gpu6/keep-it-simple.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "keep-it-simple",
"creationTime": 1664149787016,
"lastModifiedTime": 1676828268772,
"lastUsedTime": 1678637996635,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Torch Native Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/torchx\",\"Base image\":\"bitnami/pytorch:1.13.1\",\"Command line prefix\":\"python3 compute_world_size/main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": "{\"Number of Workers\":1,\"CPUs per worker\":\"500m\",\"GPUs per worker\":0,\"Memory per worker\":\"1.5Gi\",\"Ephemeral Storage per worker\":\"5Gi\"}",
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Keep It Simple"
}
}
File renamed without changes.
27 changes: 27 additions & 0 deletions tests/kind/profiles/non-gpu6/mcad-default.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "mcad-default",
"creationTime": 1660657756574,
"lastModifiedTime": 1678638052528,
"lastUsedTime": 1678980273687,
"choices": {
"madwizard/apriori/use-gpu": "don't use gpus",
"madwizard/apriori/arch": "arm64",
"madwizard/apriori/platform": "darwin",
"madwizard/apriori/mac-installer": "Homebrew",
"madwizard/apriori/in-terminal": "HTML",
"ml/codeflare": "Submit a new Run",
"ml/codeflare/run": "Bring Your Own Torch Native Code",
"ml/codeflare/training/byoc/form": "{\"Path to source\":\"$PWD/tests/kind/inputs/torchx\",\"Base image\":\"bitnami/pytorch:1.13.1\",\"Command line prefix\":\"python3 compute_world_size/main.py\"}",
"kubernetes/choose/secret/image-pull": "No secret needed, since my image is public",
"s3/choose/bucket/maybe": "My data is not stored in S3",
"ml/ray/start/resources": "{\"Number of Workers\":1,\"CPUs per worker\":\"500m\",\"GPUs per worker\":0,\"Memory per worker\":\"1.5Gi\",\"Ephemeral Storage per worker\":\"5Gi\"}",
"kubernetes/context": "kind-codeflare-test",
"kubernetes/choose/ns": "default",
"ml/ray/storage/s3/maybe": "My code does not use Ray Workflows",
"ml/ray/cluster/choose": "codeflare-test-ray-cluster",
"ml/ray/cluster/choose/kubernetes": "codeflare-test-ray-cluster",
"ml/ray/cluster/kubernetes/choose-pod-scheduler": "Use the Multi-user Enhanced Kubernetes Scheduler",
"kubernetes/mcad/choose/job-priority": "Default Priority",
"kubernetes/mcad/choose/scheduler": "MCAD with the Default Kubernetes Scheduler"
}
}
File renamed without changes.
8 changes: 5 additions & 3 deletions tests/kind/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ function start_kind {
function run {
local profileFull="$1"
local variant=$(dirname "$profileFull")
local profile=$(basename "$profileFull")
local profileBase=$(basename "$profileFull")
local profile=$(basename "$profileFull").$(uname -m)

export MWPROFILES_PATH="$MWPROFILES_PATH_BASE"/$variant
mkdir -p "$MWPROFILES_PATH"

Expand All @@ -95,10 +97,10 @@ function run {
echo "[Test] Run: expecting dashdash: $expectedDashDash"
fi

local PRE="$MWPROFILES_PATH_BASE"/../profiles.d/$profile/pre
local PRE="$MWPROFILES_PATH_BASE"/../profiles.d/$profileBase/pre
if [ -f "$PRE" ]; then
echo "[Test] Running pre guidebooks for profile=$profile"
cat "$PRE" | xargs -n1 "$ROOT"/bin/codeflare -p $profile $yes
cat "$PRE" | xargs -n1 "$ROOT"/bin/codeflare -p $profileBase $yes
fi

echo "[Test] Running with variant=$variant profile=$profile yes=$yes"
Expand Down

0 comments on commit f89e4e2

Please sign in to comment.