DEV Community

Cover image for IAflow
Enmanuel Magallanes Pinargote
Enmanuel Magallanes Pinargote

Posted on • Originally published at enmanuelmag.cardor.dev

IAflow

This library help to create models with identifiers, checkpoints, logs and metadata automatically, in order to make the training process more efficient and traceable.

For install the library, you can use pip:

pip install iaflow
Enter fullscreen mode Exit fullscreen mode

Then you can create the ia_make with the following code:

ia_maker = IAFlow(
  models_folder='./models',
  checkpoint_params={
    'monitor': 'val_loss',
    'save_best_only': True,
    'save_weights_only': True
  },
  tensorboard_params={
    'histogram_freq': 1,
    'write_graph': True,
    'write_images': True
  }
)
Enter fullscreen mode Exit fullscreen mode

And then you can add the model with the following code:

model_1_data = ia_maker.add_model(
  model_name='model_1',
  model_params={ 'input_shape': (2, 1) },
  load_model_params={},
  compile_params={
    'metrics': ['accuracy'],
    'optimizer': 'adam', 'loss': 'mse'
  },
)
Enter fullscreen mode Exit fullscreen mode

Finally, you can train the model with the following code:

ia_maker.train(
  model_1_data,
  epochs=5,
  dataset_name='dataset_1'
)
Enter fullscreen mode Exit fullscreen mode

This library has integration with Notifier Status Function, so you can send notifications to Telegram when the training process is finished. To check how to use it and more feature as managing Dataset and Models with the library, you can check the documentation.

Tech used

  • Python
  • Tensorflow
  • Telegram API
  • Notifier Status Function (personal lib)
  • Webhooks

Top comments (0)