add 06-distributed-computing_jobs_by_key.rst (#259)#346
add 06-distributed-computing_jobs_by_key.rst (#259)#346ixcat wants to merge 4 commits intodatajoint:stagefrom ixcat:issue-259
Conversation
|
... am guessing we might want to rework the api similarly to datajoint/datajoint-python#862 - also, this likely implies a new function that saves the truncation step as seen in the docs - thoughts on how to address in matlab? Thinking to just add a new |
guzman-raphael
left a comment
There was a problem hiding this comment.
@ixcat Yes, adding +dj/key_hash.m would be the best means to have equivalent functionality to datajoint/datajoint-python#862. Also, please repoint this to stage so that the tests run properly.
|
|
||
| j = fetch(Lab.Jobs() & r, '*'); | ||
|
|
||
There was a problem hiding this comment.
Looks like whitespace was added by mistake...
| @@ -0,0 +1,37 @@ | |||
|
|
|||
| This can be done by using `dj.internal.hash` to convert the key as follows: | |||
There was a problem hiding this comment.
| This can be done by using `dj.internal.hash` to convert the key as follows: | |
| This can be done by using `dj.key_hash` to convert the key as follows: |
|
|
||
| 1 tuples (0.127 s) | ||
|
|
||
| > del(Lab.Jobs() & job_key; |
There was a problem hiding this comment.
| > del(Lab.Jobs() & job_key; | |
| > del(Lab.Jobs() & job_key); |
| @@ -0,0 +1,7 @@ | |||
| % dj.key_hash - key hashing function for populate jobs, etc | |||
There was a problem hiding this comment.
Since we are adding to the code base, would you add a minimal test for taking the hash to maintain the coverage?
Also, would you remove this and add it properly in the function so that it works with help(...)? See here for an example.
| hash = dj.internal.hash(key); | ||
| jobKey = struct('table_name', self.className, 'key_hash', hash(1:32)); | ||
| jobKey = struct('table_name', self.className, ... | ||
| 'key_hash', key_hash(key)); |
There was a problem hiding this comment.
Actually, to access it properly you should indicate the package as well:
| 'key_hash', key_hash(key)); | |
| 'key_hash', dj.key_hash(key)); |
|
@ixcat Oh, missed this before. We should also update |
fix: #259 , #348