Skip to main content

A Keras callback to estimate remaining training time

Project description

train_time

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

train_time-0.1.5.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

train_time-0.1.5-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file train_time-0.1.5.tar.gz.

File metadata

  • Download URL: train_time-0.1.5.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for train_time-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1a57ee7315bfcd09edd583a09687fc93e066a661a7fa4ac5b2d4e91915d89f9c
MD5 f213808da64d7c2b9e4dc049b8b845fd
BLAKE2b-256 00ff485e784171662fa15e87d1516304c8a5ca4d5d841c516c72f098a29e6d06

See more details on using hashes here.

File details

Details for the file train_time-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: train_time-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for train_time-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b71638ef1cad3ff0a402f41b4448ac8d859f9fe4f0bbd73535dc4852b1bd4348
MD5 e2542013715529d44a681c8dfe11f307
BLAKE2b-256 6c3868fb31c33ede1a1a84da6fb367d2b8d54ba9880581e9a779d14b0cbab831

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page