ci: --fetch-depth
Backtracking on not doing this earlier - cml ci --fetch-depth=<int> is a good idea
depth=0could be an alias for--unshallow- could thus deprecate (hide)
--unshallow - things like
depth=2is useful for e.g.dvc metrics diff HEAD~1CC @shcheklein @dberenbaum @pmrowla cml ci --fetch-depth=2is more trustworthy than manually runninggit fetch --depth=2because the latter may not work as expected (?) if the repo was checked out weirdly (visactions/checkout@v3breaking changes)cml ci --fetch-depth=2is cross-CI compatible unlikeactions/checkout.with.fetch-depth: 2
btw just to confirm @dberenbaum does git fetch --depth=2 also obtain DVC exp's hidden reflog?
Hm, good question. I think not since those refs will likely not be part of the linear history of the branch being fetched (plus it seems a bit DVC-specific). cc @pmrowla
btw just to confirm @dberenbaum does
git fetch --depth=2also obtain DVC exp's hidden reflog?
No, this just sets the depth of whatever refs have already been cloned/fetched to 2. So by default it will only include git branches and tags (and if actions/checkout uses --single-branch it would only include the PR branch)
ok so I assume only git fetch --unshallow will work? Is there no other way? What if the repo is massive and a full unshallow is undesirable?
The experiment refs aren't needed, so usually fetch depth of 2 or so on the cloned branch will be enough. They are needed to merge the head and the experiment changed afaik.
ok so I assume only
git fetch --unshallowwill work? Is there no other way? What if the repo is massive and a full unshallow is undesirable?
This won't fetch exp refs either, git commands only fetch branches/tags by default. You have to either be specifying the full exp refs with git fetch <options> refs/exps/... or using the dvc exp pull commands
To be clear, fetching exp refs is unnecessary for many exp operations, like exp run. Having fetch depth is still useful for exp run.
Hello! I've been curious about CML for some time, and Hacktoberfest seems like a good opportunity to dive in. Can I take a stab at this issue?
Based on a quick look, I think this would involve modifying similar code as in https://github.com/iterative/cml/pull/957/files. @casperdcl Just to confirm, based on your description, should the fix deprecate --unshallow at the same time?
thanks @deepyaman! Yes feel free to have a go. --unshallow can be soft-deprecated using .hidden :)
Sorry for the delay. This is still very much on my list of things to do; got busy, but I hope to have a PR by later this week.
no problem, looking forward to a PR @deepyaman :)
Are there contribution guidelines? I came across https://cml.dev/doc/contributing/core, but I'd already done npm install and tried npm test, but it gives a lot of issues around tokens not being found, etc. I also assume the docs should require pip install tensorboard (I see it in the CI config, and am getting some related errors), but haven't gotten a chance to set that up yet.
~Alternatively, I think I can result any errors if the CI is allowed to run.~ I see it ran.
Ah don't worry about testing locally - a lot of functionality needs actual CI to test effectively.
Don't worry if PR tests also fail, we can fix them :)