restokes92 commited on
Commit
2d43ecd
·
verified ·
1 Parent(s): c1bf102

Upload Kaiju Coder 7 OpenCode helper package

Browse files
Files changed (1) hide show
  1. scripts/make_hf_release_public.sh +101 -0
scripts/make_hf_release_public.sh ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ NAMESPACE="${KAIJU_HF_NAMESPACE:-RMDWLLC}"
6
+ APPLY="${KAIJU_HF_PUBLIC_APPLY:-0}"
7
+
8
+ repos=(
9
+ "kaiju-coder-7-adapter"
10
+ "kaiju-coder-7-opencode"
11
+ "kaiju-coder-7-quantized-runtime"
12
+ "kaiju-coder-7"
13
+ )
14
+
15
+ usage() {
16
+ cat <<'USAGE'
17
+ Make the uploaded Kaiju Coder 7 Hugging Face release repos public.
18
+
19
+ Dry-run by default. Set KAIJU_HF_PUBLIC_APPLY=1 only after Richard approves
20
+ public HF visibility and release/HUMAN_RELEASE_REVIEW.md records:
21
+
22
+ HF_VISIBILITY_DECISION: PUBLIC
23
+
24
+ Environment:
25
+ KAIJU_HF_NAMESPACE Hugging Face namespace, default RMDWLLC
26
+ KAIJU_HF_PUBLIC_APPLY 0 dry-run, 1 execute visibility change
27
+
28
+ This script never reads, accepts, or prints Hugging Face tokens.
29
+ USAGE
30
+ }
31
+
32
+ if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
33
+ usage
34
+ exit 0
35
+ fi
36
+
37
+ cd "${ROOT}"
38
+
39
+ cat <<EOF
40
+ Kaiju Coder 7 Hugging Face public visibility switch
41
+
42
+ Namespace: ${NAMESPACE}
43
+ Apply: ${APPLY}
44
+
45
+ Repos:
46
+ EOF
47
+ for repo in "${repos[@]}"; do
48
+ echo "- ${NAMESPACE}/${repo}"
49
+ done
50
+
51
+ cat <<'EOF'
52
+
53
+ Preflight:
54
+ + python3 scripts/check_human_release_review.py --mode public --require-merged-upload --require-public-visibility
55
+ + hf auth whoami
56
+
57
+ Visibility commands:
58
+ EOF
59
+ for repo in "${repos[@]}"; do
60
+ echo "+ hf repos settings ${NAMESPACE}/${repo} --repo-type model --public"
61
+ done
62
+
63
+ cat <<'EOF'
64
+
65
+ Verification:
66
+ + python3 scripts/check_hf_uploaded_release.py --namespace RMDWLLC --apply --require-public
67
+ + hf models info RMDWLLC/kaiju-coder-7 --expand=private,sha,lastModified,siblings
68
+ EOF
69
+
70
+ if [[ "${APPLY}" != "1" ]]; then
71
+ cat <<'EOF'
72
+
73
+ Dry run only. Set KAIJU_HF_PUBLIC_APPLY=1 to execute.
74
+ EOF
75
+ exit 0
76
+ fi
77
+
78
+ python3 scripts/check_human_release_review.py \
79
+ --mode public \
80
+ --require-merged-upload \
81
+ --require-public-visibility
82
+
83
+ hf auth whoami
84
+
85
+ for repo in "${repos[@]}"; do
86
+ echo "+ hf repos settings ${NAMESPACE}/${repo} --repo-type model --public"
87
+ hf repos settings "${NAMESPACE}/${repo}" --repo-type model --public
88
+ done
89
+
90
+ python3 scripts/check_hf_uploaded_release.py \
91
+ --namespace "${NAMESPACE}" \
92
+ --apply \
93
+ --require-public
94
+
95
+ hf models info "${NAMESPACE}/kaiju-coder-7" \
96
+ --expand=private,sha,lastModified,siblings
97
+
98
+ cat <<'EOF'
99
+
100
+ Kaiju Coder 7 Hugging Face public visibility switch finished.
101
+ EOF