Skip to content

A simple yet powerful Keras callback to monitor and predict the time remaining in model training.

License

Notifications You must be signed in to change notification settings

2abet/TrainTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

train_time

Downloads Downloads Downloads

train_time is a Python package that provides a callback for machine learning training processes, particularly useful when using TensorFlow/Keras. It estimates and displays the remaining training time for each epoch during the model training process. The package allows users to view the remaining time in their preferred format: seconds, minutes, hours, or days.

Features

  • Easy integration with TensorFlow/Keras training loops.
  • Customizable time format for estimated training time display.
  • Lightweight and easy to use.

Installation

Note: this doesnt work with python 3.12 for now

You can install train_time directly from PyPI:

pip install train_time

Usage

To use train_time in your machine learning project, simply import the package and add it to your model's callbacks. Here is a basic example:

import tensorflow as tf
from train_time import train_time

# Define your model
model = tf.keras.models.Sequential([
    # ... your model layers ...
])

# Compile your model
model.compile(optimizer='adam', loss='loss_function')

# Instantiate the callback
time_callback = train_time(time_format='minutes')

# Train the model with the callback
model.fit(x_train, y_train, epochs=10, callbacks=[time_callback])

In this example, time_format can be 'seconds', 'minutes', 'hours', or 'days', depending on your preference.

Contributing

Contributions to train_time are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to everyone who has contributed to the development of this package.
  • Special thanks to the TensorFlow and Keras communities for their invaluable resources.

About

A simple yet powerful Keras callback to monitor and predict the time remaining in model training.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages