Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c6ab78503 | |||
| 45e0c7d9ca |
+1
-1
@@ -30,7 +30,7 @@ from lib.data_types import (
|
|||||||
BenchmarkResult
|
BenchmarkResult
|
||||||
)
|
)
|
||||||
|
|
||||||
VERSION = "0.2.1"
|
VERSION = "0.2.0"
|
||||||
|
|
||||||
MSG_HISTORY_LEN = 100
|
MSG_HISTORY_LEN = 100
|
||||||
log = logging.getLogger(__file__)
|
log = logging.getLogger(__file__)
|
||||||
|
|||||||
+2
-2
@@ -146,7 +146,6 @@ class Metrics:
|
|||||||
def _set_mtoken(self, mtoken: str) -> None:
|
def _set_mtoken(self, mtoken: str) -> None:
|
||||||
self.mtoken = mtoken
|
self.mtoken = mtoken
|
||||||
|
|
||||||
|
|
||||||
#######################################Private#######################################
|
#######################################Private#######################################
|
||||||
|
|
||||||
async def __send_delete_requests_and_reset(self):
|
async def __send_delete_requests_and_reset(self):
|
||||||
@@ -217,7 +216,7 @@ class Metrics:
|
|||||||
id=self.id,
|
id=self.id,
|
||||||
mtoken=self.mtoken,
|
mtoken=self.mtoken,
|
||||||
version=self.version,
|
version=self.version,
|
||||||
loadtime=(loadtime_snapshot or 0.0),
|
loadtime=(loadtime_snapshot or 0.0),
|
||||||
new_load=self.model_metrics.workload_processing,
|
new_load=self.model_metrics.workload_processing,
|
||||||
cur_load=self.model_metrics.cur_load,
|
cur_load=self.model_metrics.cur_load,
|
||||||
rej_load=self.model_metrics.workload_rejected,
|
rej_load=self.model_metrics.workload_rejected,
|
||||||
@@ -281,6 +280,7 @@ class Metrics:
|
|||||||
|
|
||||||
if sent:
|
if sent:
|
||||||
# clear the one-shot loadtime only if we actually sent *this* value
|
# clear the one-shot loadtime only if we actually sent *this* value
|
||||||
|
self.system_metrics.reset(expected=loadtime_snapshot)
|
||||||
self.update_pending = False
|
self.update_pending = False
|
||||||
self.model_metrics.reset()
|
self.model_metrics.reset()
|
||||||
self.last_metric_update = time.time()
|
self.last_metric_update = time.time()
|
||||||
|
|||||||
+8
-4
@@ -41,6 +41,14 @@ echo_var DEBUG_LOG
|
|||||||
echo_var PYWORKER_LOG
|
echo_var PYWORKER_LOG
|
||||||
echo_var MODEL_LOG
|
echo_var MODEL_LOG
|
||||||
|
|
||||||
|
# if instance is rebooted, we want to clear out the log file so pyworker doesn't read lines
|
||||||
|
# from the run prior to reboot. past logs are saved in $MODEL_LOG.old for debugging only
|
||||||
|
if [ -e "$MODEL_LOG" ]; then
|
||||||
|
echo "Rotating model log at $MODEL_LOG to $MODEL_LOG.old"
|
||||||
|
cat "$MODEL_LOG" >> "$MODEL_LOG.old"
|
||||||
|
: > "$MODEL_LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
# Populate /etc/environment with quoted values
|
# Populate /etc/environment with quoted values
|
||||||
if ! grep -q "VAST" /etc/environment; then
|
if ! grep -q "VAST" /etc/environment; then
|
||||||
env -0 | grep -zEv "^(HOME=|SHLVL=)|CONDA" | while IFS= read -r -d '' line; do
|
env -0 | grep -zEv "^(HOME=|SHLVL=)|CONDA" | while IFS= read -r -d '' line; do
|
||||||
@@ -124,9 +132,5 @@ cd "$SERVER_DIR"
|
|||||||
|
|
||||||
echo "launching PyWorker server"
|
echo "launching PyWorker server"
|
||||||
|
|
||||||
# if instance is rebooted, we want to clear out the log file so pyworker doesn't read lines
|
|
||||||
# from the run prior to reboot. past logs are saved in $MODEL_LOG.old for debugging only
|
|
||||||
[ -e "$MODEL_LOG" ] && cat "$MODEL_LOG" >> "$MODEL_LOG.old" && : > "$MODEL_LOG"
|
|
||||||
|
|
||||||
(python3 -m "workers.$BACKEND.server" |& tee -a "$PYWORKER_LOG") &
|
(python3 -m "workers.$BACKEND.server" |& tee -a "$PYWORKER_LOG") &
|
||||||
echo "launching PyWorker server done"
|
echo "launching PyWorker server done"
|
||||||
|
|||||||
Reference in New Issue
Block a user