-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* optimise e2e * optimise e2e * optimise e2e * add simple for e2e * add sync for dataset * code format * optimise e2e test * update runtime yaml for e2e * fix shell * fix shell * fix hex encode/decode error when value is "0" * update shell for task logs * add job judge * fix sharding calculate wrong * remove sync from wrapper * add flush for ppl result
- Loading branch information
1 parent
71d6704
commit e797feb
Showing
24 changed files
with
230 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
var=$(lsof -i tcp:8082) | ||
if [ ! -z "$var" ] | ||
then | ||
sleep 10 | ||
else | ||
if kill -9 `ps -ef|grep port-forward | grep -v grep | awk '{print $2}'` ; then echo "kill success and restart port-forward"; fi | ||
nohup kubectl port-forward --namespace starwhale-e2e svc/starwhale-e2e-controller 8082:8082 & | ||
sleep 10 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if [[ ! -z ${DEBUG} ]]; then | ||
set -x | ||
fi | ||
echo "login" | ||
curl -D - --location --request POST "http://$1/api/v1/login" \ | ||
--header 'Accept: application/json' \ | ||
--form 'userName="starwhale"' \ | ||
--form 'userPwd="abcd1234"' -o /dev/null | while read line | ||
do | ||
if [[ "${line}" =~ ^Authorization.* ]] ; then | ||
echo "${line}" > auth_header.h | ||
fi | ||
done | ||
|
||
auth_header=`cat auth_header.h` | ||
|
||
sudo apt-get install jq | ||
|
||
echo "get task" | ||
OUT=`curl -X 'GET' \ | ||
"http://$1/api/v1/project/starwhale/job/1/task?pageNum=1&pageSize=10" \ | ||
-H 'accept: application/json' \ | ||
-H "$auth_header" | jq '.data.list'| jq -r '.[]|.id'` | ||
echo "taskids: $OUT..." | ||
read -a task_ids <<< $OUT | ||
task_ids=($OUT) | ||
|
||
SAVEIFS=$IFS # Save current IFS (Internal Field Separator) | ||
IFS=$'\n' # Change IFS to newline char | ||
task_ids=($OUT) # split the `names` string into an array by the same name | ||
IFS=$SAVEIFS # Restore original IFS | ||
echo "get logs..." | ||
for (( i=0; i<${#task_ids[@]}; i++ )) | ||
do | ||
task_id=${task_ids[$i]} | ||
log_file=`curl -X 'GET' "http://$1/api/v1/log/offline/$task_id" -H 'accept: application/json' -H "$auth_header" | jq -r '.data[0]'` | ||
echo $log_file | ||
|
||
echo "task log is:" | ||
curl -X 'GET' "http://$1/api/v1/log/offline/$task_id/$log_file" -H 'accept: plain/text' -H "$auth_header" | ||
done | ||
|
||
echo "get job status" | ||
|
||
curl -X 'GET' \ | ||
"http://$1/api/v1/project/starwhale/job/1" \ | ||
-H 'accept: application/json' \ | ||
-H "$auth_header" | jq -r '.data.jobStatus' > jobStatus | ||
job_status=`cat jobStatus` | ||
|
||
echo "job status is $job_status" | ||
if [[ "$job_status" != "SUCCESS" ]] ; then | ||
exit 1 | ||
fi |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.