-
Notifications
You must be signed in to change notification settings - Fork 11
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
[DMP 2024] Generate Job expressions #620
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Do not ask process related questions about how to apply and who to contact in the above ticket. The only questions allowed are about technical aspects of the project itself. If you want help with the process, you can refer instructions listed on Unstop and any further queries can be taken up on our Discord channel titled DMP queries. Here's a Video Tutorial on how to submit a proposal for a project. |
Hey mentors, please do assign this job to me . |
Hello @christad92, Can I work on this issue? . I have strong experience with javascript and I have worked on Large language models.Please let me know. |
@josephjclark Iam highly interested in this project ,These were some of my contributions done to a gsoc organisation Can you please tell me how should I proceed. I cloned the repo and ran the command pnpm run setup and I see the below error. |
Hi @falgun143, thanks for your interest in this project. To be considered as the contributor, please apply through the unstop platform. the mentors will then shortlist best proposals and select a contributor. I hope this helps? |
@christad92 Is there any channel in the discord under Code4GovTech ? ,I am not able to find .If there is a channel please let me know. |
@falgun143 I can confirm that and get back to you. |
@christad92 Can you help me with this. And also is it necessary to complete all the github classroom assignment or is it good to understand more about the project and submit the proposal .And any updates on the discord channel? |
Greetings, @christad92 , These are the approaches founded by me :
Here is my Resume : https://drive.google.com/file/d/1e4cOxVAfIjehLf7LemzX4oxPFhWd4y4D/view?usp=drive_link |
Hello,
By following this approach, we can create a robust solution that automates the generation of job expressions based on sample inputs and text instructions, thereby enhancing the efficiency of workflow development in OpenFn. Thank You. |
Hello @christad92 , I want to know the convention of writing jobs. Can you please help me. |
@REC-1104 the link has been fixed. Thank you |
Hello @christad92 I have mailed you my proposal ,Please have a look at it let me know any changes so that I can finally submit it on the unstop website. |
Greetings @christad92, |
Hey @josephjclark @christad92, To move forward, I propose creating a service for job generation using the following inputs. Users would provide these inputs via a
The CLI command For job generation on the server, we can create a job_expression_generator service. This service would parse inputs from the
The prompt for this might look like:
For testing, we can run this with sample inputs from the CLI, write tests in the Apollo repo itself, or both. I believe this approach aligns with what you're looking for. Could you please provide feedback on whether I am on the right track or suggest any improvements? Your guidance would be greatly appreciated. PS: Apologies for bringing this up here, but I'm encountering some issues with setting up the Apollo repo. I've used Docker to set up the repo locally for now, but the conventional path throws errors related to Best regards |
Sorry for the late reply - and congrats! I'm delighted you've been chosen. Unfortunately I'm tied up with various things this week and I can't get back to you right away. As you've seen a few things have changed since we put the issue up! We're going to set up a kick off call late next week to go through this. I need to do a bit of planning beforehand. We'll be in touch soon to get that arranged, then we can let you loose! |
Weekly Learnings & UpdatesWeek 1
Week 2
Week 3
Week 4
Week 5
Week 6
Week 7
|
@SatyamMattoo Did you get your local environment set up? I don't think you should be using the docker build locally, that's just going to make life hard for yourself. Just install poetry etc on your machine, per the instructions, and you'll have a much better dev experience. You'll be the first person, so far as I know, to setup and run |
Hey @josephjclark, I attempted to set it up locally following the provided steps, but I encountered an issue where the virtual environment could not locate the Despite following all the steps mentioned, there might be something I am missing. After spending two days trying to resolve these errors, I decided to use Docker bind mounts. It is working fine with Docker. While debugging, I noticed that there might be something missing in the documentation regarding the ENV PATH we add during the Dockerization of the repository. Here is a screenshot of the error I received after running |
@SatyamMattoo What do you mean by "added to the virtual environment"? What operating system are you using? What does Can you run |
Hey @josephjclark, Running |
Hmm. What version of Ubuntu? I updated to 24.04 on Thursday evening and I seem to have a similar error now. All was working on Thursday afternoon... |
I've just force reinstalled poetry and after re-running |
Looking at your error again it's coming out of bash trying to execute Can you run:
? You might get a list out of range exception but that would mean your environment is working (and I'm about to merge a fix to that into main) |
No, I don't think it's related to the Ubuntu version. The upgrade broke me setup and I wondered if you'd also updated. The problem seems to be in the bun environment. When running a bun script, bun is invoking bash and bash can't find poetry. But if you run those same commands directly, they work. So it's something in the bun setup. Or perhaps your shell I suppose. What shell are you using? Anything strange in your setup? To prove it, you can add a bun script to package json which just calls |
Thank you @josephjclark! You were absolutely right; the error was in the bun setup. The Bun documentation does not mention adding of these env variables in the
After adding them the commands run absolutely as expected. Thank you again for your assistance. |
How strange! I'll add a note in the readme about this in case it helps someone out. |
Weekly GoalsWeek 1
Week 2:
Week 3:
Week 4:
Week 5:
Week 6:
Week 7:
|
Overview
When building workflows, users spend most of their time writing simple to advanced jobs on OpenFn. We'd like to harness AI to write job expressions based on english text requirements
This feature is able to generate a job expression given some sample input data, the adaptor specification (name and version), and a text description of the desired output/instruction. It is expected that the generated job expression can be executed in the CLI.
Deliverables
We are looking for a new python module to be implemented on apollo. This can be called from the existing
openfn apollo
command, but has no direct CLI implementation.Inputs
We expect the following JSON payload to be submitted to the endpoint:
All of these inputs should be considered optional - if any are excluded, the generation should continue as best it can.
We may also require metadata to be included with this request - such as which model to use, perhaps parameters to drive the model, and an api key.
Output
The service should return an expression nested in a JSON object
Note that the expression string should be pure code, suitable for inserting into a code editor. No natural language, no markdown annotations of any kind.
Implementation Notes
Highly valuable to use, and likely critical to this work, are the following two issues:
Once a basic job expression generator has been created, it may be wise to implement and integrate these issues.
Sample Inputs
state
for the jobSample Output
Given the inputs above, we'd expect the output code to be:
Background
OpenFn is an open source platform for data integration and workflow automation accessible to users thorough a CLI or a web UI.
To use OpenFn, users build
workflows
which are made up of one or more steps—at the time of writing these are all JavaScript-based "jobs" (the JS code itself is called a "job expression"). Thesejobs
make use of adaptors to perform their tasks, e.g. Make a request to an API endpoint, update a record in a database, aggregate data, send data to an external platform.Here is an example of a job that uses the common adaptor to transform an input data (in state) into a new object transformedPatient
And here is another job expression that uses the dhis2 adaptor to create a new patient record referred to as trackedEntityInstance.
Learn more about adaptors here and how they are used in OpenFn workflows.
Documentation:
The text was updated successfully, but these errors were encountered: