Comments (1)
I have thought about a couple of ways to do this:
- Use introspection to literally make a dataclass directly from the training function and its type annotations -- this is the
Params
approach, since we make a dataclass whose attributes are literally the parameters of the function - Write a high-level
TrainConfig
class and then subclass it. This potentially has all the usual issues with subclassing, with the caveat that these are just attributes and not methods proper so we seem less likely to bang up against those issues. Worst case we might just end up adding/removing attributes a lot.
Either way we should end up with the following:
high-level functions that just take a TrainConfig/TrainParams,
something like this
def train(
config: TrainFrameClassificationConfig | TrainParametricUMAPConfig | TrainAvaConfig
)
# validate config is an instance of one of those configs we type hint with, then
train_kwargs = asdict(config)
if isinstance(config, TrainFrameClassificationConfig):
train_frame_classification_model(**train_kwargs)
elseif ...
from vak.
Related Issues (20)
- ENH: Add `dataset` sub-table to config file, remove other dataset/transform param keys HOT 1
- ENH: Make it possible to specify different splits for datasets
- Consider switching to keras as engine
- ENH: Add datasets module with BioSoundSegBench HOT 1
- ENH: Add pre-trained model checkpoints
- MODEL: Add voxaboxen
- MODEL: Add SqueakOut
- MODEL: Add Repertoire Embedder
- MODEL: Add AVN Similarity
- MODEL: canary-song-decoder
- DEV: Bump lower bound on requires-python to 3.10
- DEV: Adjust lower/upper bounds on other dependencies
- DEV/TEST/CI: nox sessions 'tar-generated-test-data' not working as expected
- BUG: post-processing transform doesn't work with boundary labels
- BUG: Error with dataset_path parameter in vak eval HOT 6
- BUG: train_test_dur_split_inds can return indices for training set slightly smaller than target duration
- ENH: Add functionality to set seed
- ENH: Add back clipping of splits for learning curves to target durations HOT 1
- ENH: Add seed argument to `vak.prep.split` functions
- CLN: Rename/refactor BioSoundSegBench dataset -> CMACBench HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vak.