mirror of
https://github.com/twitter/the-algorithm.git
synced 2025-06-10 22:58:17 -05:00
Open-sourcing Representation Scorer
Representation Scorer (RSX) serves as a centralized scoring system, offering SimClusters or other embedding-based scoring solutions as machine learning features.
This commit is contained in:
8
representation-scorer/bin/canary-check.sh
Executable file
8
representation-scorer/bin/canary-check.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
export CANARY_CHECK_ROLE="representation-scorer"
|
||||
export CANARY_CHECK_NAME="representation-scorer"
|
||||
export CANARY_CHECK_INSTANCES="0-19"
|
||||
|
||||
python3 relevance-platform/tools/canary_check.py "$@"
|
||||
|
4
representation-scorer/bin/deploy.sh
Executable file
4
representation-scorer/bin/deploy.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
JOB=representation-scorer bazel run --ui_event_filters=-info,-stdout,-stderr --noshow_progress \
|
||||
//relevance-platform/src/main/python/deploy -- "$@"
|
66
representation-scorer/bin/remote-debug-tunnel.sh
Executable file
66
representation-scorer/bin/remote-debug-tunnel.sh
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o nounset
|
||||
set -eu
|
||||
|
||||
DC="atla"
|
||||
ROLE="$USER"
|
||||
SERVICE="representation-scorer"
|
||||
INSTANCE="0"
|
||||
KEY="$DC/$ROLE/devel/$SERVICE/$INSTANCE"
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
echo "$0 Set up an ssh tunnel for $SERVICE remote debugging and disable aurora health checks"
|
||||
echo " "
|
||||
echo "See representation-scorer/README.md for details of how to use this script, and go/remote-debug for"
|
||||
echo "general information about remote debugging in Aurora"
|
||||
echo " "
|
||||
echo "Default instance if called with no args:"
|
||||
echo " $KEY"
|
||||
echo " "
|
||||
echo "Positional args:"
|
||||
echo " $0 [datacentre] [role] [service_name] [instance]"
|
||||
echo " "
|
||||
echo "Options:"
|
||||
echo " -h, --help show brief help"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "${1-}" ]; then
|
||||
DC="$1"
|
||||
fi
|
||||
|
||||
if [ -n "${2-}" ]; then
|
||||
ROLE="$2"
|
||||
fi
|
||||
|
||||
if [ -n "${3-}" ]; then
|
||||
SERVICE="$3"
|
||||
fi
|
||||
|
||||
if [ -n "${4-}" ]; then
|
||||
INSTANCE="$4"
|
||||
fi
|
||||
|
||||
KEY="$DC/$ROLE/devel/$SERVICE/$INSTANCE"
|
||||
read -p "Set up remote debugger tunnel for $KEY? (y/n) " -r CONFIRM
|
||||
if [[ ! $CONFIRM =~ ^[Yy]$ ]]; then
|
||||
echo "Exiting, tunnel not created"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Disabling health check and opening tunnel. Exit with control-c when you're finished"
|
||||
CMD="aurora task ssh $KEY -c 'touch .healthchecksnooze' && aurora task ssh $KEY -L '5005:debug' --ssh-options '-N -S none -v '"
|
||||
|
||||
echo "Running $CMD"
|
||||
eval "$CMD"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user