cryptobiu / MATRIX

MPC Simulation Framework
MIT License
24 stars 13 forks source link

Installing experiment fails if pre process task has been done first #47

Closed GuutBoy closed 5 years ago

GuutBoy commented 5 years ago

As part of the pre process tasks we need to have working_directory on the machines. However, if I create working_directory during pre process tasks, then installing an experiment will fail.

This is because the script installing the experiment checks for presence of working_directory to decide if it should clone the git repo, and now that dir is not a git dir.

This creates an odd work flow were you have to install the experiment before you install dependencies. But you need the dependencies to install the experiment. Catch-22.

liorko87 commented 5 years ago

@GuutBoy I think now I understand what your issues is. The MATRIX assumption is that the protocol (experiment) lives in working directory dir.

If you need to install dependencies from the pre_process.py script, MATRIX assumes that it does need to be install it in the working_directory dir.

In your scenario it's sounds that the installation should be in the working directory dir. Am I understand correctly your problem?

GuutBoy commented 5 years ago

I am not sure I understand your question.

By the MATRIX documentation, the pre processing task are for installing libraries needed to build and run the experiments. The natural progression then seems to be that you would:

  1. Deploy the machines
  2. Run pre processing tasks to install needed dependencies for you experiment
  3. Install the experiment (This needs the dependencies installed in step 2.)
  4. Run the experiment

But if we do that step 2. will fail because it expects working directory to be present, which it is not until we install the experiment in step 3.

So what you currently have to do in the MATRIX CLI is the following:

  1. Deploy the machines
  2. Install experiment - This will create working directory and pull the experiment code from git. But building the experiment will FAIL because of missing dependencies.
  3. Run pre processing tasks to install missing dependencies
  4. Install experiment again - this time the experiment will build
  5. Run the experiment

So there is this extra counter-intuitive step in the process. I am sure it is easy to fix. It is not fixed in my PR because I ran out of time, and I am no longer working on this project.

Generally, there seems to be a lot of these little issues where the MATRIX CLI is not very stable/user friendly/well documented.

I think you should make it a high priority to fix these issues, because it means that it takes a lot longer to integrate new frameworks into MATRIX than should be needed. That's a shame, because MATRIX is a really good idea, but I am afraid most people will not have as much patience with it as I had.

liorko87 commented 5 years ago

The workflow that you presented is the correct workflow. the pre process tasks as no connection to the working directory (the protocol/experiment directory). I working on MATRIX wiki this week and take this into consideration.

Thank you for your notes. I will merge your PR and adjust it to some new features I integrated into MATRIX.