| #!/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 |
|
|