Callback prepared to log checkpoints to minio server.
Project description
Pytorch Lightning Minio Callback
Callback prepared to log checkpoints and tensorboard data to minio server.
Quick Start Example
This example program connects to an S3-compatible object storage server, make a bucket on that server, and upload a file to the bucket.
You need the following items to connect to an S3-compatible object storage server:
| Parameters | Description |
|---|---|
| save_dir | Directory to save models in. |
| name | Sub-directory to save models in. |
| upload_models | Whether to upload the checkpoints or not |
| upload_hparams | Whether to upload the hparams or not |
| upload_tensorboard_data | Whether to upload tensorboard data or not |
| bucket | Name of the bucket where data will be stored |
| endpoint | URL to minio service. |
| endpoint | URL to minio service. |
| access_key | Access key (aka user ID) of an account in the minio service. |
| secret_key | Secret key (aka password) of an account in the minio service. |
| secure | Whether endpoint uses https or not. |
| secure | Whether endpoint uses https or not. |
Files will be saved in the with the following format
<save_dir>/<name>/version_x/checkpoints_and_tensorboard_data
They will also be uploaded to minio:
<bucket>/<save_dir>/<name>/version_x/checkpoints_and_tensorboard_data
Usage
...
from src.pl_minio_callback.minio_callback import MinioCallback
...
if __name__ == "__main__":
...
logger = TensorBoardLogger(save_dir="models", name="cifar10_resnet") # Check parameters
trainer = pl.Trainer(
callbacks=[
MinioCallback(
upload_tensorboard_data=False,
upload_hparams=False,
upload_checkpoints=True,
bucket="tensorboard",
endpoint="localhost:9000",
access_key="minio",
secret_key="minio123",
secure=False
)
],
log_every_n_steps=5,
checkpoint_callback=True,
logger=logger,
max_epochs=10,
gpus=1,
auto_select_gpus=True
)
...
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pl-minio-callback-1.0.0.tar.gz.
File metadata
- Download URL: pl-minio-callback-1.0.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88d3fac5bdf5a9758d93abea9638bdc8d6fd19a1fc0477db42c2d35a73998aa5
|
|
| MD5 |
df60d2d1c6e67d90f77fe16cbd27ae79
|
|
| BLAKE2b-256 |
97ba1840cb550ebfaf3e3937bbc84b3b676e631ca6e891ad01852dcfcacadda1
|
File details
Details for the file pl_minio_callback-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pl_minio_callback-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cd3b0f43305ac67de89b98d07be5a99768ffaf7f2b562f7c6adb960cfb782ed
|
|
| MD5 |
a6e34bb5d8472f1b721bfb7a995984f7
|
|
| BLAKE2b-256 |
7c4ee554667262dfb8a006db5aa28393b80247d777aea60e6541ac77b9ed7c0c
|