Comments (17)
Hi @chrishkchris , I have tested on windows at my side. Could you please check again your configuration? I hope this guide could help: https://github.com/apache/singa-doc/blob/0efbdbee811901fbcd7ce1f2d057669cb246e4c9/docs-site/docs/contribute-code.md
You might need to install LLVM in windows, and add below lines to VS Code configuration:
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"cpplint.cpplintPath": "path/to/cpplint",
"editor.formatOnSave": true,
"python.formatting.provider": "yapf",
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
from singa.
I have installed LLVM, and the following VS code configuration:
{
"git.ignoreMissingGitWarning": true,
"python.pythonPath": "C:\ProgramData\Anaconda3",
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"cpplint.cpplintPath": "c:\ProgramData\Anaconda3\Scripts\cpplint.exe",
"editor.formatOnSave": true,
"python.formatting.provider": "yapf",
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.pylintEnabled": true,
"python.linting.pylamaEnabled": false,
"C_Cpp.dimInactiveRegions": false
}
Seems to be strange. I think my setting corresponding to clang-formatter is the same as you?
from singa.
is it due to the different of cpplint we uses?
I was using pip install cpplint
from singa.
hi @chrishkchris have you installed this extension https://marketplace.visualstudio.com/items?itemName=xaver.clang-format
from singa.
is it due to the different of cpplint we uses?
I was using pip install cpplint
clang-format is independent from cpplint
from singa.
from singa.
version is the same?
from singa.
version is the same?
extension is auto updated i think
from singa.
may be for workaround could you try to set 'clang-format.language.cpp.style' this option to google.
from singa.
may be for workaround could you try to set 'clang-format.language.cpp.style' this option to google.
ok, I will try this one
from singa.
may be for workaround could you try to set 'clang-format.language.cpp.style' this option to google.
ok, I will try this one
Yes, this is the solution
need to add in the json
"clang-format.language.cpp.style": "google"
Could you update this to the instruction so everyone can use the same? thanks a lot
from singa.
@shicong I will submit a PR in singa-doc to make this clear in the introduction
from singa.
@shicong I have updated the instruction in apache/singa-doc#4. I will close this issue when everything is okay. Thanks a lot for your advice!
from singa.
In apache/singa-doc#4, I also added also the google style for python yapf :
"python.formatting.yapfArgs" : ["--style" , "{based_on_style: google}" ]
This will be good if VSCode cannot catch the .style.yapf and .clang-format in the project root directory, where I encountered this problem in the remote edit environment (WinSCP)
from singa.
Hi @chrishkchris FYI
#603
from singa.
@chrishkchris is this issue fixed?
from singa.
@nudles I think to solve is to use the same version of formatters as well as the same config for all the contributors, where I addressed in the new doc repo for the instruction of how to do the formatting apache/singa-doc#4
Although my method may not resolve 100% of the problem (some people may use not exactly the same version, e.g. LVMM 9.0 vs 10.0), but should resolve most of the problem.
@XJDKC I remembered that Rulin has even proposed a better method than me (the same docker container with the formatter pre-installed, with the same git hooks)
from singa.
Related Issues (20)
- Switch between CPU and GPU devices for cnn example HOT 4
- Save the downloaded datasets to local directory HOT 2
- Add running scripts for cnn and cifar_distributed_cnn examples HOT 4
- Intermediate information printing HOT 3
- Adding arguments for weight decay and momentum HOT 2
- Increase max epoch for cnn example for better convergence HOT 2
- Update CMakeLists.txt for release 4.0.0 HOT 1
- Check Apache license header for release 4.0.0
- OpenCL Compilation Fails
- Upload Release 4.0.0 Package to SVN HOT 1
- Update the NOTICE file for images HOT 1
- gitignore and gitmodules should be removed from the release tar file HOT 2
- Create a new branch dev-postgresql HOT 2
- update CMakeLists.txt HOT 2
- Update the version and compilation commands HOT 3
- update the runtime Dockerfile HOT 2
- update conda and docker files HOT 3
- AttributeError: module 'singa.singa_wrap' has no attribute 'Communicator' HOT 2
- Update bloodmnist example by refining inline comments HOT 2
- Update documentation for distributed training HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from singa.