FlowModel is a lightweight and extensible machine learning framework designed for beginners who want to explore AI development. With its modular plugin-based architecture, users can easily extend its functionality while keeping the core simple and maintainable.
FlowModel provides a simple entry point for experimenting with AI and machine learning. It allows users to start with a minimal framework and extend it by creating and adding plugins. The framework is designed to focus on simplicity, modularity, and extensibility.
1python -m venv .venv
2source .venv/bin/activate # For Unix/MacOS3.venv\Scripts\activate # For Windows
Install dependencies:
pip install -r requirements.txt
Directory Structure
plaintext
1FlowModel/
2├── main.py # Entry point for the application
3├── plugins/ # Directory for plugins
4│ ├── __init__.py # Initializes the plugin package
5│ ├── example_plugin.py # Example plugin
6├── data/ # Placeholder for datasets
7├── requirements.txt # Python dependencies
Usage
Training a Model
To train a model using FlowModel, run:
python main.py train
This will load any available plugins from the plugins/ directory and apply their logic during the training process.
Adding Plugins
To add a plugin, place a .py file with your plugin class in the plugins/ directory. FlowModel automatically detects and loads plugins at runtime.
Creating Plugins
Plugins extend the functionality of FlowModel. To create a plugin:
Create a new Python file in the plugins/ directory:
plugins/my_plugin.py
Define your plugin class:
python
1classMyPlugin:2def__init__(self):3print("MyPlugin initialized.")45defmodify_model(self, model):6print("MyPlugin: Modifying the model.")7return model
89defon_train_start(self):10print("MyPlugin: Training started.")1112defon_train_end(self):13print("MyPlugin: Training finished.")
Use your plugin during training:
When main.py runs, it automatically loads your plugin and calls its methods.
Command-Line Interface
FlowModel includes a simple CLI for interacting with the framework.
Commands
Train: Start the training process with plugins.
python main.py train
Contributing
Contributions are welcome! To contribute:
Fork the repository.
Create a new branch for your feature.
Commit your changes and push them.
Open a pull request.
License
FlowModel is released under the MPL-2.0 License. See LICENSE for details.