Smqtk

Latest version: v0.14.0

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

Scan your dependencies

Page 1 of 4

0.14.0

===========================

Notable updates with this release:
* Simplification and vectorization of a few algorithm APIs.
* New algorithm implementations and updates to existing ones.
* Beginning to use ``docker-compose`` configuration to define the build
configurations of various images, beginning with an image to provide FAISS as
a TPL dependency.
* Renamed ``DescriptorIndex`` to ``DescriptorSet`` to reduce confusion on
implied functionality.

Notable fixes with this release:
* Fixed issue with ``smqtk.utils.parallel.parallel_map`` to not hang on
keyboard interrupts.


Updates / New Features
----------------------

Algorithms

* Classifier

* Overhauled interface API to have the abstract method be a many-to-many
iterator instead of the previous one-to-one signature.

* Updated implementations and usages of this interface throughout SMQTK.

* Added wrapper for scikit-learn LogisticRegression classifier.

* DescriptorGenerator

* Overhauled interface API to have the abstract method be a many-to-many
iterator instead of the previous one-to-one signature.

* Updated colordescriptor implementation for interface API update.

* Updated caffe implementation for interface API update.

* Updated KWCNN implementation for interface API update.

* NearestNeighborsIndex

* FAISS

* Exposed ``nprobe`` parameter for when using IVF type indices to be
utilized at query time.

* RelevancyIndex

* Added ``NoIndexError`` exception for when attempting to perform ranking
before an index is built.

* Added ``SupervisedClassifierRelevancyIndex`` to enable using any available
supervised classifier implementation to satisfy the RelevancyIndex API.

Compute Functions

* Updated ``smqtk.compute_functions.compute_many_descriptors`` to utilize new
DescriptorGenerator API.

Docker

* Started use of docker-compose YAML file to organize image building.

* Added FAISS TPL image to be copied from by utilizing images.

* IQR "Playground"

* Fixed compute test scripts to use updated DescriptorGenerator API.

Documentation

* Updated ``docs/algorithminterfaces.rst`` to reflect the new
DescriptorGenerator API.

* Updated ``docs/algorithmmodels.rst`` to reflect the new DescriptorGenerator
API.

* Updated the ``docs/examples/caffe_build_index.rst`` example to use the new
DescriptorGenerator API.

* Updated the ``docs/examples/simple_feature_computation.rst`` example to use
the new DescriptorGenerator API.

IQR

* Remove forcing of relevancy scores in ``refine`` when a result element is
contained in the positive or negative exemplar or adjudication sets. This is
because a user of an ``IqrSession`` instance can determine this intersection
optionally outside of the class, so this forcing of the values is a loss of
information.

* Added accessor functions to specific segments of the relevancy result
predictions: positively adjudicated, negatively adjudicated and
not-adjudicated elements.

Misc.

* Cleaned up various test warnings.

Representation

* AxisAlignedBoundingBox

* Added ``intersection`` method.

* Data Element

* Added PostgreSQL implementation.

* DataSet

* Added PostgreSQL implementation, storing data representation natively in
the database.

* DetectionElement

* Added individual component accessors.

* Renamed "DescriptorIndex" to "DescriptorSet" in order to better represent
what the structure and API represents. "Index" can carry the connotation that
more is happening within the structure than actually is.

Tests

* Updated colordescriptor DescriptorGenerator tests to "skip" when deemed not
available so that the tests are not just hidden when the optional
dependencies are not present.

* Updated dummy classes used in classifier service unit tests to match the new
DescriptorGenerator API.

* Update IQR service unit tests stub class for the new DescriptorGenerator API
and iteration properties.

* Updated various class unit tests to make use of new configuration test helper
function.

* Added a skip mark to ``ContextualReadWriteLock`` class unit tests which
currently fail non-deterministically. This class is currently not used within
SMQTK and a user-warning is now emitted when an attempted construction of
this class occurs.

Tools / Scripts

* Updated the ``smqtk.bin.classifyFiles`` tool to use the new
DescriptorGenerator API.

* Updated the ``smqtk.bin.computeDescriptor`` tool to use the new
DescriptorGenerator API.

* Updated the ``smqtk.bin.iqr_app_model_generation`` tool to use the new
DescriptorGenerator API.

* Updated some old MEMEX scripts to use the new DescriptorGenerator API.

Utils

* Added additional description capability to ProgressReporter.

* Added a return of self in the ``ContentTypeValidator.raise_valid_element()``
method.

* Added helper function for testing Configurable mixing instance functionality.

* Promoted service proxy helper class from IQR service server to a general web
utility.

* Update random character generator to use ``random.SystemRandom`` which, at
least for Posix systems, uses a source suitable for cryptographic purposes.

* Expanded debug logging enabling options in ``runApplication`` tool.

* Added ``--use-simple-cors`` option to the ``runApplication`` tool to enable
CORS for all domains on all routes.

Web

* Added endpoints IQR headless service for expanded getter methods added to
IqrSession class.

