Spaces:
Sleeping
Sleeping
Commit
·
f685ddc
1
Parent(s):
7f6386f
watchdog giveup code
Browse files- app.py +1 -0
- outputs/professor_guide.csv +5 -1
- uw_programmatic/base_machine.py +2 -0
- uw_programmatic/uw_machine.py +13 -0
app.py
CHANGED
@@ -122,6 +122,7 @@ with gr.Blocks() as demo:
|
|
122 |
fn=run_with_context(questions_downloaded),
|
123 |
outputs=[start_button]
|
124 |
)
|
|
|
125 |
load_dotenv()
|
126 |
demo.launch(share=True, ssr_mode=False,
|
127 |
auth=(os.environ.get('HF_USERNAME',''),os.environ.get('HF_PASSWORD','')))
|
|
|
122 |
fn=run_with_context(questions_downloaded),
|
123 |
outputs=[start_button]
|
124 |
)
|
125 |
+
|
126 |
load_dotenv()
|
127 |
demo.launch(share=True, ssr_mode=False,
|
128 |
auth=(os.environ.get('HF_USERNAME',''),os.environ.get('HF_PASSWORD','')))
|
outputs/professor_guide.csv
CHANGED
@@ -1 +1,5 @@
|
|
1 |
-
MC,,1,
|
|
|
|
|
|
|
|
|
|
1 |
+
MC,,1,List the three questions to ask during the validation phase of experiments.,2,1. What evidence is required? 2. How much information is outdated? 3. How much time until resources are scarce? ,1. What type of hypothesis are you testing? 2. How much evidence do you already have? 3. How much time until the next decision point or money runs out?,1. What hypothesis needs validation? 2. How much proof is missing? 3. How much time until the deadline arrives? ,1. What kind of results are expected? 2. How much support do you lack? 3. How much time until funds are exhausted? ,1. What is the goal of your experiment? 2. How much data is irrelevant? 3. How long until resources are depleted? ,96-97, Knowledge
|
2 |
+
MC,,1,State the recommended approach when starting experiments with high uncertainty.,5,Go expensive and quick with comprehensive tests to ensure accuracy. ,Go cheap and slow with thorough analysis to validate assumptions. ,Go fast and costly with large projects to confirm ideas. ,Go expensive and slow with detailed studies to find direction. ,Go cheap and fast with quick experiments to pinpoint the right direction.,91-93, Knowledge
|
3 |
+
MC,,1,List the three questions to ask when selecting an experiment.,2,1. What type of project are you managing? 2. How many stakeholders are involved? 3. How much risk can you tolerate? ,1. What type of hypothesis are you testing? 2. How much evidence do you already have? 3. How much time do you have until the next major decision point?,1. What type of analysis are you performing? 2. How many resources are available? 3. How much support do you require? ,1. What type of results are you expecting? 2. How many variables are involved? 3. How much feedback have you received? ,1. What type of data are you collecting? 2. How many tests have you conducted? 3. How much funding do you have left? ,94-95, Knowledge
|
4 |
+
MC,,1,State the initial step for B2C services companies in their experimentation sequence.,2,B2C services companies start by developing software and tracking usage. ,B2C services companies start by interviewing customers and looking for search volume to determine interest.,B2C services companies start by creating prototypes and gathering feedback. ,B2C services companies start by building products and testing features. ,B2C services companies start by launching ads and analyzing trends. ,98-99, Knowledge
|
5 |
+
MC,,1,Identify the initial step for B2C software companies in their sequence.,2,B2C software companies start by conducting interviews to understand needs. ,B2C software companies start by using customer words in their content to increase conversions.,B2C software companies start by developing prototypes to gather feedback. ,B2C software companies start by launching ads to test market interest. ,B2C software companies start by creating explainer videos to attract users. ,98-99, Knowledge
|
uw_programmatic/base_machine.py
CHANGED
@@ -87,6 +87,8 @@ class UWBaseMachine(StateMachine):
|
|
87 |
self.page_range: tuple = ()
|
88 |
self.question_number: int = 0
|
89 |
self.taxonomy: list = []
|
|
|
|
|
90 |
|
91 |
self.state_status: dict[str, bool] = {}
|
92 |
|
|
|
87 |
self.page_range: tuple = ()
|
88 |
self.question_number: int = 0
|
89 |
self.taxonomy: list = []
|
90 |
+
self.give_up_count = 0
|
91 |
+
self.current_question_count = 0
|
92 |
|
93 |
self.state_status: dict[str, bool] = {}
|
94 |
|
uw_programmatic/uw_machine.py
CHANGED
@@ -35,12 +35,23 @@ class UWMachine(UWBaseMachine):
|
|
35 |
self.page_range = parameters["page_range"]
|
36 |
self.question_number = parameters["question_number"]
|
37 |
self.taxonomy = parameters["taxonomy"]
|
|
|
|
|
38 |
self.send("next_state")
|
39 |
case _:
|
40 |
err_msg = f"Unexpected Transition Event ID: {event_value}."
|
41 |
raise ValueError(err_msg)
|
42 |
|
43 |
def on_enter_evaluate_q_count(self) -> None:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
if len(self.question_list) >= self.question_number:
|
45 |
self.send("finish_state") # go to output questions
|
46 |
else:
|
@@ -144,6 +155,8 @@ class UWMachine(UWBaseMachine):
|
|
144 |
new_row.append(self.question_list["Page"])
|
145 |
new_row.append(self.question_list["Taxonomy"])
|
146 |
writer.writerow(new_row)
|
|
|
|
|
147 |
self.send("next_state")
|
148 |
|
149 |
def on_event_output_q(self, event_: dict) -> None:
|
|
|
35 |
self.page_range = parameters["page_range"]
|
36 |
self.question_number = parameters["question_number"]
|
37 |
self.taxonomy = parameters["taxonomy"]
|
38 |
+
self.current_question_count = 0
|
39 |
+
self.give_up_count = 0
|
40 |
self.send("next_state")
|
41 |
case _:
|
42 |
err_msg = f"Unexpected Transition Event ID: {event_value}."
|
43 |
raise ValueError(err_msg)
|
44 |
|
45 |
def on_enter_evaluate_q_count(self) -> None:
|
46 |
+
# Check if the number of questions has incremented
|
47 |
+
if len(self.question_list) <= self.current_question_count:
|
48 |
+
self.give_up_count += 1
|
49 |
+
else:
|
50 |
+
self.current_question_count = len(self.question_list)
|
51 |
+
self.give_up_count = 0
|
52 |
+
if self.give_up_count == 3:
|
53 |
+
self.send("finish_state")
|
54 |
+
return
|
55 |
if len(self.question_list) >= self.question_number:
|
56 |
self.send("finish_state") # go to output questions
|
57 |
else:
|
|
|
155 |
new_row.append(self.question_list["Page"])
|
156 |
new_row.append(self.question_list["Taxonomy"])
|
157 |
writer.writerow(new_row)
|
158 |
+
if self.give_up_count == 3:
|
159 |
+
writer.writerow("Failed to generate more questions.")
|
160 |
self.send("next_state")
|
161 |
|
162 |
def on_event_output_q(self, event_: dict) -> None:
|