Closed
Description
Visual Studio Code is getting a huge momentum. It would be extremely nice if BrainScript had its own VS Code extension. BrainScript is amazing, however, it's still lacking support in the IDE that are actually used by the broader Microsoft dev community. An VS Code extension would significantly boost adoption of BrainScript, the software effort being modest.
Activity
cha-zhang commentedon Jun 4, 2017
We need to understand better how many people are still on BrainScript, and why. In general CNTK is moving towards Python, and we are not adding more support to BrainScript. Our primary assumption is BrainScript is yet another script language and people don't want to learn it. This, of course, can be changed if there is huge demand to keep BrainScript up-to-date.
Could those who are using BrainScript explain why you are not switching to Python? Simplicity? Performance? Legacy code? Or something else?
cha-zhang commentedon Jun 4, 2017
AFAIK, CNTK's Python binding today has less than 1% performance hit in the worst case, and in many cases much faster due to better sparse data handling. It's very simple to use as well.
Can you expand on the clean execution argument?
cha-zhang commentedon Jun 4, 2017
Thanks!
If anyone else has strong reasons to use BrainScript, please explain your use case by commenting here or sending me email directly. We will aggregate the feedback and plan the future of CNTK accordingly.
JohnCraigPublic commentedon Jun 5, 2017
Never used Python, and while I hear its 'easy' -- I have found Branscript to be very easy -- so it was a simpler path for me to take, as opposed to setting up and learning python. 3.4? 3.5? what is Anaconda? etc etc. I also live in a "product world" of C, C++, and some C#. No python in anything we do.
cha-zhang commentedon Jun 6, 2017
The machine learning community has chosen Python, and that's why all toolkits has Python bindings. In the case of CNTK, we started with C++, and Python is just a very thin wrapper on it. That's why CNTK's python binding can run as efficient as BrainScript.
We will continue optimizing the underneath C++ code, and Python will subsequently benefit from that.
skynode commentedon Jun 6, 2017
@cha-zhang Correct, the machine learning community has chosen Python but most other toolkits like CNTK have also used C++ at their cores.
Now the extent to which each toolkit has supported the community-beloved Python bindings (I actually love Python) is where the toolkits differ especially in performance. CNTK has a thin Python wrapper and so retains many of the superior performance affordable to using C++, while Tensorflow, for instance, has extended Python support beyond its core C++ codebase and subsequently underperforms CNTK.
Maintaining that superior performance at a higher level of abstraction is something that BrainScript, due to it's cut-to-the-chase, high (CNTK?) performance design philosophy, is more likely than Python to achieve.
cha-zhang commentedon Jun 6, 2017
There is a cost of maintaining and updating BrainScript. Currently, for the same layer, Python and BrainScript go through two paths inside C++, one via V2 library, and one via V1 library. We need to merge them to simplify, and it's not straightforward. An alternative solution (and simpler way) is to factor the V1 library code out and separate them from V2 library. However, it's unlikely we will update V1 code as frequently.
Your input is important to us, and we will discuss and see if there can be a compromise.
DHOFM commentedon Jun 6, 2017
From the point of a developer who used C# since .net 1.0 BrainScript was very clear to me and one of the reasons i used CNTK for a new prototype where building, instead of TensorFlow or others. Now i did all evaluation and further in Python. Python is ok, i still miss the brackets {} but it´s ok. For training, BrainScript looks more structured, you have a better overview than in Python, so i would recommend to keep it alive. For Syntax Highlighting and so on i renamed a copy of the BrainScript Files to .c so VS Code can show it better. For the Future a full support of BrainScript in VS or VS Code with debugging would be nice or a full support of c# but anyway if the decision is Python only i can live with it...
ebarsoumMS commentedon Jun 6, 2017
First if all, thanks everyone for the feedbacks.
@avader906 regarding
The above is not always possible, the goal of v2 was to provide the flexibility needed to write any custom computation graph in addition to high level abstraction, that wasn't possible in v1 graph. We utilized as much as possible from v1, however, when v1 was designed the need of DNN community was different than now. Also, if you look at CNTK Python Layer API, it matches very closely BrainScript version. The performance should always matches, if not that it is a bug.
For adding BrainScript on the top of V2 graph, that is a possibility that depend on the demand.
Regarding:
You can load and evaluate your model in C++ or python API, so that isn't going away and BS isn't going to be deprecated.
@DHOFM For "From the point of a developer who used C# since .net 1.0 BrainScript was very clear to me", can you explain why? I would have through that Python is more closer and at least you have the debuggability of Python. If we expose training through .Net, will you prefer that versus BrainScript?
vermorel commentedon Jun 6, 2017
@ebarsoumMS @cha-zhang @JimSEOW Thank you very much for your follow-up. There has been significant discussion on #960. As the original poster here, I would like to share my perspective, as maybe the logical conclusion might be to not push further for BrainScript.
The case is more extensively discussed at http://blog.vermorel.com/journal/2017/6/6/details-on-the-net-first-strategy-for-cntk.html
In short, I submitted this issue while I was under the impression that BrainScript was a core strategy for CNTK. Apparently, it isn't; and this looks fine to me, as long as a .NET-friendly alternative is provided to offer the same degree of correctness by design.
If the CNTK team clearly states that the goal is to make .NET a first-class citizen, then this present issue should probably be dismissed entirely. No need to divert resources from the .NET initiative.
13 remaining items