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

Add ML for synthesis prototype to repository #167

Merged
merged 217 commits into from
Jan 8, 2024

Conversation

iburakov
Copy link
Collaborator

@iburakov iburakov commented Jun 23, 2021

This PR's unfortunate fate is to become a huge solution hub for ML-related problems. Hope to merge it soon, so this is fixed. Contents:

  • ML synthesis (Python codebase + Haskell integration)
  • Dockerfile to build an environment for NITTA development / CI workflows
  • ML synthesis CI workflow (crawl-train-test-release)

Resolves #235, #233, #231, #242

@iburakov iburakov requested a review from ryukzak June 23, 2021 21:44
@ryukzak
Copy link
Owner

ryukzak commented Aug 4, 2021

Very interesting py code style for me, I will steal some ideas. Also, now I understand why data scientists have not converted to programmers. Too much magic.

I commit some changes, which simplify notebook running automatically (not manually running of nitta, unix like paths, some warnings). Please, check it. I think it should continue work on windows, but not checked.

Did I correctly understand that example_model_1 is a model prepared by you manually?

What I think we need to do with this now:

  • Experiment with nix as a repeatable cross-platform building tool  #171
  • Add it to CI as a notebook with a smoke test and merge in master, because it will be dead very quickly without it. But how to organize a project correctly is an open question for me. Right now, I want to experiment with nix for that, but don't sure that is a good idea.
  • Extract data retrieving parts to the library for profiling purposes.
  • Starting the migration to a normal synthesis method is untimely and requires a lot of refactoring and some nitta side work, so we need to find someone to do this.

@iburakov
Copy link
Collaborator Author

@ryukzak Replying to your last message in this PR paragraph by paragraph.

The data science itself is pure magic, it's inevitable :)

I've looked at automations you made. It generally works on Windows too, but I'm not quite a fan of this experience, since something weird can happen. More on this later.

Yes, you've understood it right, example_model_1 is a manually prepared example model.

@iburakov
Copy link
Collaborator Author

When I was working on this prototype, I found that it's easier for debugging and playing to have a terminal near you and see what's exactly listening on a given port. Those automations may be necessary, but for a script (smoke testing script, for example). When it comes to playing with data in an interactive notebook, weird stuff happening in background can disorient. I stumbled upon hanging process, for example. The reasons are unknown :D
image
Note the mismatch between spi1 experiment and nodes count. It's the old process with example.lua is listening. Killing it helps:
image

ConnectionRefusedError happened sometimes too (delay of 0.5s is not enough in my case, perhaps). Reversing the lines (first doing read1() and then sleeping for a delay) helps. Did also some more tweaks in attempts to fix hanging process, but had no luck.

So in a playground it isn't worth it, probably :(

@iburakov
Copy link
Collaborator Author

iburakov commented Aug 31, 2021

Extract data retrieving parts to the library for profiling purposes.

I'll do that in a moment and push it here.

Due to some platform-specific peculiarities (I guess) exiting run_nitta
context manager is killing the whole process group including the
parent process of the Python interpreter itself.

Python tests were killing JetBrains IDE components in Docker
development environment because of this 😅
@iburakov
Copy link
Collaborator Author

Planning to add external synthesis script and only then request a review.

ryukzak and others added 25 commits January 5, 2024 15:54
Co-authored-by: Ilya Burakov <speedwatson@gmail.com>
Co-authored-by: Ilya Burakov <speedwatson@gmail.com>
Co-authored-by: Ilya Burakov <speedwatson@gmail.com>
Co-authored-by: Ilya Burakov <speedwatson@gmail.com>
Co-authored-by: Ilya Burakov <speedwatson@gmail.com>
Ml for synthesis prototype - Refactoring
@ryukzak ryukzak self-requested a review January 8, 2024 09:27
@ryukzak ryukzak merged commit 0c782b7 into master Jan 8, 2024
13 checks passed
@ryukzak ryukzak deleted the ml-for-synthesis-prototype branch January 8, 2024 09:59
@ryukzak ryukzak mentioned this pull request Jan 21, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants