Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add more tagReplace patterns #2816

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented Nov 5, 2024

Adds additional tag pattern replacements for image metadata

This PR extends the tag replacement patterns in image_metadata.json to support more standardized formatting of:

  • Python versions (py35 → Python 3.5)
  • ROCm GPU versions (rocm5 → GPU:ROCm5)
  • Ubuntu versions (ubuntu20.04 → Ubuntu 20.04)
  • Anaconda versions (anaconda3.7 → Anaconda 3.7)
  • Julia versions (ji1.6 → Julia 1.6)
  • TPU versions (tpuv3 → TPU:TPUv3)
  • Alpine Linux versions (alpine3 → Alpine Linux 3)

Checklist:

  • Documentation
  • Test case(s) to demonstrate the difference of before/after

Example transformations:

py37 → Python 3.7
rocm5 → GPU:ROCm5
ubuntu20.04 → Ubuntu 20.04
ji1.6 → Julia 1.6
tpuv3 → TPU:TPUv3
alpine3 → Alpine Linux 3

Copy link

graphite-app bot commented Nov 5, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the size:XS ~10 LoC label Nov 5, 2024
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @agatha197 and the rest of your teammates on Graphite Graphite

@agatha197 agatha197 added the type:refactor Refactoring current implementation. label Nov 5, 2024 — with Graphite App
@@ -891,7 +891,16 @@
"tagReplace": {
"^(tf)([0-9.]*)$": "TensorFlow $2",
"^(pytorch)([0-9.]*)$": "PyTorch $2",
"^py(\\d)(\\d+)$": "Python $1.$2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handling versions without dots using regular expressions isn't ideal since major versions can be two digits. It's better to use explicit tag aliases for such cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we have to update whenever python is updated. py312,py313,py314....

Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍺

Copy link

graphite-app bot commented Nov 8, 2024

Merge activity

Adds additional tag pattern replacements for image metadata

This PR extends the tag replacement patterns in `image_metadata.json` to support more standardized formatting of:

- Python versions (py35 → Python 3.5)
- ROCm GPU versions (rocm5 → GPU:ROCm5)
- Ubuntu versions (ubuntu20.04 → Ubuntu 20.04)
- Anaconda versions (anaconda3.7 → Anaconda 3.7)
- Julia versions (ji1.6 → Julia 1.6)
- TPU versions (tpuv3 → TPU:TPUv3)
- Alpine Linux versions (alpine3 → Alpine Linux 3)

**Checklist:**

- [ ] Documentation
- [ ] Test case(s) to demonstrate the difference of before/after

Example transformations:
```
py37 → Python 3.7
rocm5 → GPU:ROCm5
ubuntu20.04 → Ubuntu 20.04
ji1.6 → Julia 1.6
tpuv3 → TPU:TPUv3
alpine3 → Alpine Linux 3
```
@yomybaby yomybaby force-pushed the refactor/add-more-tagReplace-patterns branch from 89f31aa to 06d5f40 Compare November 8, 2024 07:17
@graphite-app graphite-app bot merged commit 06d5f40 into main Nov 8, 2024
5 checks passed
@graphite-app graphite-app bot deleted the refactor/add-more-tagReplace-patterns branch November 8, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS ~10 LoC type:refactor Refactoring current implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants