Giter Club home page Giter Club logo

Comments (3)

sergey-serebryakov avatar sergey-serebryakov commented on August 13, 2024

Thanks @hasan7n for reporting this. Will look at it on Friday.

from mlcube.

sergey-serebryakov avatar sergey-serebryakov commented on August 13, 2024

@hasan7n Ok, so it should be fixed in #348.

Brief description of the cause of the behavior. We've gone through multiple rounds of refactoring of the MLCube command line interface, and at some point in time option descriptions moved to their module (cli) while deprecated option declarations remained in the __main__.py file. The secondary cause of this bug was that we updated APIs of most of MLCube CLI commands, but did not do that for the run command that continued to use the old interface. After updating its API to match APIs of other commands (such as configure), this bug went away.
The main cause however was the following. The run command did not expose any arguments for the MLCube parameters (e.g., -Pdocker.cpu_args="--shm-size 1g"). Turns out that the click library makes various attempts to parse options/arguments and match them with the long/short aliases of the arguments. The following was hapenning:

  • The -Pdocker.cpu_args="--shm-size 1g" string is correctly split into name (-Pdocker.cpu_args) and value (--shm-size 1g).
  • The click library was trying to match the name against known aliases (long names) of options, and was obviously failing.
  • Then, it was trying to do fuzzy matching what also was resulting in empty matches.
  • At this point in time (I have not spent too much time identifying the exact logic) the click library considers the entire string -Pdocker.cpu_args="--shm-size 1g as multiple short options, that seems to be consistent with other tools, e.g, one can run ls -al which is the same as ls -l -a. So, the click library removes the first character (-) and then iterates one character at a time considering options such as -P, -d, -o etc. and eventually -h. All options happen to be unknown except the latter, which is the cause for click to display help message.

As you correctly mention, when there's no h, this bug does not manifest itself.

from mlcube.

dfeddema avatar dfeddema commented on August 13, 2024

Associated PR #348 fixed this problem.

from mlcube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.