-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: AI-Gen examples ctypeslib.as_ctypes_types #26827
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
DOC: AI-Gen examples ctypeslib.as_ctypes_types #26827
Conversation
Is now the time to ask whether we have a licensing concern about AI-generated code (for example - that it will pick up GPL-3 content)? |
I think that's a great question to bring up now. We wanted to make sure anything AI generated was tagged appropriately, so that it's easy to remove if it becomes a problem at some point. |
It would be good to explain how this PR was put together. E.g.:
|
Logistical comment: please use |
We've been using I'm pretty sure the current failed tests are related to a different issue which was fixed right before the 5th PR was contributed. I haven't wanted to push an empty commit yet, with the right tags, to run the docs only tests till after a discussion at the triage meeting (and enough time has lapsed for all to weigh in on the mailing list). We can also make sure to combine examples from several functions into one PR to help reduce CI costs. We could combine all 5 of the currently submitted PRs into one, if you think that's appropriate. I think grouping 3 functions into one PR is what the recommendation was from the last triage meeting. I gave @otieno-juma the option of submitting the PRs he'd already had ready for over a week, or merging them into one before submitting, and he chose to submit each individually.
The explanation is currently fully visible, yet scattered across many commits and issues at https://github.com/possee-org/genai-numpy/. I'll put together an organized short cohesive narrative early this week. When it's ready, I'll share a link here and post to the ongoing discussion on the mailing list. |
I do understand and appreciate the larger issues about AI-generated code and copyright for the codebase as a whole. However, the code chunks involved in all these related PRs are 3-4 line snippets within the docstrings for a function, intended to demonstrate the use of that function. These should be canonical examples; what any of us who teach coding might put in our lecture notes or type out during a demonstration in front of a class. If they did NOT match other code available out on the net, either character for character or within a few characters, I'd be more concerned. Meanwhile, I hope that @otieno-juma, @bmwoodruff, and the rest of the POSSE (sp?) team are getting the basic content feedback that they need. Are the variable names clear enough? Should there be comments within the example? Should strings such as 'i4' be assigned to a variable with a meaningful name before being used so it is clearer what role that value is playing in the example. Unfortunately, I can't do any of that for this example because I, frankly, have no idea what the code is doing. |
Agree that licensing problems are unlikely here, I think it would be fine to review these like any other examples. |
Here's a write up of the process we used to create the examples: |
It seems okay to review and merge this, given the process of putting together this PR that @bmwoodruff posted above. It's in particular good to see that the generated code was:
|
close/reopen |
I think this needs a rebase on current main to fix the circleci failure, There was an update to the |
I used AI Llama 3 to help create these. @bmwoodruff and I reviewed them. [skip actions] [skip azp] [skip cirrus]
6694c6a
to
0d8832e
Compare
Thanks @otieno-juma . |
Hi all, it looks like this broke the "benchmarks" CI, which runs the doctests:
We recently updated how the doctests are running, please make sure that they run against PRs that touch docstrings. Just running the circleCI doc builder is not sufficient right now. #26989 has a fix. |
Given the AI hallucinated some of the reprs and other doctesting output, I'd also appreciate it if you could make sure that the real output matches what the AI expects. There may very well be cases where our reprs could be improved, but we shouldn't add reprs that don't yet exist to the docs before we change them to something nicer. In this case the repr of the |
The tests we ran were all before the recent update to the tester. I'll take a look at the code we're using, and update things appropriately. The output of most of the AI generated scripts is hallucinated, so i wrote a script to strip all output, and then insert appropriate output afterwards. The tests passed before the recent change. I'll look into it. |
I used AI Llama 3 to help create these.
@bmwoodruff and I reviewed them.
[skip actions] [skip azp] [skip cirrus]