Skip to main content

Models Files Manager

The Models Files Manager is a simple tool that helps you keep track of saved models (PyTorch/Keras/Onnx/etc.) saved on the hard drive. You can set up a number of fields, that will get encoded into the file names, and query the files saved.

The Models Files Manager helps you avoid illegal chars in the paths, and easily retrive saved files for loading.

Installation

You can install the Models Files Manager from PyPI:

python -m pip install models-files-manager

The manager is supported and tested on Python 3.8 and above.

How to use

To use the Models Files Manager, in your own Python code, by importing from the models_files_manager package:

>>> from models_files_manager import ModelsFilesManager
>>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')
>>> models_file_names = manager.get_model_files(lambda d: d['field1'] == 'value1')

Or to create a new file name:

>>> from models_files_manager import ModelsFilesManager
>>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')
>>> file_name = manager.get_file_name({'field1': 'value1', 'field2': 'value2'})

Or get the field values of a specific model, from the path:

>>> from models_files_manager import ModelsFilesManager
>>> manager = ModelsFilesManager(root, ['field1', 'field2'], 'ext')
>>> fields = manager.get_fields_values('model file name')
>>> print(fields['field1'])

To directly encode/decode into strings to a path-safe format:

>>> from models_files_manager import ModelsFilesManager
>>> safe_string = ModelsFilesManager.path_escape(string)
>>> orig_string = ModelsFilesManager.path_decode(safe_string)

Free to use in any way, open source or commercial - see attached license.

Happy training! Ram Nathaniel, 2023

Release files for models-files-manager 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for models-files-manager 1.0.5
File Size Uploaded
models-files-manager-1.0.5.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for models-files-manager 1.0.5
File Interpreter ABI Platform
models_files_manager-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / models-files-manager-1.0.5.tar.gz

Download URL models-files-manager-1.0.5.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c9e84a74a60b30f196aedd8ad4bf34c4f4356e95e5c665069cc2245c221e8959
BLAKE2b-256 checksum
How to use checksums
5b7e4ffcc15260712fe837f2ac3c53d13ea309d52bf7df5be42b847636b8f52e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / models_files_manager-1.0.5-py3-none-any.whl

Download URL models_files_manager-1.0.5-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0501eea17b61a7452a8c3ac9f7715343eb595fe765c3486735fefa12c27213c
BLAKE2b-256 checksum
How to use checksums
5e731f1c770ec3a3e6f97fb37822d7cb692a9c6e4d875a3082f9a635cd355795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page