

megan_mcp
Forum Replies Created
-
Your error message seems to be correct.
Can you send me your full .f1.checkSensor function in normal text (without the code tag)?
Thanks,
Megan
-
Hi @roryk
If the content of the file contains spaces, 0: only loads a subset of the data.
It could also just be the read vs mmap performance.
Hope this helps.
Thanks,
Megan
-
Hi @Treese_H85
Apologies for the delay in response.
Can you make sure you are not running this cell after defining .z.pg, as this reverts it on the server process.
Let me know if this works !
Thanks,
Megan
-
Just so that I understand correctly, you missing the following button in your lessons?
Thanks,
Megan
-
Hi @nihS
When the question states “Define a function on our local process” – this is the process you saved to hdbH.
Try defining the function on this process instead.
Thanks,
Megan
-
megan_mcp
AdministratorMay 20, 2024 at 4:38 pm in reply to: Get the cosine similarity scores along with the retrieved docsHi @Sosycs
As an example I’ve used snippets from our Document Search sample (screenshot below):
Simply change the metric to: “metric” : “CS”.
To see the distance print the results of the similarity search (the distance will be in a column in the result called “__nn_distance”:
print(table.search(query_vector, n=3))
Also take a look at our documentation on cosine similarity for extra help – KDB.AI Similarity Metrics – Documentation (kx.com)
Hope this helps!
Thanks,
Megan
-
Hi @k
Your code seems to be correct. The issue could be that you have accessed the project from the wrong directory.
Make sure when you are launching KX Developer, it is from the course-advanced-capstone directory.
If you are still experiencing this issue, please let me know.
Thanks,
Megan
-
Hi @lonji3_1
Can you download your project.md file and send it to me at mmcparland@kx.com so I can have a closer look?
Thanks,
Megan
-
The .viz.getModSensor function uses data from the sensor table.
You can either edit this function so that the runtime is quicker or apply an attribute to the table on disk (or both).
If you need any further assistance, please let me know.
Thanks,
Megan
-
Hi @lonji3_1
There is no table called “raceTab”, it was the name given to the input parameter for raceDay.
When you ran Profile on .viz.createDashboard[] what function did you find took the longest to run?
Thanks,
Megan
-
Hi @ckeogh1
I see you have received your certificate so congratulations on completing the course!
I’m assuming this issue was resolved?
Thanks,
Megan
-
megan_mcp
AdministratorMay 8, 2024 at 9:12 am in reply to: Kernel disconnected and running into a file save errorHi @GC
You may want to save your answers as this will erase any code you have entered into the notebook.
But if you want to restart your server, go to File -> Hub Control Panel
Then click “Stop my Server” and “Start my Server”.
If this does not resolve the problem, please let me know.
Thanks,
Megan
-
I can follow up on this further if you would like to know why read0 doesn’t use memchr (&/ mmap)?
-
Hi @roryk
I reached out to one of our developers on this and this was their response:
“Actually looks like read0 is using a load of memcmp calls & scanning for \n
where 0: is using memchr to find it in a single call:q)\ts:1 (1#"*";"-")0:`:testf 221 36800 seconds usecs/call calls function -------- ----------- --------- -------------------- 0.095358 95 1003 memchr 0.060194 106 564 memmove 240799 0.000319 memchr("qwertyuiopasdfghjklzxcvbnm\nqwert"..., '\n', 13311) = 0x7fa1eaf3d0d7 240799 0.005258 memchr("qwertyuiopasdfghjklzxcvbnm\nqwert"..., '-', 26) = 0 240799 0.005147 memmove(0x7fa1e6b121d0, "qwertyuiopasdfghjklzxcvbnm", 26) = 0x7fa1e6b121d0 q) \ts:1 read0 `:testf 2161 52624
seconds usecs/call calls function -------- ----------- --------- -------------------- 1.332051 98 13505 memcmp 0.102397 97 1046 memmove 240799 0.000144 memcmp(0x4bf876, 0x7fa1e6b7f410, 1, 113) = 0xffffff93 240799 0.000152 memcmp(0x4bf876, 0x7fa1e6b7f411, 1, 119) = 0xffffffa5 240799 0.000172 memcmp(0x4bf876, 0x7fa1e6b7f412, 1, 101) = 0xffffff98 240799 0.000160 memcmp(0x4bf876, 0x7fa1e6b7f413, 1, 114) = 0xffffff96 240799 0.000144 memcmp(0x4bf876, 0x7fa1e6b7f414, 1, 116) = 0xffffff91 240799 0.000144 memcmp(0x4bf876, 0x7fa1e6b7f415, 1, 121) = 0xffffff95 240799 0.000144 memcmp(0x4bf876, 0x7fa1e6b7f416, 1, 117) = 0xffffffa1 240799 0.000154 memcmp(0x4bf876, 0x7fa1e6b7f417, 1, 105) = 0xffffff9b 240799 0.000162 memcmp(0x4bf876, 0x7fa1e6b7f418, 1, 111) = 0xffffff9a 240799 0.000236 memcmp(0x4bf876, 0x7fa1e6b7f419, 1, 112) = 0xffffffa9 240799 0.000150 memcmp(0x4bf876, 0x7fa1e6b7f41a, 1, 97) = 0xffffff97 240799 0.000149 memcmp(0x4bf876, 0x7fa1e6b7f41b, 1, 115) = 0xffffffa6 240799 0.000149 memcmp(0x4bf876, 0x7fa1e6b7f41c, 1, 100) = 0xffffffa4 240799 0.000222 memcmp(0x4bf876, 0x7fa1e6b7f41d, 1, 102) = 0xffffffa3 240799 0.000175 memcmp(0x4bf876, 0x7fa1e6b7f41e, 1, 103) = 0xffffffa2 240799 0.000313 memcmp(0x4bf876, 0x7fa1e6b7f41f, 1, 104) = 0xffffffa0 240799 0.000311 memcmp(0x4bf876, 0x7fa1e6b7f420, 1, 106) = 0xffffff9f 240799 0.000312 memcmp(0x4bf876, 0x7fa1e6b7f421, 1, 107) = 0xffffff9e 240799 0.000239 memcmp(0x4bf876, 0x7fa1e6b7f422, 1, 108) = 0xffffff90 240799 0.000149 memcmp(0x4bf876, 0x7fa1e6b7f423, 1, 122) = 0xffffff92 240799 0.000148 memcmp(0x4bf876, 0x7fa1e6b7f424, 1, 120) = 0xffffffa7 240799 0.000218 memcmp(0x4bf876, 0x7fa1e6b7f425, 1, 99) = 0xffffff94 240799 0.000156 memcmp(0x4bf876, 0x7fa1e6b7f426, 1, 118) = 0xffffffa8 240799 0.000148 memcmp(0x4bf876, 0x7fa1e6b7f427, 1, 98) = 0xffffff9c 240799 0.000208 memcmp(0x4bf876, 0x7fa1e6b7f428, 1, 110) = 0xffffff9d 240799 0.000326 memcmp(0x4bf876, 0x7fa1e6b7f429, 1, 109) = 0 240799 0.000270 memmove(0x7fa1e6b121d0, "qwertyuiopasdfghjklzxcvbnm", 26) = 0x7fa1e6b121d0 240799 0.000174 memmove(0x7fa1e6b75f78, "\300!\261\346\241\177\0\0", 8) = 0x7fa1e6b75f78
-