Comments (5)
This is supposed to be intended: the rows and columns represent pairs of indices. So in your first example you pull two values, one at (row 0, col 0) and one at (row 1, col 1):
val matrix = client.matrix[Double](10, 10)
val result = matrix.pull(Array(0L, 1L), Array(0, 1))
In your second example, you would pull (row 0, col 0) and (row 1, col undefined), which causes the error. The IndexOutOfBounds exception is probably the least descriptive for this, and we should probably change that.
In case of a one-column matrix, you'd have to pull something like: matrix.pull(Array(0, 0, 0, 0), Array(1, 2, 3, 4))
to pull the first 4 elements.
I should really create a GranularBigVector though, it shouldn't be too hard to implement, most of the behavior is analogous to (or even simplified) GranularBigMatrix behavior:
- Split the input array into smaller arrays of a maximum size
- Request those from an underlying BigVector (in sequence)
- Merge the requests via the asynchronous callbacks and return the result
from glint.
Ah - doh! Yes ok that makes sense. Would be quite cool to have kind of "slicing" syntax for pulling say a set of rows and cols, that would be expanded to the relevant indices. Similar to Breeze's slicing I guess, or numpy.
Like matrix.pull(rows, ::)
to pull all cols for a set of rows. Or matrix.pull(rows, 0 to 1)
to pull all rows but only column 0.
from glint.
I can take a look at a GranularBigVector
, as it could be useful for large linear models.
from glint.
The slice syntax would be very cool indeed, could probably even make specialized messages for that to reduce network communication. Right now we have to send all requested indices across the network, which is quite expensive! Some parameter server implementations even do key-caching so you'd only need to send a hash of the indices, a lot of options for improvement here definitely.
If you can somehow find the time to look at the GranularBigVector, that'd be great! These are the things I've been meaning to get at, but unfortunately have been too busy for recently.
from glint.
Opened #58
from glint.
Related Issues (20)
- Actor Not Found
- Can glint support SSP mode HOT 3
- PullFailedException in large dataset HOT 8
- Implementation bug in ColumnIterator? HOT 15
- A question about glint HOT 4
- Rework of Glint internals HOT 7
- Struggling with data transfer / actor disassociated HOT 5
- Look into Akka Artery
- Random init HOT 1
- why make "push" as an “accumulator” rather than “replacer”? HOT 6
- BigMatrix should support push(rows)
- Can glint support BigInt type? HOT 1
- Does glint support (key, value) store ? HOT 1
- BigMatrix push and pull is high network consumption HOT 1
- Can not create Glint Client in Apache Spark HOT 4
- Akka Actor Error when initializing Glint Client HOT 2
- cluster conf example
- Got runtime issues when using spark-shell HOT 2
- Need Save Operation to store the big vector/matrix into HDFS 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 glint.