mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-08-13 11:40:35 +00:00
fix(infra): Q16_SCALE int not float, add missing Path/sys imports
- Q16_SCALE: float → int in lib/q16.py (int // float returns float, breaking Q16_16 integer contract in gccl_waveprobe, vcn_famm_transport) - qr_spatial_hash.py: sys → _sys (only _sys was imported) - Add missing 'from pathlib import Path' to 7 files that use Path() without importing it: test_fpga, compare_tier1_vs_tier2, generate_avm_gold_trace, burgers_triad_core, hot_path_cold_path, sabotage_prevention, generate_diat_tables - hot_path_cold_path.py: also add missing 'import sys' Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
This commit is contained in:
parent
f9dcec7369
commit
a496d8d3ce
9 changed files with 15 additions and 5 deletions
|
|
@ -11,6 +11,7 @@ import serial
|
|||
import struct
|
||||
import time
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "4-Infrastructure"))
|
||||
from lib.q16 import Q16_ONE, Q16_SCALE, to_q16
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from __future__ import annotations
|
|||
|
||||
Q16_ONE: int = 0x00010000 # 65536
|
||||
Q16_HALF: int = 0x00008000
|
||||
Q16_SCALE: float = 65536.0
|
||||
Q16_SCALE: int = 65536
|
||||
|
||||
|
||||
def to_q16(value: float) -> int:
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import os
|
|||
import sys
|
||||
from collections import Counter, defaultdict
|
||||
from math import sqrt
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "4-Infrastructure"))
|
||||
from lib.jsonl import load_jsonl
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from pathlib import Path
|
|||
import sys as _sys
|
||||
_sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "4-Infrastructure"))
|
||||
_sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "4-Infrastructure"))
|
||||
from lib.q16 import Q16_SCALE, to_q16
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "4-Infrastructure"))
|
||||
from lib.q16 import to_q16
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import numpy as np
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[3] / "4-Infrastructure"))
|
||||
from lib.q16 import Q16_ONE, q16_mul
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ from dataclasses import dataclass
|
|||
from enum import Enum
|
||||
from collections import deque
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
try:
|
||||
from sluq_triage import SLUQTriageSystem, StochasticTrajectory, TriageDecision
|
||||
_HAS_SLUQ_TRIAGE = True
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ from enum import Enum
|
|||
from collections import defaultdict, deque
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "4-Infrastructure"))
|
||||
from lib.q16 import Q16_ONE, Q16_SCALE, from_q16, q16_add, q16_ge, q16_gt, q16_sub, to_q16
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import math
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[3] / "4-Infrastructure"))
|
||||
from lib.q16 import to_q16
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue