MATRIX icon indicating copy to clipboard operation
MATRIX copied to clipboard

Configuration cannot include equals sign

Open GuutBoy opened this issue 7 years ago • 3 comments

MATRIX fails when the arguments given in the configurations section of the MATRIX config file includes an equals sign.

Example:

Using the following config

{
  "protocol":"FRESCO-SPDZ",
  "CloudProviders":
  {
    "local":
    {
      "numOfParties":2,
      "git":
      {
        "gitBranch": ["matrix-framework-test"],
        "gitAddress": ["https://github.com/aicis/fresco.git"]
      }
    }
  },
  "executableName": ["MATRIX/run.sh"],
  "configurations":
  [
    "-e@SEQUENTIAL_BATCHED@-s@[email protected]=DUMMY"
  ],
  "numOfRepetitions":1,
  "numOfInternalRepetitions":1,
  "IsPublished": "true",
  "isExternal": "true",
  "workingDirectory": ["~/MATRIX-EXP/fresco-test"],
  "resultsDirectory": "~/MATRIX-EXP/MATRIX",
  "emails": ["[email protected]"],
  "institute":"The Alexandra Institute"
}

I get the following error when trying to execute the experiment

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/psn/Library/Python/2.7/lib/python/site-packages/fabric/tasks.py", line 242, in inner
    submit(task.run(*args, **kwargs))
  File "/Users/psn/Library/Python/2.7/lib/python/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
TypeError: run_protocol() got an unexpected keyword argument '-e@SEQUENTIAL_BATCHED@-s@[email protected]'

Looks like some issue with the configurations strings not being properly handled.

GuutBoy avatar Jan 18 '19 12:01 GuutBoy

Hi @GuutBoy

The issue at your configuration string is the =. When MATRIX sends request to the execution module, fabric, it's parse the = as an operator to the module and not as a part of a string. I sent an email to the developers of the module for workaround.

liorko87 avatar Jan 21 '19 07:01 liorko87

For now I am dealing with it by using % instead of = and then substituting back in the run.sh script. Not pretty, but it seems to work. Would be great to have this fixed though. In the long run banning = from the configurations does not seem sustainable.

GuutBoy avatar Jan 21 '19 09:01 GuutBoy

After #38 will be available, = will not be a problem anymore.

liorko87 avatar Mar 12 '19 07:03 liorko87