Skip to content
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

63 add graph driver example #64

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

sgoldenCS
Copy link
Contributor

This pull request covers the creation of a new graph driver example derived from the existing workflow example in the core. There are only two changes that would affect existing users in this PR:

  • The __init__.py file for the toolkit now imports from most sub-packages (data_parsers, data_preps, models, trainers, and analyses)
    • This allows a single import of the toolkit to register all available modules. There is probably a nicer way to do this, but it works well for now.
  • The graph driver has been updated with new features (printing, automatic list to tuple conversion, and modules as inputs).
    • I don't believe the changes should cause any issues as all of the changes are new features. However, with new code comes the opportunity for unseen bugs, so this should be tested by people who are using the graph driver before we complete the PR.

One thing to note: The graph driver does not currently allow for keyword-arguments which limits the example driver. Specifically, the trainer and analysis are not given a logdir argument, so they do not output any graphs. I think this issue will need to be dealt with separately; either we need to change the way the modules obtain the logdir (perhaps through their __init__?) or we need to figure out a solution for passing in keyword arguments. While the PR is in review, I may try to find a quick workaround, but it's likely these will need to be fixed in a separate issue/branch.

Makes QoL improvements including: automatic conversion of lists to tuples for the input and output values for each edge of the graph, allowing a module object as an input to a function through a special "module.name" syntax, and a built-in print function to print out any data/module object to stdout.
This workflow does everything the current example_workflow does, except it does not output images. This is because the logdir is currently passed to the trainer and analysis modules as an input argument which is out of order. We may need to update the graph driver to allow for kwargs, but for now, this is a good example of what the workflow could look like.
@sgoldenCS sgoldenCS added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 3, 2025
@sgoldenCS sgoldenCS self-assigned this Jan 3, 2025
@sgoldenCS sgoldenCS linked an issue Jan 3, 2025 that may be closed by this pull request
If we make a few small changes to the logging within the trainer and analysis, we can pass it in through the configuration.
@sgoldenCS
Copy link
Contributor Author

I've made a few changes to the analysis and trainer modules which shouldn't affect them for previous uses, but allow them to have the log directory passed in as a configuration option. This allows them to produce all of the output graphs that were missing before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add graph driver example
1 participant