Spaces:
Runtime error
Runtime error
fix hydra problem
Browse files- app.py +8 -15
- cliport/cfg/config.yaml +1 -1
- gensim/sim_runner.py +5 -1
app.py
CHANGED
@@ -70,21 +70,12 @@ class DemoRunner:
|
|
70 |
cfg['target_task_name'] = instruction
|
71 |
|
72 |
# self._env.cache_video = []
|
73 |
-
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
return f'Error: {e}', None, None
|
80 |
-
|
81 |
-
# video_file_name = None
|
82 |
-
# if self._env.cache_video:
|
83 |
-
# rendered_clip = ImageSequenceClip(self._env.cache_video, fps=25)
|
84 |
-
# video_file_name = NamedTemporaryFile(suffix='.mp4').name
|
85 |
-
# rendered_clip.write_videofile(video_file_name, fps=25)
|
86 |
-
info = '### Run'
|
87 |
-
return info, self.simulation_runner.video_path
|
88 |
|
89 |
|
90 |
def setup(api_key):
|
@@ -99,7 +90,9 @@ def setup(api_key):
|
|
99 |
|
100 |
def run(instruction, demo_runner):
|
101 |
if demo_runner is None:
|
102 |
-
return 'Please run setup first!', None
|
|
|
|
|
103 |
return demo_runner.run(instruction)
|
104 |
|
105 |
|
|
|
70 |
cfg['target_task_name'] = instruction
|
71 |
|
72 |
# self._env.cache_video = []
|
73 |
+
self.simulation_runner._md_logger = ''
|
74 |
|
75 |
+
self.simulation_runner.task_creation()
|
76 |
+
self.simulation_runner.simulate_task()
|
77 |
+
print("self.video_path = ", self.simulation_runner.video_path)
|
78 |
+
return self.simulation_runner._md_logger, self.simulation_runner.video_path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
|
81 |
def setup(api_key):
|
|
|
90 |
|
91 |
def run(instruction, demo_runner):
|
92 |
if demo_runner is None:
|
93 |
+
return 'Please run setup first!', None
|
94 |
+
|
95 |
+
# return None, "/home/baochen/Desktop/projects/GenSim2/data/assemble-pallet-ball-train/videos/000001.mp4"
|
96 |
return demo_runner.run(instruction)
|
97 |
|
98 |
|
cliport/cfg/config.yaml
CHANGED
@@ -5,7 +5,7 @@ tag: default
|
|
5 |
debug: False
|
6 |
gpt_temperature: 0.8 # GPT-4 response temperature. higher means more diversity
|
7 |
prompt_folder: vanilla_task_generation_prompt # the prompt folder that stores the prompt chain
|
8 |
-
max_env_run_cnt:
|
9 |
trials: 10 # how many times of spawning each environment generated
|
10 |
output_folder: 'output/output_stats'
|
11 |
model_output_dir: '' # to be filled in with date
|
|
|
5 |
debug: False
|
6 |
gpt_temperature: 0.8 # GPT-4 response temperature. higher means more diversity
|
7 |
prompt_folder: vanilla_task_generation_prompt # the prompt folder that stores the prompt chain
|
8 |
+
max_env_run_cnt: 1 # maximum number of runs for each environment
|
9 |
trials: 10 # how many times of spawning each environment generated
|
10 |
output_folder: 'output/output_stats'
|
11 |
model_output_dir: '' # to be filled in with date
|
gensim/sim_runner.py
CHANGED
@@ -50,7 +50,8 @@ class SimulationRunner:
|
|
50 |
self.generated_tasks = []
|
51 |
self.passed_tasks = [] # accepted ones
|
52 |
|
53 |
-
self.video_path =
|
|
|
54 |
|
55 |
def print_current_stats(self):
|
56 |
""" print the current statistics of the simulation design """
|
@@ -196,6 +197,7 @@ class SimulationRunner:
|
|
196 |
save_text(self.cfg['model_output_dir'], self.generated_task_name + '_error', str(traceback.format_exc()))
|
197 |
print("========================================================")
|
198 |
print("Syntax Exception:", to_print)
|
|
|
199 |
return
|
200 |
|
201 |
try:
|
@@ -218,4 +220,6 @@ class SimulationRunner:
|
|
218 |
save_text(self.cfg['model_output_dir'], self.generated_task_name + '_error', str(traceback.format_exc()))
|
219 |
print("========================================================")
|
220 |
print("Runtime Exception:", to_print)
|
|
|
|
|
221 |
self.memory.save_run(self.generated_task)
|
|
|
50 |
self.generated_tasks = []
|
51 |
self.passed_tasks = [] # accepted ones
|
52 |
|
53 |
+
self.video_path = None
|
54 |
+
self._md_logger = ''
|
55 |
|
56 |
def print_current_stats(self):
|
57 |
""" print the current statistics of the simulation design """
|
|
|
197 |
save_text(self.cfg['model_output_dir'], self.generated_task_name + '_error', str(traceback.format_exc()))
|
198 |
print("========================================================")
|
199 |
print("Syntax Exception:", to_print)
|
200 |
+
self._md_logger = str(traceback.format_exc())
|
201 |
return
|
202 |
|
203 |
try:
|
|
|
220 |
save_text(self.cfg['model_output_dir'], self.generated_task_name + '_error', str(traceback.format_exc()))
|
221 |
print("========================================================")
|
222 |
print("Runtime Exception:", to_print)
|
223 |
+
self._md_logger = str(traceback.format_exc())
|
224 |
+
|
225 |
self.memory.save_run(self.generated_task)
|