Skip to content

feat: adds fetch_codebase #24

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

Merged

Conversation

jayhack
Copy link
Contributor

@jayhack jayhack commented Jan 23, 2025

Motivation

Content

Testing

Please check the following before marking your PR as ready for review

  • I have added tests for my changes
  • I have updated the documentation or added new documentation as needed
  • I have read and agree to the Contributor License Agreement

@jayhack jayhack requested review from codegen-team and a team as code owners January 23, 2025 00:32
@jayhack jayhack requested review from tawsifkamal and removed request for a team January 23, 2025 00:32
Copy link

linear bot commented Jan 23, 2025

CG-10349 Support `codegen.fetch_codebase('posthog/posthog')`

# Fetches with optimized git command to `/tmp`
# Checks for cached copy (e.g. in tests)
# Run this at the top of our `codegen-examples` directory
codebase = codegen.fetch_repo('posthog/posthog', commit='abcdefg')

This is inspired by huggingface and pytorch

https://pytorch.org/vision/main/generated/torchvision.models.get_model.html

# in pytorch
model = models.get_model("maskrcnn_resnet50_fpn_v2", weights=None)

On HuggingFace

image.png

@jayhack jayhack merged commit dbe01da into develop Jan 23, 2025
7 of 12 checks passed
@jayhack jayhack deleted the jayhack-cg-10349-support-codegenfetch_codebaseposthogposthog branch January 23, 2025 01:03
jayhack added a commit that referenced this pull request Feb 9, 2025
# Motivation
<!-- Why is this change necessary? -->

# Content
<!-- Please include a summary of the change -->
# Testing
<!-- How was the change tested? -->
# Please check the following before marking your PR as ready for review

- [ ] I have added tests for my changes
- [ ] I have updated the documentation or added new documentation as
needed
- [ ] I have read and agree to the [Contributor License
Agreement](../CLA.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants