HN Gopher Feed (2017-09-07) - page 1 of 10 ___________________________________________________________________
Facebook and Microsoft introduce ecosystem for interchangeable AI
frameworks
212 points by runesoerensen
https://research.fb.com/facebook-and-microsoft-introduce-new-ope...e-new-open-ecosystem-for-interchangeable-ai-frameworks/___________________________________________________________________
TCM - 6 hours ago
Its interesting that this tool has no PATENTS grant.
jiayq84 - 2 hours ago
Yangqing here from facebook. We consciously made it a MIT license
as onnx is intended to be widely shared by a lot of participants,
and MIT seems to be more widely agreeable among different parties
co-owning it. It's also simpler.
cbuq - 4 hours ago
Interesting, it is also MIT instead of the usual BSD + Patents
Facebook uses. [1]It is also under the 'onnx' namespace,
presumably because it was a team effort.It looks like Microsoft
often uses MIT (vscode, dotnet, CNTK, ChakraCore), does this mean
Microsoft was the driving force (even though it's a Facebook
blog)?* just noticed the link to Microsofts blog at the bottom of
the page [2].[1] https://github.com/onnx/onnx [2]
https://www.microsoft.com/en-us/cognitive-toolkit/blog/2017/...
jamesblonde - 1 hours ago
Michelangelo, announced by Uber 2 days ago
(https://eng.uber.com/michelangelo/), use another format for
storing models/features and for serving data. It would be
interesting to hear why they didn't use protobufs for storing
features instead of their own system. My guess would be that they
have a mix of scikit learn and tensorflow, and they didn't want to
be too tightly coupled to tensorflow. Still, this move by FB and
Microsoft is what happens when you're desperate - your frameworks
are not being adopted, last chance role of the dice.
sanxiyn - 5 hours ago
Now, it would be lovely if coremltools could support ONNX and
convert ONNX model to CoreML.
jiayq84 - 5 hours ago
Yangqing here (created Caffe and Caffe2) - we are much interested
in enabling this path. Historically CoreML has provided Caffe and
Keras interfaces, and having ONNX / CoreML interop would help a
lot for everyone to ship models more easily.Earlier in the year
we provided compatibility between Caffe2 and Qualcomm's SNPE
library, which follows this similar philosophy.
Q6T46nT668w6i3m - 1 hours ago
Hi, Yangqing! Nice project. B)I want to clarify that Apple
advertises Keras support for use with CoreML, but the converter
uses a graph from the TensorFlow backend. It begs the question,
have you spoken with anybody from the TensorFlow (or Keras)
communities about collaborating?
jiayq84 - 16 minutes ago
Thanks! Haven't yet, but our TPMs are going to reach out for
collaborations. I wish we were grad school mode where latency
is <1 hour, but it pays to get things proper across multiple
companies. Kindly stay tuned.
fchollet - 1 hours ago
CoreML supports Keras but not TensorFlow because Keras models
form a well-structured subset of all possible TensorFlow
graphs. It would be quite difficult to support completely
arbitrary TensorFlow graphs, but supporting every Keras layer
is relatively straightforward.To answer your question: I had
no knowledge of this ONIX project before the public
announcement today. Speaking purely for myself, if I wanted
to develop a universal model exchange format, the first step
I would take would be to get in touch with the makers of the
frameworks that sum to 80-90% of the market share -- TF,
Keras, MXNet. But maybe such a strategy was thought to be
superfluous in this case -- for instance, because ONIX may
not actually be intended as a universal model exchange
format.
liuliu - 11 minutes ago
To be fair, CNTK (BrainScript) has quite impressive list of
features to support dynamic control structure (in a
symbolic fashion, comparing to PyTorch which delegated much
of the dynamic control structure to underlying language
Python). I think Tensorflow and CNTK probably the only two
frameworks pursued such implementation strategy. IMHO,
looking back, supporting control structures may not be that
useful (see the recent attention based models, all of them
can be unroll'ed to ordinary graphs), but it is so
interesting to implement!
MikkoFinell - 4 hours ago
Just imagine the world we will live in, when Facebook or Microsoft
wins the race to general AI.
aianus - 9 minutes ago
I imagine it will be like the Manhattan Project, impossible to
contain to one company or country for long.
jeremynixon - 6 hours ago
Automatic productionizability of PyTorch models through Caffe 2
will speed the transition from research to production dramatically
- this gives the environment a chance to compete with Tensorflow /
Tensorflow Serving.Frameworks (say, DL4J) have been using Keras as
a loose way to share models between frameworks. It'll be
fascinating to see if Theano / Tensorflow / DL4J / MXNet walk this
path as well.
Q6T46nT668w6i3m - 1 hours ago
I was curious about their implementation since PyTorch and Caffe2
semantics are very different. Unfortuantly, the authors write:>
Currently, our tracer works with many common neural networks, but
not some of the more advanced programs in PyTorch such as those
with dynamic flow control. Over time, we will enhance ONNX and
the tracer to support these programs, so that developers can
leverage full flexibility of PyTorch with the high-performance
robust deployment capabilities of Caffe2.It is useful, of course.
But it's rare for contemporary models to not use dynamic flow. In
fact, PyTorch is popular because it encourages this dynamism.
lolive - 4 hours ago
I have heard about something similar in the open source
community:https://deepdetect.comDoesn't it sound like a better
long-term option than corporate-driven political initiative?
[deleted]
protomok - 1 hours ago
I'm curious if FB/Microsoft considered Khronos Neural Network
Exchange Format (NNEF) - https://www.khronos.org/nnef?
pgroves - 4 hours ago
Predictive Model Markup Language (PMML) was released in 1997 to
solve a very similar problem (but for lots of predictive models). I
don't know that it ever really caught on. That was also promoted by
the tool builders but not by the users.While checking the wikipedia
page, I'm surprised to see that it is still being developed (with a
2016 release): https://en.wikipedia.org/wiki/Predictive_Model_Marku
p_Langua...Please note that in 1997 it was NOT ridiculous to use
XML for this.
nametube - 2 hours ago
You might also be interested in openscoring
https://github.com/openscoring/openscoring . It lets you run PMML
models and score examples through a rest API.
pishpash - 3 hours ago
So "AI" is equivalent to "neural networks" nowadays, eh?
dgaaaaaaaaaa - 2 hours ago
pretty much
Q6T46nT668w6i3m - 1 hours ago
I realize you are joking, but in some fields, like computer
vision, yes.
jeremynixon - 2 hours ago
That's not implied by the title. Neural Networks is a member of
Machine Learning, which is a member of AI. PyTorch, Caffe 2 and
CNTK are Deep Learning Frameworks. All Deep Learning Frameworks
are AI frameworks, but not all AI frameworks are neural network /
deep learning frameworks.
cs702 - 5 hours ago
Translation from corporatespeak: "Our AI frameworks are losing
developer mindshare to TensorFlow, which is controlled by Google,
so we are joining forces."Corporations like Facebook and Microsoft
do not like interoperability... until and unless it's in their best
interest.The goal here is to make AI frameworks easily
interchangeable: build your model with whatever framework you like;
it will run unchanged on all other
frameworks/platforms/stacks.Regardless of the motivations, I
actually think this is GREAT NEWS, and I hope that Amazon and maybe
Apple, and eventually hopefully Google too will introduce and
promote compatibility with this standard.We all benefit from more
interoperability.
dsacco - 26 minutes ago
The way in which Google released TensorFlow (and the meteoric
success it's enjoyed) is an excellent example of a company
successfully commoditizing its complements using open source
software.TensorFlow (and stacks built over it) has the greatest
mindshare, which allows Google to both optimize the capabilities
of its ML offerings based on TensorFlow, knowing most developers
will be familiar with it, and to increase profit margins on those
services at the same time. TensorFlow makes a significant part of
the ML stack convenient and accessible, and releasing it for free
opened the flood gates for Google to expand the machine learning
industry significantly while shifting the profit generation away
from software and onto the cloud (data storage + compute
resources).Sublime execution, really. Once machine learning
passes through this hype cycle (over the "trough of
disillusionment" and onto the "plateau of productivity"), Google
will likely have made the majority of the machine learning
industry accessible enough for most software engineers to pick up
something like TensorFlow and hit the ground running, which will
gradually exert a downward pressure on ML specialized salaries
for all but the top end. But this will continue even as the
industry continues to expand, which means Google will come out
ahead earning even more profit even if salaries plateau or
decrease.
slackoverflower - 3 hours ago
You got it right. Tensorflow is HUGE in the AI community,
Facebook and Microsoft are scared. I, for one, am a huge fan of
Tensorflow and don't plan on learning anything new to do the work
I'm already doing. Facebook and Microsoft should just join
Google's coalition and use Tensorflow company-wide.
curiousDog - 19 minutes ago
Right, until you don't like something that Google does with
Tensorflow in the future or breaks compatibility with your app.
I think alternatives in complex abstractions like these are
always a good thing. Only a few companies can afford to do it
so we have a guarantee that you won't have tens of them. Just a
viable alternative.
Toast_ - 3 hours ago
It's been a while since I played around with tensorflow, how
difficult is it to deploy a model as a web service? I'm
currently using azure and looking for other options (besides
prediction.io).
reilly3000 - 2 hours ago
It's really designed around ease of use. What you're looking
for is called TensorFlow Serving.
Toast_ - 2 hours ago
Cool, thanks for the info.
blueyes - 1 hours ago
Actually, Tensorflow is huge in the data science community, but
PyTorch is taking over ML research. TF is last year's cool
thing. That's one reason why fast.ai just adopted Pytorch for
their courses. Tensorflow is surprisingly low-level and needs
libraries like Keras to be used easily. The field of Python ML
tools moves fast...
xenihn - 32 minutes ago
I'd love to know what sort of ML/AI
communities/forums/slacks/discords/whatever communities you
participate in, since I'm interesting in joining some.
jononor - 5 hours ago
The corporations that got data are also very interested in open
development of machine learning algorithms. They know that the
data is key for getting value out of the algorithms
anyway...EDIT: I second that regardless of motivation, this is a
step forward.
bluetwo - 5 hours ago
The implication is that this will make your ML better somehow.
Not sure why that would be.
nametube - 5 hours ago
from the article> We developed ONNX together with Microsoft to
bridge this gap and to empower AI developers to choose the
framework that fits the current stage of their project and
easily switch between frameworks as the project evolves.ML
workflows tend to be very heterogenous with people using
everything from sklearn to DL4J to play with data. standardized
serialization formats make it possible to bring results from
those experiments back into a hardened productionized
environment for serving the model.
bluetwo - 4 hours ago
Thanks.
naturalgradient - 4 hours ago
Any TensorFlow devs who might be able to comment on plans to
interoperate with TensorFlow/reasons why it's not on the cards?
Q6T46nT668w6i3m - 1 hours ago
I am a regular TensorFlow (and Keras) contributor and I saw the
announcement when you did. In either situation, Google
contributors partcipating without speaking to the TensorFlow
community or the Facebook and Microsoft authors not reaching out
to the TensorFlow community, it's a bad look. However, it's
entirely possible we'll hear more next week at the TensorFlow
symposium.
liuliu - 4 hours ago
Doesn't seem to have support for control structure (If, While
etc.).
Markoff - 4 hours ago
can we send messages through it?
[deleted]
[deleted]
sandGorgon - 4 hours ago
Why a new format ? Why couldn't protobuf, hdf5 or the Apache
Feather/Arrow format (which counts Hadley and McKinney as
contributors).I understand there could be something unique in this
format, but really keen to understand what.
ezyang - 4 hours ago
PyTorch/ONNX dev here. ONNX is a proto2 format
https://github.com/onnx/onnx/blob/master/onnx/onnx.proto -- we
definitely wanted to make it easy for people to parse and load
ONNX exported graphs :)
jiayq84 - 2 hours ago
Yangqing here (caffe2 and ONNX). We did use protobuf and we have
an extensive discussion about its versions even, from our
experience with the Caffe and Caffe2 deployment modes. Here is a
snippet from the codebase:// Note [Protobuf compatibility] //
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Based on experience working with
downstream vendors, we generally can't // assume recent versions
of protobufs. This means that we do not use any // protobuf
features that are only available in proto3. // // Here are the
most notable contortions we have to carry out to work around //
these limitations: // // - No 'map' (added protobuf 3.0). We
instead represent mappings as lists // of key-value pairs,
where order does not matter and duplicates // are not
allowed.
sandGorgon - 2 hours ago
pretty cool and thanks for that reply! Did you look at
something like Arrow/Feather, which is looking to get adopted
as the interoperable format in R/Pandas ... and maybe even
Spark. There's been quite a bit of momentum behind it to
optimize it for huge usecases - https://thenewstack.io/apache-
arrow-designed-accelerate-hado...It is based on Google
Flatbuffers, but is undergoing enough engineering specifically
from a big data/machine learning perspective. Instead of
building directly over Protobuf, it might be interesting to
build it on top of Arrow (in exactly the same way that Feather
is based on top of Arrow https://github.com/wesm/feather).
Q6T46nT668w6i3m - 1 hours ago
I want to second considering Arrow. In addition to Pandas and
Spark, it is (or was) considered for scikit-learn model
interchange.
mkl - 1 hours ago
A tip: If your comment includes code, indent it at least two
spaces (before copying from your editor) and it will be
formatted correctly.
squarecog - 3 hours ago
hdf5, Feather, Arrow, protobufs, json, xml -- all solve the
problem of binary representation of data on disk. They all leave
the question of how to map said data to a specific problem domain
up to the developer.Projects like ONNX define said mapping for a
specific domain (in ONNX's case, by agreeing on a proto schema
for ML models, and its interpretation).To use a simplistic
metaphor: protobufs are the .docx format; onnx is a resume
template you can fill out in Word.
megamindbrian - 4 hours ago
Why would you want to pile another black box on top of the black
box?
starshadowx2 - 2 hours ago
It's black boxes all the way down.
electrograv - 4 hours ago
> To directly export this code, ONNX would have to support
conditionals [...]Does ONNX aim to serve as a human-readable and
human-maintainable network description for experimentation and
research, or does ONNX aim to serve only as a model export
interchange format (primarily to be machine-interpreted)?This could
serve very well in the latter case, but would be quite problematic
in the former -- where conditionals, for loops, etc. are essential
to a compact and readable representation of many network
architectures.Reading a static neural network architecture
descriptor of a very deep neural network is akin to reading
assembly code from a compiler that does loop unrolling. Static
network descriptions work great when pushing a model to production,
but are much less suitable for the research and development stages
(IMO).
jsgo - 3 hours ago
my guess is it is the latter.If I have my own framework and I
want to operate with this standard, I need to have the ability to
map to and from ONNX's format. I don't think it is intended for
people to write directly in ONNX's format to maintain
compatibility. If it were, I'd imagine it would fall flat very
quickly as people wouldn't want to rewrite everything in the
hopes that their framework of choice will adopt it. Seems the
intent is more like .odt to me than, say, Markdown.
nicodjimenez - 4 hours ago
Great move by Facebook to look beyond Caffe's legacy prototext file
format which has become somewhat standard in computer vision, and
unite Pytorch and Caffe2. Unfortunately there are limitations to
the neural network logic that can be represented in configuration
files, especially when dealing with dynamic networks. Most
networks used in vision are static so that's where I expect this
will add the most value. My only wish is that Caffe2 followed
Pytorch's interface. After spending 5 minutes with Pytorch it's
pretty clear that they got the interface design right.
nametube - 5 hours ago
While this is awesome I'm personally wondering when big companies
like FB and MS are going to standardize on a format for predictive
models in general. [0] PMML exists but there are very few companies
that are standing behind it.[0]
http://dmg.org/pmml/v4-3/GeneralStructure.html