Pytorch-metric-learning

Latest version: v2.7.0

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 9

0.9.84

**Testers**
- BaseTester
- Removed size_of_tsne and added visualizer and visualizer_hook to BaseTester. The visualizer needs to implement the fit and transform functions. (In the next version, I'll allow fit_transform as well.) For example:
python
UMAP is the dimensionality reducer we will pass in as the visualizer
import umap
import umap.plot
For plotting the embeddings
def visualizer_hook(umapper, umap_embeddings, labels, split_name, keyname):
logging.info("UMAP plot for the {} split and label set {}".format(split_name, keyname))
umap.plot.points(umapper, labels=labels, show_legend=False)
plt.show()

GlobalEmbeddingSpaceTester(visualizer=umap.UMAP(), visualizer_hook=visualizer_hook)


**Utils**
- AccuracyCalculator
- Added include to the init arguments.
- Renamed exclude_metrics to exclude.
- Added the requires_knn method.
- Added check_primary_metrics to AccuracyCalculator, which validates the metrics specified in include and exclude. By wconnell
- HookContainer
- Check if primary_metric is in tester.AccuracyCalculator. By wconnell
- logging_presets
- Added **kwargs to get_hook_container, so that, for example, you can do get_hook_container(record_keeper, primary_metric="AMI")

**Other stuff**
- Added an [example Google Colab notebook](https://colab.research.google.com/drive/1fwTC-GRW3X6QiJq6_abJ47On2f3s9e5e) which goes through the entire training/testing workflow.

0.9.83

**Losses**
- Added [CircleLoss](https://kevinmusgrave.github.io/pytorch-metric-learning/losses/#circleloss), implemented by AlenUbuntu
- Changes to ProxyAnchorLoss:
- Fixed bug that caused it to break when normalize_embeddings=False
- Made it extend WeightRegularizerMixin
- Fixed/improved application of miner_weights in ProxyAnchorLoss, NCALoss, and FastAPLoss


**Utils**
- Added [AccuracyCalculator](https://kevinmusgrave.github.io/pytorch-metric-learning/utils/#accuracycalculator)
- Changes to loss_and_miner_utils
- Made convert_to_weights return values between 0 and 1, where 1 represents the most frequently occuring sample. Before, it was scaling the probability by size of batch.

**Other stuff**
- Added a test for convert_to_weights

0.9.82

**Losses**
* Added ProxyAnchorLoss

**Trainers**
* BaseTrainer
* Made iterations_per_epoch optional. See the [new documentation](https://kevinmusgrave.github.io/pytorch-metric-learning/trainers/#basetrainer)
* Changed keys for lr_schedulers to allow for end of iteration, end of epoch, and plateau schedulers to all be used at the same time.
* Fixed a key verification bug in BaseTrainer.

**Utils**
* HookContainer
* Added skip_eval_if_already_done flag to run_tester_separately.
* Made ignore_epoch a tuple.
* Added save_custom_figures flag.
* Made records get saved before models.

* common_functions
* Removed pass_data_to_model and autograd.Variable usage.

**Other stuff**
* Fixed bug where __version__ was not accessible.
* Added test for pair and triplet index computation

Page 9 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.