* Changed IQR web service endpoint to retrieve nearest-neighbors to a GET
method instead of the previous POST method, as the previous method did not
make sense for the request being made.

* Fixed usage of DescriptorGenerator instances in the classifier service for
the API update.

* Updated ``smqtk.web.descriptor_service`` to use the new DescriptorGenerator
API.

* Updated ``smqtk.web.iqr_service`` to use the new DescriptorGenerator API.

* Updated ``smqtk.web.nearestneighbor_service`` to use the new
DescriptorGenerator API.


Fixes
-----

Algorithms

* DescriptorGenerator

* Caffe

* Fix configuration overrides to correctly handle configuration from JSON.

* Coerce unicode arguments to Net constructor to strings (or bytes in
python 3).

* Fixed numpy load call to explicitly allow loading pickled components due
to a parameter default change in numpy version 1.16.3.

* HashIndex

* SkLearnBallTreeHashIndex

* Fixed numpy load call to explicitly allow loading pickled components due
to a parameter default change in numpy version 1.16.3.

* ImageMatrixObjectDetector

* Add ``abstractmethod`` decorator to intermediate implementation of
``get_config`` method.

Documentation

* Add missing reference to v0.13.0 change notes.

Tests

* Fixed PostgreSQL KeyValueStore implementation unit test that became
non-deterministic in Python 3+.

Utilities

* Fixed issue with ProgressReporter when reporting before the first interval
period.

* Fixed issue with ``smqtk.utils.parallel.parallel_map`` function where it
could hang during threading-mode when a keyboard interrupt occurred.

* Fixed incorrectly calling the module-level debug logging function to use the
locally passed logger, cleaning up a duplicate logging issue.

Web

* Classifier Service

* Fix configuration of CaffeDescriptorGenerator.

* IQR Service

* Fix configuration of CaffeDescriptorGenerator.

0.13.0

===========================
This release incorporates updates and fixes performed on the VIGILANT project
and approved for public release (case number 88ABW-2019-5287).
Some of the major updates and fixes in this include:

- Object detection algorithm interface and supporting DetectionElement
interface and implementations.
- Revised plugin implementation accessor via the mixin class instead what used
to be manually implemented side-car functions for every interface. Also moved
some configuration specific functions out of the plugin utility module and
into a configuration utility submodule, where the ``Configurable`` mixin
class has also moved to.
- Moves unit tests out of the installed SMQTK package and into a dedicated
sub-directory in the repository.


Updates / New Features
----------------------

Algorithms

* Added ``ImageReader`` algorithm interface

* Added matrix reading short-cut if DataElement instance provided has a
``matrix`` attribute/property.

* Added PIL (pillow) implementation with tests.

* Added GDAL implementation with tests.

* Descriptor Generators

* Change ``CaffeDescriptorGenerator`` constructor to take ``DataElement``
instances rather than URIs.

* HashIndex

* SkLearnBallTreeHashIndex

* Fixed numpy load call to explicitly allow loading pickled components due
to a parameter default change in numpy version 1.16.3.

* Object Detection

* Added initial abstract interface.

* Added "ImageMatrixObjectDetector" interface for object detectors that
specifically operate on image data and standardizes the use of an
"ImageReader" algorithm to provide the pixel matrix as input.

* Nearest Neighbors

* FAISS

* Gracefully handle addition of duplicated descriptors to avoid making
index unusable due to an unexpected external failure.

* Make use of new ``get_many`` method of key-value stores to improve
runtime performance.

* Make use of new ``get_many_vectors`` classmethod of DescriptorElement to
improve runtime performance.

* LSH Hash Functor

* Use ``ProgressReporter`` in itq to avoid bugs from deprecated
``report_progress`` function

Compute Functions

* Add ``compute_transformed_descriptors`` function to ``compute_functions.py`` for
conducting searches with augmented copies of an image

Misc.

* Updated numpy version in requirements.txt to current versions. Also split
versioning between python 2 and 3 due to split availability.

* Resolve python static analysis warnings and errors.

Representation

* Added ``AxisAlignedBoundingBox`` class for describing N-dimensional euclidean spatial
regions.

* Added ``DetectionElement`` interface, and in-memory implementation, with
associated unit tests.

* Added ``DetectionElementFactory`` class for factory construction of
``DetectionElement`` instances.

* Add use of ``smqtk.utils.configuration.cls_conf_from_config_dict`` and
``smqtk.utils.configuration.cls_conf_to_config_dict`` to appropriate
methods in factory classes.

* Add ``get_many`` method to ``KeyValueStore`` interface class and provide an
optimized implementation of it for the ``PostgresKeyValueStore``
implementation class.

* Add ``get_many_vectors`` classmethod for efficiently retrieving vectors from
several descriptor elements at once

* Add efficient implementation of ``_get_many_vectors`` for Postgres descriptor
elements.

* Updated ``MemoryKeyValueStore.add_many`` to use ``dict.update`` method
instead of manually updating keys.

* Removed unnecessary method override in ``DataFileElement``.

