Enxin commited on
Commit
5856f5e
·
verified ·
1 Parent(s): c4fa15f

Upload code/exp/analysis/pool/pool_prompts.py with huggingface_hub

Browse files
code/exp/analysis/pool/pool_prompts.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Prompt intro strings of the pool screening steps.
2
+
3
+ Copied verbatim from exp/pipeline/stage_p1_runner.py (INTRO_BLIND / INTRO_VISUAL) so the pool
4
+ client runs off-cluster without the P1 runner and its dependencies. When stage_p1_runner is
5
+ importable the strings are asserted equal at import time.
6
+ """
7
+ INTRO_VISUAL = ("You are given {n} frame(s) sampled from a video. "
8
+ "Answer the question based on these frames.")
9
+ INTRO_BLIND = ("You are given NO frames from the video. "
10
+ "Answer the question from the text alone.")
11
+
12
+ try: # keep the two copies in lockstep on the cluster
13
+ import stage_p1_runner as _p1 # noqa: E402
14
+ assert _p1.INTRO_VISUAL == INTRO_VISUAL and _p1.INTRO_BLIND == INTRO_BLIND, \
15
+ "pool_prompts.py drifted from stage_p1_runner.py"
16
+ except ImportError:
17
+ pass