Commit
·
df6fc31
1
Parent(s):
b74b163
Update app with PandaReach-v3
Browse files
app.py
CHANGED
@@ -190,16 +190,7 @@ def certification(hf_username):
|
|
190 |
},
|
191 |
{
|
192 |
"unit": "Unit 6",
|
193 |
-
"env": "
|
194 |
-
"library": "stable-baselines3",
|
195 |
-
"min_result": 650,
|
196 |
-
"best_result": 0,
|
197 |
-
"best_model_id": "",
|
198 |
-
"passed_": False
|
199 |
-
},
|
200 |
-
{
|
201 |
-
"unit": "Unit 6",
|
202 |
-
"env": "PandaReachDense-v2",
|
203 |
"library": "stable-baselines3",
|
204 |
"min_result": -3.5,
|
205 |
"best_result": 0,
|
@@ -234,14 +225,20 @@ def certification(hf_username):
|
|
234 |
"passed_": False
|
235 |
},
|
236 |
]
|
|
|
237 |
for unit in results_certification:
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
if unit["unit"] != "Unit 8 PII":
|
239 |
# Get user model
|
240 |
user_models = get_user_models(hf_username, unit['env'], unit['library'])
|
241 |
# For sample factory vizdoom we don't have env tag for now
|
242 |
else:
|
243 |
user_models = get_user_sf_models(hf_username, unit['env'], unit['library'])
|
244 |
-
|
245 |
|
246 |
# Calculate the best result and get the best_model_id
|
247 |
best_result, best_model_id = calculate_best_result(user_models)
|
|
|
190 |
},
|
191 |
{
|
192 |
"unit": "Unit 6",
|
193 |
+
"env": "PandaReachDense",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
"library": "stable-baselines3",
|
195 |
"min_result": -3.5,
|
196 |
"best_result": 0,
|
|
|
225 |
"passed_": False
|
226 |
},
|
227 |
]
|
228 |
+
|
229 |
for unit in results_certification:
|
230 |
+
if unit["unit"] == "Unit 6":
|
231 |
+
# Since Unit 6 can use PandaReachDense-v2 or v3
|
232 |
+
user_models = get_user_models(hf_username, "PandaReachDense-v3", unit["library"])
|
233 |
+
if len(user_models) == 0:
|
234 |
+
print("Empty")
|
235 |
+
user_models = get_user_models(hf_username, "PandaReachDense-v2", unit["library"])
|
236 |
if unit["unit"] != "Unit 8 PII":
|
237 |
# Get user model
|
238 |
user_models = get_user_models(hf_username, unit['env'], unit['library'])
|
239 |
# For sample factory vizdoom we don't have env tag for now
|
240 |
else:
|
241 |
user_models = get_user_sf_models(hf_username, unit['env'], unit['library'])
|
|
|
242 |
|
243 |
# Calculate the best result and get the best_model_id
|
244 |
best_result, best_model_id = calculate_best_result(user_models)
|