Conversation
|
@ArneTR can you see how this performs. I create the data with running |
ArneTR
left a comment
There was a problem hiding this comment.
Code works. Comments inline
| rcu_read_lock(); | ||
| struct task_struct *p = pid_task(find_vpid(pid), PIDTYPE_PID); | ||
| alive = p && pid_alive(p); | ||
| task = pid_task(find_vpid(tgid), PIDTYPE_TGID); |
There was a problem hiding this comment.
I removed all the alive saving as this was quite the overhead.
| return task; | ||
| } | ||
|
|
||
| static int ensure_pid_entry(u32 tgid) |
There was a problem hiding this comment.
Can you explain what this does and why it is necessary and was not necessary before?
There was a problem hiding this comment.
It is the same thing as below but only in a function and changed to work on tasks and not threads/processes
|
|
||
| rcu_read_lock(); | ||
| u32 tgid = task_tgid_nr(t); | ||
| /* discover tasks that do not have a pid entry yet */ |
There was a problem hiding this comment.
Can you summarize for the changes from here until the end of the file why you changed this and what is the expected gain?
There was a problem hiding this comment.
I mainly changed it from processes to tasks and now remove tasks that are not alive anymore.
| q = train_df["target_uj"].quantile(quantile) | ||
| return ( | ||
| train_df[train_df["target_uj"] <= q], | ||
| test_df[test_df["target_uj"] <= q], |
There was a problem hiding this comment.
I would not trim the test set also as this skews the information about its prediction power
tools/model.py
Outdated
|
|
||
|
|
||
| def main() -> None: | ||
| parser = argparse.ArgumentParser( |
There was a problem hiding this comment.
At the moment the code cannot compare to a new out of sample file. I opened up a PR to do so #5
| ) | ||
|
|
||
|
|
||
| def fit_nonnegative_ridge(X: np.ndarray, y: np.ndarray, alpha: float) -> np.ndarray: |
There was a problem hiding this comment.
Can this model be used in the kernel? Or is it just to showcase?
To my understanding this uses no intercept. But I believe we should have one
|
Just for documentation purposes these are the results I am getting when running this code out of the box: I have also seen better runs on my system though where |
ribalba
left a comment
There was a problem hiding this comment.
As already mentioned I didn't spend to much time on the procpower refactoring. I even forgot I had done that, as already mentioned. I will have to work on this again at some stage to validate everything.
| rcu_read_lock(); | ||
| struct task_struct *p = pid_task(find_vpid(pid), PIDTYPE_PID); | ||
| alive = p && pid_alive(p); | ||
| task = pid_task(find_vpid(tgid), PIDTYPE_TGID); |
There was a problem hiding this comment.
I removed all the alive saving as this was quite the overhead.
| return task; | ||
| } | ||
|
|
||
| static int ensure_pid_entry(u32 tgid) |
There was a problem hiding this comment.
It is the same thing as below but only in a function and changed to work on tasks and not threads/processes
|
|
||
| rcu_read_lock(); | ||
| u32 tgid = task_tgid_nr(t); | ||
| /* discover tasks that do not have a pid entry yet */ |
There was a problem hiding this comment.
I mainly changed it from processes to tasks and now remove tasks that are not alive anymore.
|
So you can see what I have changed