-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Implement signals (Issue #43) #160
base: main
Are you sure you want to change the base?
Conversation
…and access (returns data)
openadapt/signals.py
Outdated
return data | ||
|
||
|
||
def __access_file_signal(self, file_path): |
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.
@AvidEslami what do you think about looking into automatically listing open files and ports?
(This one could be a TODO in this PR and implemented in a followup)
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.
Let's add a function add_pid
that listens for files open by a process
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.
|
||
def test_add_function_signal(): | ||
signals = Signals() | ||
signals.add_signal("sample_package.sample_module.sample_function") |
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.
Refer to #464 |
Currently the next step for recording file signals seems to be using ProcMon from sysinternals: https://learn.microsoft.com/en-us/sysinternals/downloads/procmon. By setting filters we seem to be able to access opened files, but we still need to investigate how we can access the ProcMon logs from within record.py, in addition to investigating how often ProcMon writes the logs in order for us to access them effectively. |
@AvidEslami does #464 work here? |
Not perfect, but definitely the best we have so far |
Summary: This pull request makes progress towards Implementing Signals (Issue #43)
Goal: Provide large language models with targets and other information to support them in strategies. Information can be in the form of a database, web-url, function call, or local file (other types could be added in the future).
Implementation:
Tests have been added in the tests folder (test_signals.py) run using pytest.
TODO:
Please let me know if you have any suggestions or changes!
Let me know if the problem was misinterpreted or if this solution isn't heading in the desired/optimal direction.