# Track train script version along with hyperaparams (ideally automated)

**URL:** <https://community.wandb.ai/t/track-train-script-version-along-with-hyperaparams-ideally-automated/1479>\
**Category:** W&B Help\
**Created:** [December 6, 2021, 11:02pm UTC](https://community.wandb.ai/t/track-train-script-version-along-with-hyperaparams-ideally-automated/1479 "2021-12-06T23:02:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darek](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@darek](https://community.wandb.ai/u/darek)\
**Post date:** [December 6, 2021, 11:02pm UTC](https://community.wandb.ai/t/track-train-script-version-along-with-hyperaparams-ideally-automated/1479/1 "2021-12-06T23:02:22Z")

</div>

I’m just getting started with experiments, my goal is to ablation-study some potentially new methods for finetuning NLP models. I use HuggingFace trainer and the W&B integration works flawlessly, so the hyperparams are super easy to track. I’m going to be doing some experimentation within the training code though - is there an easy way to track the training script version/content along with the experiments, ideally integrated with Github? Thanks! Darek

---

<div class="post-metadata">

**Author:** ![\_scott](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/_scott/32/95_2.png) [@\_scott](https://community.wandb.ai/u/_scott)\
**Post date:** [December 8, 2021, 11:12am UTC](https://community.wandb.ai/t/track-train-script-version-along-with-hyperaparams-ideally-automated/1479/2 "2021-12-08T11:12:17Z")

</div>

Hi Darek,  
They sound like interesting experiments, we’re happy you’ve chosen W&B to track them!

You can track your code by turning on code saving in your settings: [https://docs.wandb.ai/ref/app/features/panels/code](https://docs.wandb.ai/ref/app/features/panels/code)

You can also call `wandb.run.log_code(".")` after calling `wandb.init()` to capture all python source code files in the current directory and all subdirectories as an [artifact](https://docs.wandb.ai/ref/python/artifact).

Soon you should be able to use `wandb` Sweeps as a backend of the `hyperparameter_search` call in HuggingFace if this PR gets merged: [Add W&B backend for hyperparameter sweep by AyushExel · Pull Request #14582 · huggingface/transformers · GitHub](https://github.com/huggingface/transformers/pull/14582)

> **[Code Saving](https://docs.wandb.ai/ref/app/features/panels/code)**

---

<div class="post-metadata">

**Author:** ![darek](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@darek](https://community.wandb.ai/u/darek)\
**Post date:** [December 8, 2021, 3:55pm UTC](https://community.wandb.ai/t/track-train-script-version-along-with-hyperaparams-ideally-automated/1479/3 "2021-12-08T15:55:03Z")

</div>

Thanks Scott, this is exactly what I needed! Also looking forward to the HF sweep PR 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [April 20, 2022, 6:02pm UTC](https://community.wandb.ai/t/track-train-script-version-along-with-hyperaparams-ideally-automated/1479/4 "2022-04-20T18:02:07Z")

</div>

Closed on April 20, 2022, 6:02pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
