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

Comparing translation techniques #45

Closed
dorchard opened this issue Nov 4, 2024 · 5 comments
Closed

Comparing translation techniques #45

dorchard opened this issue Nov 4, 2024 · 5 comments
Assignees

Comments

@dorchard
Copy link
Member

dorchard commented Nov 4, 2024

We want to evaluate possible translation techniques

  1. Gen+AI (+ adding in Peter Isaac's code into the prompt)
  2. smop

We are going to use cpdFmax2pCp3.m as a test case; @j-emberton is making some tests so it is ready for that.

@dorchard dorchard changed the title Translation techniques Comparing translation techniques Nov 4, 2024
@dorchard
Copy link
Member Author

dorchard commented Nov 7, 2024

@isaacaka to pick up writing the tests

@isaacaka isaacaka linked a pull request Nov 12, 2024 that will close this issue
@isaacaka isaacaka removed a link to a pull request Nov 12, 2024
@tztsai
Copy link

tztsai commented Nov 14, 2024

The smop translator is being implemented in PR #17. This PR also parametrizes the matlab_engine fixture (and renames it to ustar_cp) so that it can generate either the matlab engine instance, or the module containing the translated python code.

@dorchard
Copy link
Member Author

Thanks. We now have a candidate set of tests for cpdFmax2pCp3.m here: (#51).

TODO:

  • @tztsai to run these tests on the SMOP-translated cpdFmax2pCp3.py and let us know the results.
  • @j-emberton make a branch with gen-AI translated cpdFmax2pCp and similarly to the above, run the tests and let us know the results.

In both cases the structure/scaffolding of the tests will need tweaking slightly to get it to address the Python version of the code rather than the matlab; I think do what works for now so that we can get the info we need to do the comparison of the two.

@tztsai
Copy link

tztsai commented Nov 14, 2024

I have translated the code to python and currently it can pass 16 out of 28 tests.

@dorchard
Copy link
Member Author

In the translation phase, we've used a mixture of techniques. Sometimes the smop generated code works (sometimes it does not), other times some digging is needed with the help of an LLM. Sometimes we've been able to use Peter's code. So the mixed mode seems to be a good approach.

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

No branches or pull requests

4 participants