Skip to content

Commit

Permalink
fix error of checking use of resources
Browse files Browse the repository at this point in the history
Signed-off-by: helenxie-bit <[email protected]>
  • Loading branch information
helenxie-bit committed Sep 20, 2024
1 parent 4ae11ed commit bedab36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/e2e-test-tune-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ jobs:
kubectl get pods -n default
POD_NAME=$(kubectl get pods -n default --no-headers -o custom-columns=":metadata.name" | grep tune-example-2 | grep master)
kubectl describe pod $POD_NAME -n default
kubectl top pods $POD_NAME
kubectl get events -n default | grep "tune-example-2"
kubectl get apiservices | grep metrics
minikube addons enable metrics-server
kubectl get pods -n kube-system
kubectl top pods $POD_NAME
# Step to fetch kubelet logs from Minikube
- name: Fetch Kubelet Logs
Expand Down
13 changes: 9 additions & 4 deletions test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,26 @@ def get_experiment_pods_logs(katib_client: KatibClient, exp_name: str, exp_names
pod_logs1 = v1.read_namespaced_pod_log(
name=pod.metadata.name,
namespace=exp_namespace,
container="metrics-logger-and-collector" # Specify the desired container
container="metrics-logger-and-collector"
)
logging.info(f"Logs for pod {pod.metadata.name}:\n{pod_logs1}")
logging.info(f"Logs of metrics-logger-and-collector for pod {pod.metadata.name}:\n{pod_logs1}")
pod_logs2 = v1.read_namespaced_pod_log(
name=pod.metadata.name,
namespace=exp_namespace,
container="pytorch"
)
logging.info(f"Logs for pod {pod.metadata.name}:\n{pod_logs2}")
logging.info(f"Logs of pytorch for pod {pod.metadata.name}:\n{pod_logs2}")
pod_logs3 = v1.read_namespaced_pod_log(
name=pod.metadata.name,
namespace=exp_namespace,
container="storage-initializer"
)
logging.info(f"Logs for pod {pod.metadata.name}:\n{pod_logs3}")
logging.info(f"Logs of storage-initializer for pod {pod.metadata.name}:\n{pod_logs3}")
pod_logs4 = v1.read_namespaced_pod_log(
name=pod.metadata.name,
namespace=exp_namespace,
)
logging.info(f"Logs for pod {pod.metadata.name}:\n{pod_logs4}")
except Exception as e:
logging.error(f"Failed to get logs for pod {pod.metadata.name}: {str(e)}")

Expand Down

0 comments on commit bedab36

Please sign in to comment.