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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay