diff options
Diffstat (limited to 'scripts/check_ptrm_gram.sh')
| -rwxr-xr-x | scripts/check_ptrm_gram.sh | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/scripts/check_ptrm_gram.sh b/scripts/check_ptrm_gram.sh new file mode 100755 index 0000000..26f5e3e --- /dev/null +++ b/scripts/check_ptrm_gram.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# Weekly check: have PTRM / GRAM official implementations been released? +# - diffs repo lists of SamsungSAILMontreal (PTRM authors) and ahn-ml (GRAM authors) +# - GitHub global search for ptrm / gram-reasoning style repos +# - GRAM project page: does "coming soon" still gate the code link? +# On any hit: writes ALERT_ptrm_gram.txt next to the log. Designed for cron (no env deps). +set -o pipefail + +DIR="/home/yurenh2/rrm/scripts/ptrm_gram_watch" +mkdir -p "$DIR" +LOG="$DIR/check.log" +TS="$(date '+%Y-%m-%d %H:%M:%S')" +alert() { echo "[$TS] ALERT: $*" >> "$DIR/ALERT_ptrm_gram.txt"; echo "[$TS] ALERT: $*" >> "$LOG"; } +note() { echo "[$TS] $*" >> "$LOG"; } + +fetch_repos() { # org -> sorted repo names + curl -sL --max-time 60 "https://api.github.com/orgs/$1/repos?per_page=100" \ + | grep -o '"full_name": *"[^"]*"' | cut -d'"' -f4 | sort +} + +for org in SamsungSAILMontreal ahn-ml; do + cur="$DIR/${org}_repos.txt" + new="$DIR/${org}_repos.new" + fetch_repos "$org" > "$new" + if [[ ! -s "$new" ]]; then note "$org: fetch failed/empty, skipping diff"; rm -f "$new"; continue; fi + if [[ -f "$cur" ]]; then + added="$(comm -13 "$cur" "$new")" + if [[ -n "$added" ]]; then alert "$org new repos: $(echo "$added" | tr '\n' ' ')"; fi + fi + mv "$new" "$cur" + note "$org: $(wc -l < "$cur") repos" +done + +# global search (unauthenticated; weekly cadence well under rate limits) +for q in "PTRM+recursive+reasoning" "probabilistic+tiny+recursive" "GRAM+recursive+reasoning+model"; do + hits="$(curl -sL --max-time 60 "https://api.github.com/search/repositories?q=${q}&sort=updated&per_page=5" \ + | grep -o '"full_name": *"[^"]*"' | cut -d'"' -f4)" + known="$DIR/search_known.txt"; touch "$known" + while IFS= read -r r; do + [[ -z "$r" ]] && continue + if ! grep -qxF "$r" "$known"; then + echo "$r" >> "$known" + alert "new search hit ($q): $r" + fi + done <<< "$hits" +done + +# GRAM project page: code still "coming soon"? +page="$(curl -sL --max-time 60 "https://ahn-ml.github.io/gram-website/" || true)" +if [[ -n "$page" ]]; then + if echo "$page" | grep -qi "coming soon"; then + note "GRAM page: still 'coming soon'" + else + alert "GRAM page no longer says 'coming soon' — check for code link" + fi + link="$(echo "$page" | grep -oiE 'href="[^"]*github\.com[^"]*"' | grep -vi "ahn-ml.github.io\|Academic-project-page-template" | head -3)" + if [[ -n "$link" ]]; then alert "GRAM page github link(s): $link"; fi +else + note "GRAM page fetch failed" +fi + +note "check complete" |
