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

Scaffolding for config file handling and model selection #6

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

drewoldag
Copy link
Collaborator

@drewoldag drewoldag commented Aug 8, 2024

This PR represents the scaffolding work for two aspects of fibad:

  1. Basic support for reading and loading the default and the user's defined runtime configuration file for use within fibad.
  2. Basic support for dynamically loading models, either from a registry of built in models or via a user defined module spec, specified in the user's runtime configuration file.

To use a built in model from the registry a user specifies in the .toml config file the following:

[train]
model_name = "name_of_built_in_model_class"

To specify a model outside of fibad, the users .toml config would include something like the following example. Basically what the user would write in a from ... import ... statement.

[train]
model_class = "package.submodule.subsubmodule.ModelClass" 

Included here is an implementation of PyTorch's "Getting Started" CNN for classifying images in the CIFAR10 dataset - note that this is incomplete, and meant to be a way to test the model registration process, and will be a testbed for future work.

@drewoldag drewoldag self-assigned this Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

Before [0cd1e6c] After [174e587] Ratio Benchmark (Parameter)
2.23±1s 3.42±0.9s ~1.53 benchmarks.time_computation
856 3.82k 4.47 benchmarks.mem_list

Click here to view all benchmarks.

Copy link

codecov bot commented Aug 8, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@drewoldag drewoldag changed the title Scaffolding for config file handling Scaffolding for config file handling and model selection Aug 10, 2024
Copy link
Collaborator

@mtauraso mtauraso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good to add tests, but I'm in favor of this getting merged even as-is.

src/fibad/config_utils.py Outdated Show resolved Hide resolved
@drewoldag drewoldag merged commit 827babf into main Aug 12, 2024
7 checks passed
@drewoldag drewoldag deleted the issue/5/config-support branch August 12, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scaffolding to support loading a model based on config value. Basic .toml configuration file support
2 participants