-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add 06-distributed-computing_jobs_by_key.rst (#259) #346
base: stage
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
@@ -12,7 +12,7 @@ function makeTuples(self,key) | |||
r = sprintf('connection_id = %d', c.serverId); | |||
|
|||
j = fetch(Lab.Jobs() & r, '*'); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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