@@ -261,7 +261,7 @@ def add(self, i):
261261
262262 target_name = i .get ('target_name' , self .action_type )
263263 target_path = os .path .join (repo_path , target_name )
264- if target_name == "cache" :
264+ if target_name in [ "cache" , "experiment" ] :
265265 folder_name = f"""{ i ["script_alias" ]} _{ item_name or item_id [:8 ]} """ if i .get ("script_alias" ) else item_name or item_id
266266 else :
267267 folder_name = item_name or item_id
@@ -424,7 +424,7 @@ def update(self, i):
424424 dict: Return code and message.
425425 """
426426 # Step 1: Search for items based on input tags
427- target_name = i .get ('target_name' ,"cache" )
427+ target_name = i .get ('target_name' , i . get ( 'target' , "cache" ) )
428428 i ['target_name' ] = target_name
429429 ii = i .copy ()
430430
@@ -712,7 +712,7 @@ def search(self, i):
712712 if target == "script" :
713713 non_variation_tags = [t for t in tags_split if not t .startswith ("_" )]
714714 tags_to_match = non_variation_tags
715- elif target == "cache" :
715+ elif target in [ "cache" , "experiment" ] :
716716 tags_to_match = tags_split
717717 else :
718718 return {'return' : 1 , 'error' : f"""Target { target } not handled in mlc yet""" }
0 commit comments