Commit db6bfcf
authored
[API] Update user agent for torchtune (#237)
Enable tracking of torchtune models via kagglehub api. This is the
change for kagglehub part. PR for midtier change is
http://go/kaggle-pr/34437
Fix = [b/381021004](https://buganizer.corp.google.com/issues/381021004)
Note: To test this change without midtier changes in production, you
need to have a midtier running locally and add breakpoint to review the
value for `userAgent` in `ProtoHttpRuleController.ApiV1.cs.` With that:
- Creating a python virtual environment
- Import this kagglehub version `pip install
git+https://github.com/Kaggle/kagglehub.git@nan_torch`
- Import torchtune and its required dependencies
- set environment variables
export KAGGLE_USERNAME=[your_user_name]
export KAGGLE_KEY=local_api_token
- in virtual environment, run command `tune download
"google/bert/tensorFlow2/answer-equivalence-bem" --source "kaggle"`
- verify user agent has torchtune and its associated version
<img width="650" alt="Screenshot 2025-03-30 at 12 18 49 PM"
src="https://github.com/user-attachments/assets/3993667f-489c-415a-9446-073bc926089c"
/>1 parent 3247d8a commit db6bfcf
File tree
4 files changed
+27
-6
lines changed- src/kagglehub
- tests
4 files changed
+27
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
0 commit comments