Recent Releases of torchoutil
torchoutil - Version 0.6.0
[0.6.0] 2025-04-09
Added
- Functions
unsqueeze,squeezeandone_hot. - Function
isinstance_guardto check parametrized types. - Function
randstrto generate random strings.
Modified
- Rename
get_devicetoas_device. - Rename
get_dtypetoas_dtype. - Rename
get_generatortoas_generator.
Fixed
- Global import of
to.utils.return_types.shapein python 3.9 and 3.10. checksumfunction with non-cpu tensors.as_devicenow correctly instantiate concrete type with str and int arguments.- Supports typing for older torch version for functions like
mean,load.
Deleted
pack_customfunction and classes.
- Python
Published by Labbeti about 1 year ago
torchoutil - Version 0.5.0
[0.5.0] 2024-11-28
Major rework of torchoutil project folders.
Added
- Tensor typing classes for instance checks like
Tensor2D,FloatTensor1D, etc. - Function
get_key_fnto customize sorting using patterns. - Option
on_errortoload_yamlto ignore yaml scanner and parser exceptions. - Function
ranksto get the ranking values in a tensor. - Function
sort_with_patternsto sort values using string-based patterns. - Function
pad_and_crop_dimand classPadCropDimto pad then crop a tensor along a specified dimension. - Function
reimport_modulesto re-import modules and functions in a notebook. - Function
checksum_moduleto compare module weights. - Function
nelementto get number of elements in Tensor-like object. - Function
flattento get flat of elements in Tensors, numpy array, builtins scalars and lists. - Added
DatasetSlicerclass in utils.
Modified
- Rename
is_pickle_roottois_packed_root(old name was kept for backward compatibility). - Split python functions into a separate directory called
pyoutil.
- Python
Published by Labbeti over 1 year ago
torchoutil - Version 0.4.0
[0.4.0] 2024-05-27
Added
- Option
subdir_sizetopack_dataset. - Classes
CosDecaySchedulerandCosDecayRuleclasses. - Function
sorted_dictto collections. - Functions
ndimandshapeto search information in tensor-like objects. - Function
itemto convert scalar-like objects to built-in scalar objects. - Mixin classes to improve module features.
Modified
- Rename
from_numpytonumpy_to_tensorto avoid confusion withtorch.from_numpy. - Rename
save_to_yamltoto_yamlandsave_to_csvtoto_csv. - Rename
PickleDatasettoPackedDataset. - Rename
pack_to_pickletopack_dataset. - Update
EModuleandESequentialclasses with auto-config and auto-device detection.
Fixed
- Function
can_be_converted_to_tensornow accepts numpy arrays and scalars. - Wildcard imports, and module imports. (e.g.
from torchoutil import nn) can_be_stackednow returns False with an empty sequence.
- Python
Published by Labbeti almost 2 years ago
torchoutil - Version 0.3.1
[0.3.1] 2024-04-25
Added
- Method
count_parameterstoTModule. - Option
padding_idxtoindices_to_onehotfunction. - Functions
dict_list_to_list_dict,flat_list,unflat_dict_of_dictto collections utils. - Class
PickleDatasetand functionpack_to_pickleto utils. - Class
ResampleNearestand functionresample_nearest. - Class
TransformDropand functiontransform_drop.
Fixed
- Remove invalid test file.
- Function
is_scalarnow returns True for numpy scalars when numpy package is installed.
- Python
Published by Labbeti almost 2 years ago
torchoutil - Version 0.3.0
[0.3.0] 2024-04-17
Added
PositionalEncodinglayer for transformers networks.- Property
metadatatoHDFDataset. - Function
create_params_groups_biasfor avoid apply weight decay to networks bias. - Functions
is_numpy_scalar,is_torch_scalarandunzip. - Options
auto_open,numpy_to_torchandfile_kwargsto customize loading inHDFDataset.
Modified
- Update keyword arguments for mask, pad, labels functions and modules.
- Getting added column using
atfromHDFDatasetwhenreturn_added_columnsisFalse. - Renamed
ModelCheckpointRegistertoRegistryHuband add hash value check after download.
Fixed
can_be_converted_to_tensornow returns True if input is a Tensor.
- Python
Published by Labbeti almost 2 years ago
torchoutil - Version 0.2.2
[0.2.2] 2024-03-08
Fixed
ModelCheckpointRegisternow creates intermediate directories before download.MaskedMeanandMaskedSumdim argument.
- Python
Published by Labbeti about 2 years ago
torchoutil - Version 0.2.1
[0.2.1] 2024-03-07
Added
ModelCheckpointRegisterclass to make download and loading easier from checkpoint.
Modified
pack_to_hdfnow supports existing shape column.SizedDatasetLikeis now compatible withSequence-like objects.
- Python
Published by Labbeti about 2 years ago
torchoutil - Version 0.2.0
[0.2.0] 2024-03-04
Added
- Optional hdf datasets with
HDFDatasetclass andpack_to_hdffunction. - Multiclass functions to convert labels.
- Arg
diagonaltogenerate_square_subsequent_mask. Abs,Angle,RealandImagmodules.
Modified
- Use Literal for pad and crop functions typing.
- Minimal torch version is now 1.10.
- Python
Published by Labbeti about 2 years ago
torchoutil - Version 0.1.0
[0.1.0] 2024-01-29
Added
- 47 torch functions and 40 torch modules.
- Python
Published by Labbeti about 2 years ago