File size: 2,280 Bytes
2d43ecd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/env bash
set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
NAMESPACE="${KAIJU_HF_NAMESPACE:-RMDWLLC}"
APPLY="${KAIJU_HF_PUBLIC_APPLY:-0}"

repos=(
  "kaiju-coder-7-adapter"
  "kaiju-coder-7-opencode"
  "kaiju-coder-7-quantized-runtime"
  "kaiju-coder-7"
)

usage() {
  cat <<'USAGE'
Make the uploaded Kaiju Coder 7 Hugging Face release repos public.

Dry-run by default. Set KAIJU_HF_PUBLIC_APPLY=1 only after Richard approves
public HF visibility and release/HUMAN_RELEASE_REVIEW.md records:

  HF_VISIBILITY_DECISION: PUBLIC

Environment:
  KAIJU_HF_NAMESPACE      Hugging Face namespace, default RMDWLLC
  KAIJU_HF_PUBLIC_APPLY  0 dry-run, 1 execute visibility change

This script never reads, accepts, or prints Hugging Face tokens.
USAGE
}

if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
  usage
  exit 0
fi

cd "${ROOT}"

cat <<EOF
Kaiju Coder 7 Hugging Face public visibility switch

Namespace: ${NAMESPACE}
Apply: ${APPLY}

Repos:
EOF
for repo in "${repos[@]}"; do
  echo "- ${NAMESPACE}/${repo}"
done

cat <<'EOF'

Preflight:
+ python3 scripts/check_human_release_review.py --mode public --require-merged-upload --require-public-visibility
+ hf auth whoami

Visibility commands:
EOF
for repo in "${repos[@]}"; do
  echo "+ hf repos settings ${NAMESPACE}/${repo} --repo-type model --public"
done

cat <<'EOF'

Verification:
+ python3 scripts/check_hf_uploaded_release.py --namespace RMDWLLC --apply --require-public
+ hf models info RMDWLLC/kaiju-coder-7 --expand=private,sha,lastModified,siblings
EOF

if [[ "${APPLY}" != "1" ]]; then
  cat <<'EOF'

Dry run only. Set KAIJU_HF_PUBLIC_APPLY=1 to execute.
EOF
  exit 0
fi

python3 scripts/check_human_release_review.py \
  --mode public \
  --require-merged-upload \
  --require-public-visibility

hf auth whoami

for repo in "${repos[@]}"; do
  echo "+ hf repos settings ${NAMESPACE}/${repo} --repo-type model --public"
  hf repos settings "${NAMESPACE}/${repo}" --repo-type model --public
done

python3 scripts/check_hf_uploaded_release.py \
  --namespace "${NAMESPACE}" \
  --apply \
  --require-public

hf models info "${NAMESPACE}/kaiju-coder-7" \
  --expand=private,sha,lastModified,siblings

cat <<'EOF'

Kaiju Coder 7 Hugging Face public visibility switch finished.
EOF