* Added ``MatrixDataElement`` representation that stores a ``numpy.ndarray``
instance internally, generating bytes on-the-fly when requested.

* ``DataMemoryElement`` now raises a TypeError if a non-bytes-line object is
passed during construction or setting of bytes. Configuration mixin hooks
have been updated to convert to and from strings for JSON-compliant
dictionary input and output. Fixed various usages of DataMemoryElement to
actually pass bytes.

Tests

* Moved tests out of main package tree.

* Added use of ``pytest-runner`` in ``setup.py``, removing ``run_tests.sh``
script. New method of running tests is ``python setup.py test``.

Utilities

* Added to ``Pluggable`` interface the ``get_impls`` method, replacing the
separate ``get_*_impls`` functions defined for each interface type. Removed
previous ``get_*_impls`` functions from algorithm and representation
interfaces, adjusting tests and utilities as appropriate.

* Renamed ``smqtk.utils.configurable`` to ``smqtk.utils.configuration``.
Ramifications fixed throughout the codebase. Added documentation to
doc-strings.

* Added ``cls_conf_from_config_dict`` and ``cls_conf_to_config_dict``
intermediate helper functions to ``smqtk.utils.configuration`` for the
``from_config_dict`` and ``to_config_dict`` sub-problems, respectively.
This was motivated by duplicated functionality in element factory class
``from_config`` and ``get_config`` methods.

* Moved some helper functions from ``smqtk.utils.plugin``to
``smqtk.utils.configuration`` as those functions more specifically had to do
with configuration dictionary construction and manipulation. Ramifications
fixed throughout the codebase.

* Updated ``smqtk.utils.plugin.get_plugins`` signature and return. Now more
simply takes the interface class (previously referred to as the base-class)
instead of the original first two positional, string arguments as they could
be easily introspected from the interface class object. Ramifications fixed
throughout the codebase.

* Added ``ContentTypeValidator`` interface for algorithms that operate on raw
``DataElement`` instances, providing methods for validating reported content
types against a sub-class defined set of "valid" types. Applied to
``DescriptorGenerator`` interface.

* Replace usage of ``smqtk.utils.bin_utils.report_progress`` with the
``ProgressReporter`` class throughout package.

* Removed bundled "jsmin" in favor of using pip installed package.

* Moved ``merge_dict`` out of ``smqtk/utils/__init__.py`` and into its own
module.

* Created ``combinatorics`` utils module, moved ``ncr`` function to here.

* Renamed various utility modules that included ``_utils`` in their name to not
include ``_utils`` for the sake of reducing redundancy.

* Removed ``FileModificationMonitor`` utility class due to having no current
use anywhere as well as its tests non-deterministically failing (issues
with timing and probably lack of sufficient use of mock, time to fix not
worth its lack of use). The ``watchdog`` python package should be used
instead.

* Added entry-point extension method of plugin discovery.

* Added warning to ``smqtk.utils.file.safe_file_write`` when used on Windows
platforms.

Fixes
-----

Algorithms

* Nearest Neighbors

* FAISS

* Fix issue with storing and retrieving index IDs as numpy types by casting
to python native integers due to an incompatibility with some
KeyValueStore implementations (specificially an issue with the PostgreSQL
implementation).

Misc.

* Removed some unused imports.

Representation

* Fixed bug with ``ClassificationElement.max_label`` where an exception would
be raised if there was no label with associated confidence greater than 0.

* Fix some postgres test comparisons due to not being able to ``byte`` case
Binary instances in python 3. Instead using the ``getquoted`` conversion for
the sake of actual/expected comparisons.

Tests

* Moved ``--cov`` options from pytest.ini file into the runner script. This
fixes debugger break-pointing in some IDEs (e.g. PyCharm).

* Fix various minor testing errors.

Utilities

* Fix ``ZeroDivisionError`` in ``smqtk.utils.bin_utils.report_progress``. Also
added deprecation warning to this function.

0.12.0

===========================
This minor release includes minor fixes and known dependency version updates.

Fixes
-----
Docker

* Fix issue with IQR playground image where matplotlib was attempting to use
the TkAgg backend by default by adding a ``matplotlibrc`` file to specify the
use of the ``Agg`` backend.

Misc

* Update requirements versions for: Flask, Flask-Cors, Pillow

* Update Travis-CI configuration to assume less default values.

Web

* IQR Service

* Broaden base64 parsing error catch. Specific message of the error changed
with python 3.7.

0.11.0

===========================

This minor release includes a number of security and stability fixes for
algorithms and the IQR demo web application.

0.10.0

===========================

This minor release represents the merger of public release request 88ABW-2018-3703. This large updated adds a number of functionality improvements and API changes, docker image improvements and expansions (see the new classifier service), FAISS algorithm wrapper improvements, ``NearestNeighborIndex`` update and removal support, a switch to ``py.test`` testing framework, generalized classification probability adjustment function, code clean-up, bug fixes and more.

0.9.0

Not secure
==========================

This minor release represents an update to supporting python 3 versions
as well as adding connection pooling support to the PostgreSQL helper
class.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.