need easy way to move a run in repo to another
See original GitHub issue🚀 Feature
If there’s two repo with different directory, it will be helpful if there’s easy way to move one’s repo to another.
Motivation
This request is concerned with question below: https://app.slack.com/client/T015QFY3ZNZ/C01DK8FM2P3/thread/C01DK8FM2P3-1642569350.057200
Currently, if you want to change experiment’s repo, you need to: 1. move experiment data to another repo.
# $hash is hashed valued of the experiment
mv /aim/.aim/seqs/progress/$hash /another_aim_repo/.aim/seqs/progress/
mv /aim/.aim/seqs/locks/$hash another_aim_repo/.aim/seqs/locks/
mv /aim/.aim/seqs/chunks/$hash another_aim_repo/.aim/seqs/chunks/
mv /aim/.aim/meta/chunks/$hash another_aim_repo/.aim/meta/chunks/
mv /aim/.aim/meta/locks/$hash another_aim_repo/.aim/meta/locks/
2. add index through the code below
from aim import Run, Repo
repo = Repo.from_path("another_aim_repo")
run = Run(run_hash=$hash, repo=repo, system_tracking_interval=None)
# however, there also problem if you don't add experiment in above line, all migrated experiment will set their name to 'default'
# run = Run(run_hash=$hash, repo=repo, system_tracking_interval=None,experiment='migrated_experiemnt')
Pitch
A = repo.from_path("a") # have runs named "run_a,run_b,run_c"
B = repo.from_path("b") # have runs named "run_d,run_e,run_f"
A.migrate(B, experiment="run_d")
# now repo A have runs "run_a,run_b,run_c,run_d"
A.migrate(B)
# now repo A have runs "run_a,run_b,run_c,run_d,run_e,run_f"
Alternatives
Additional context
This issue were driven by thoughts to merge all experiments from multiple repos to one It would be much easy if all experiment were executed in one repo. I tried to host aim through k8s, in a way guided here: https://aimstack.readthedocs.io/en/latest/guides/integrations/basic_k8s_deployment.html However, nfs I used did not support writing on sqlite, so this configuration didn’t work for me. It would not be needed if I could change database but I found that all system were hard-coded to use sqlite. Maybe support to use various database system can be another solution
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13 (7 by maintainers)
Top GitHub Comments
Hey @ptaejoon. The feature you’ve requested is shipped with aim v.3.5.0. There are now options to copy/move runs from one repo to another with either CLI or SDK.
Using CLI:
aim runs --repo=<source_repo_path> cp --destination=<destination_repo_path> run_hash_1, run_hash_2 ...
aim runs --repo=<source_repo_path> mv --destination=<destination_repo_path> run_hash_1, run_hash_2 ...
Source repo path defaults to current working directory. Destination repo path and at least one run hash are required.Using SDK:
This is giving me an error. If I run from the
.aim
parent diraim runs cp bfb90fe96d284a07b5334e3e --destination ../aim
then it gives me:If I use
*
, then it just goes through all of the hashes: