Skip to content

Commit 45fbb0e

Browse files
committed
handle branch names in the release actions
1 parent a84a17d commit 45fbb0e

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.github/workflows/release_interpret.yml

+7
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ jobs:
1414
publish_packages:
1515
runs-on: ubuntu-latest
1616
permissions:
17+
contents: read
1718
id-token: write
1819
steps:
20+
- name: Check out repo
21+
uses: actions/checkout@v4
1922
- name: Set up Python
2023
uses: actions/setup-python@v5
2124
with:
@@ -36,6 +39,10 @@ jobs:
3639
echo "Error: commit_id is empty."
3740
exit 1
3841
fi
42+
if git show-ref --verify --quiet refs/heads/${commit_id}; then
43+
# If it's a valid branch, resolve it to a commit ID
44+
commit_id=$(git rev-parse ${commit_id})
45+
fi
3946
echo "Commit ID: ${commit_id}"
4047
workflow_runs=$(gh api -X GET "/repos/${{ github.repository }}/actions/runs?status=success" -q '.workflow_runs | map(select(.head_commit.id == "'"${commit_id}"'" and .name == "interpret-CI")) | sort_by(.created_at) | reverse | .[0]')
4148
run_id=$(echo "$workflow_runs" | jq -r '.id')

.github/workflows/release_powerlift.yml

+7
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ jobs:
1111
publish_powerlift:
1212
runs-on: ubuntu-latest
1313
permissions:
14+
contents: read
1415
id-token: write
1516
steps:
17+
- name: Check out repo
18+
uses: actions/checkout@v4
1619
- name: Set up Python
1720
uses: actions/setup-python@v5
1821
with:
@@ -25,6 +28,10 @@ jobs:
2528
echo "Error: commit_id is empty."
2629
exit 1
2730
fi
31+
if git show-ref --verify --quiet refs/heads/${commit_id}; then
32+
# If it's a valid branch, resolve it to a commit ID
33+
commit_id=$(git rev-parse ${commit_id})
34+
fi
2835
echo "Commit ID: ${commit_id}"
2936
workflow_runs=$(gh api -X GET "/repos/${{ github.repository }}/actions/runs?status=success" -q '.workflow_runs | map(select(.head_commit.id == "'"${commit_id}"'" and .name == "interpret-CI")) | sort_by(.created_at) | reverse | .[0]')
3037
run_id=$(echo "$workflow_runs" | jq -r '.id')

docs/interpret/hyperparameters.md

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ guidance: We typically do not advise changing early_stopping_rounds. The default
118118

119119
## early_stopping_tolerance
120120
default: 1e-5
121+
121122
hyperparameters: [1e-5, 1e-7, 0.0]
122123

123124
guidance: early_stopping_tolerance is set to 1e-5 because it decreases the fitting time by 25%, however setting early_stopping_tolerance to 0.0, or even a negative value sometimes yields slightly higher accuracy. EBMs are a bagged ensemble model, so overfitting each individual bag a little can be beneficial because after the models are averaged together in the ensemble averaging decreases the variance due to overfitting. Using a negative value for early_stopping_tolerance allows the individual models to be overfit.

0 commit comments

Comments
 (0)