Removing exps with the same name

Hello!

I have experiments with the same name, but from different branches. It’s happend by an excident and I’d like to remove several of them. I faced with this issue during push:

dvc.repo.experiments.exceptions.AmbiguousExpRefInfo: Ambiguous name 'rf_sgm_v6.01' refers to multiple experiments. Use one of the following full refnames in
stead:                                                                                                                                                      
                                                                                                                                                            
        refs/exps/b0/089f7e65b5586d9c296d0d354e524450f34d21/rf_sgm_v6.01                                                                                    
        refs/exps/f6/0bc58f3f1ee9bbe7842f164d360270fc677032/rf_sgm_v6.01                                                                                    
        refs/exps/84/1f5b33a660735f00ae10400250c8b68e4244ca/rf_sgm_v6.01

I’ve tried to use dvc exp remove by passing hash, that I obtaied by the following command:

$ dvc exp list -A
$ dvc exp list -A 
b0089f7:                                                              
        9a176ac [rf_sgm_v6.01]
refactor/simplify-ribs-predictor:
        75ecc1f [rf_sgm_v6.02]
        7e5d548 [rf_sgm_v6.03]
        2477b1a [rf_sgm_v6.01]
841f5b3:
        f3a4ea4 [rf_sgm_v6.01]
6fbd9b1:
        e6b3ae4 [ribs_frac_segm_v6.00]

$ dvc exp list -A --sha-only
7e5d54807e445944d3fb275ff49aed7576653014                              
2477b1ae8950574ac963b8c02db7af7ee42a57e5
75ecc1fd5a1f4fb6ec35c139aea222975098b964
e6b3ae4cce8f1c14c0d88825d41879bf353999f3
9a176ac0cd0cbef259c65b4e254ab966a7332b10
f3a4ea49059b8de0435c572c247e79b071638a2c

$ dvc exp rm 9a176ac0cd0cbef259c65b4e254ab966a7332b10
ERROR: '9a176ac0cd0cbef259c65b4e254ab966a7332b10' is not a valid experiment name

So, my question is - how to remove other experiments?

You should be able to remove them like dvc exp remove refs/exps/b0/089f7e65b5586d9c296d0d354e524450f34d21/rf_sgm_v6.01.

Yes, it’s helped. Thank you.

But how can I remove experiment “ribs_frac_segm_v6.00” from the log:

$ dvc exp list -A 
refactor/simplify-ribs-predictor:                                     
        2477b1a [rf_sgm_v6.01]
        75ecc1f [rf_sgm_v6.02]
        7e5d548 [rf_sgm_v6.03]
6fbd9b1:
        e6b3ae4 [ribs_frac_segm_v6.00]

How can I request this experiment name in the same path-like manner?

What do you get when you run dvc exp remove ribs_frac_segm_v6.00?

Yes, it works. My bad, it was easy because “ribs_frac_segm_v6.00” is the only one. I just imagined the same situation that was with “rf_sgm_v6.01” - exp with the same name in different branches and what to do then.

Hello,
Yes, it work I also try this.

Hey,

this worked locally, but what if the experiments where tracked with dvc studio? Even after I pushed my local experiments with the duplicate names removed they still show up in dvc studio.

never mind, there is a -g option for dvc exp remove for specifying a remote repository