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

Evaluation task: Transpile #201

Closed
27 of 31 tasks
ruiAzevedo19 opened this issue Jun 18, 2024 · 2 comments
Closed
27 of 31 tasks

Evaluation task: Transpile #201

ruiAzevedo19 opened this issue Jun 18, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ruiAzevedo19
Copy link
Collaborator

ruiAzevedo19 commented Jun 18, 2024

Goal

Given a source code, the model needs to transpile it from Java to Go, and from Go to Java. The response is validated by executing predefined tests making sure that the implementation is correct.

TODOs

  • Testdata
    • Create a new repository transpile for both Golang and Java
    • Testcases
      • Considerations:
        • define multiple packages inside transpile with the different testing scenarios
        • each package must contain an implementation and the corresponding test file
        • pick some examples from the light repository with different levels of complexity
      • cascadingIfElse
        • Golang
        • Java
      • sort
        • Golang
        • Java
      • binarySearch
        • Golang
        • Java
      • balancedBrackets
        • Golang
        • Java
      • pascalsTriangle
        • Golang
        • Java
  • Implementation
    • create a new task identifier transpile
    • mark the new task as unsupported for symflower model
    • mark the new task as supported for llm model
    • create a task-transpile.go to implement the task behavior
    • create a prompt for the new task
    • create a transpileSourceCodeFile in model/llm/llm.go that writes the generated code to a file
    • use percentage of passing tests for assessments instead of coverage objects
      • since coverage very much depends on the provided implementation, it is not a good metric for assessments

Follow-ups

@ruiAzevedo19 ruiAzevedo19 added the enhancement New feature or request label Jun 18, 2024
@ruiAzevedo19 ruiAzevedo19 added this to the v0.6.0 milestone Jun 18, 2024
@ruiAzevedo19 ruiAzevedo19 self-assigned this Jun 18, 2024
@bauersimon
Copy link
Member

So in this case a test case contains the implementation in Language A and a test file in language B, right?

We need to ensure that the transpiled implementation in language B actually works with the tests. So we need to show the model the signature in language B that it needs to conform to. So I would also have for each example an implementation file B that already contains the implementation signature and show that in the prompt.

@bauersimon
Copy link
Member

I think the refactoring of the prompting is a bit too ambitious. Really the only thing that changes for each task is the prompt template and the context (and we even embed parts of the context like the source file to deduplicate code).

Would be nice to have a helper function that just takes both these things and applies the context to the template. But I think maybe we can get away with having an any argument for the context... cause it is just a context, there is no common method for that. And the templating will anyways fail if it cannot find the context values it needs, so that happens already - not really necessary to add another check for that. Not sure if we need to introduce an interface at all.

ruiAzevedo19 added a commit that referenced this issue Jun 27, 2024
ruiAzevedo19 added a commit that referenced this issue Jun 27, 2024
ruiAzevedo19 added a commit that referenced this issue Jun 27, 2024
ruiAzevedo19 added a commit that referenced this issue Jun 27, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 4, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 4, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
… test file into a helper, so it can be reused in other tasks

Part of #201
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
… test file into a helper, so it can be reused in other tasks

Part of #201
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
Part of #201
ruiAzevedo19 added a commit that referenced this issue Jul 8, 2024
ahumenberger pushed a commit that referenced this issue Jul 17, 2024
ahumenberger pushed a commit that referenced this issue Jul 18, 2024
ahumenberger pushed a commit that referenced this issue Jul 18, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 18, 2024
ahumenberger pushed a commit that referenced this issue Jul 19, 2024
ahumenberger pushed a commit that referenced this issue Jul 19, 2024
ahumenberger pushed a commit that referenced this issue Jul 19, 2024
ahumenberger pushed a commit that referenced this issue Jul 22, 2024
ahumenberger pushed a commit that referenced this issue Jul 22, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 22, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 22, 2024
ruiAzevedo19 added a commit that referenced this issue Jul 22, 2024
ahumenberger pushed a commit that referenced this issue Jul 23, 2024
ahumenberger pushed a commit that referenced this issue Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants