Comments (6)
Yes, this would be better. Contributions would certainly be welcome :)
from cntk.
I suggest to avoid ignorance of return values a bit more.
Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?
from cntk.
Thanks for the suggestion. However, my hunch is that might be too much for our needs. Minimizing dependencies is also a property to strive for.
In my view, the built-in mechanism of C++ exceptions is perfectly fine for us. CNTK does not really have recoverable errors, with one exception of delay-loading of optional components (e.g. if no CUDA driver is present, we fall back to CPU mode), and the other being simple retry loops for network I/O. All other errors should simply log and fail fast due to our command-line tool nature. In such context, the only reason we ever catch exceptions is to add to their error message and rethrow, and log it at one centralized place.
One problem is how to deal with APIs that don’t throw, like fprintf(). If we need to replace those APIs, I would opt for replacing them with throwing ones. E.g. we already have an fprintf() variant that throws (fprintfOrDie()).
PrintBuiltInfo() is sort of a special case though, since its output is not critical. We could replace all fprintf() calls by fprintfOrDie(), but I am not sure whether the added code complexity (readers may not know what fprintfOrDie() means) is worth it in this particular place, because all we can do is catch an error that means “cannot write to stderr/log” and write that to stderr/log, which we won’t be able to do either.
Thanks!
Frank
From: Markus Elfring [mailto:[email protected]]
Sent: Friday, February 12, 2016 0:46
To: Microsoft/CNTK [email protected]
Subject: Re: [CNTK] Completion of error handling (#34)
I suggest to avoid ignorance of return valueshttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fcwe.mitre.org%2fdata%2fdefinitions%2f252.html&data=01%7c01%7cfseide%40microsoft.com%7c102fe54619024a54e40a08d33388dec5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=VFRyM%2fXcoYqlG6l6tEiFc0P8wKlFTnosXWCz1XpgEak%3d a bit more.
Are you interested to apply aspect-oriented software developmenthttps://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2faspectc.org%2f&data=01%7c01%7cfseide%40microsoft.com%7c102fe54619024a54e40a08d33388dec5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=%2fF%2bP86Ew1ksRvVY7%2bscK7e7eFtTef5Vg9FhiynEBnB4%3d?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspecthttps://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fen.wikipedia.org%2fwiki%2fAspect_%2528computer_programming%2529&data=01%7c01%7cfseide%40microsoft.com%7c102fe54619024a54e40a08d33388dec5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=j7RSL0OsvXpcYdm%2b%2f6l1AeNOu97R%2fkYjK8A7shOT%2bCo%3d in your software?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-183230653.
from cntk.
If we need to replace those APIs, I would opt for replacing them with throwing ones.
Would you like to delegate such a software maintenance task to any dedicated development tool?
from cntk.
There is a trade-off between dependencies (=effort of getting all dependencies in place, learning curve, version management, IDE integration, and doing so in both Linux and Windows) vs. added value.
My 2 cents would be that probably that trade-off favors simplicity in our case (where most non-throwing APIs are already encapsulated).
From: Markus Elfring [mailto:[email protected]]
Sent: Friday, February 12, 2016 8:43
To: Microsoft/CNTK [email protected]
Cc: Frank Seide [email protected]
Subject: Re: [CNTK] Completion of error handling (#34)
If we need to replace those APIs, I would opt for replacing them with throwing ones.
Would you like to delegate such a software maintenance task to any dedicated development tool?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-183402062.
from cntk.
there is ongoing work in this area, but we will not do a complete redesign
from cntk.
Related Issues (20)
- Value goes invalid when using TestMinibatch
- Request for a no-opencv dotnet release
- CNTK C# Crash when layer is deeper
- Convolution 1D CNTK C++ HOT 1
- Add support to release linux aarch64 wheels
- Error while deploying MS Teams Bot with SSO
- how to install in python3.8 HOT 1
- A model causes CNTK crash with cudnnSetPoolingNDDescriptor when invoking the pooling operator
- This repo is missing important files HOT 1
- API document issue due to syntax in source code HOT 1
- Error: could not find all specified 'to_nodes' in clone. Looking for ['relu5'], found [None]
- SequenceClassification.py does not work out of box HOT 1
- Microsoft has absolutely no potential
- development of a neural network for object search
- join vcpkg
- cntk crash and pycharm process finished with exit code -1066598274 (0xC06D007E)
- ConvolutionTranspose2D outputs normally when num_filters is tuple and dilation is 0
- program crash when get gradient of `ConvolutionTranspose2D`
- when shape contains negative integer, input_variable should throw an error HOT 1
- MAX_POOLING crash, when pooling_window_shape contains 0 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 cntk.