Changed
- Updated CivisML template ids to v2.0 (139)
- Optional arguments to API endpoints now display in function signatures.
Function signatures show a default value of "DEFAULT"; arguments will still
only be transmitted to the Civis Platform API when explicitly provided. (140)
- ``APIClient.feature_flags`` has been deprecated to avoid a name collision
with the feature_flags endpoint. In v2.0.0, ``APIClient.featureflags``
will be renamed to ``APIClient.feature_flags``.
- The following APIClient attributes have been deprecated in favor of the
attribute that includes underscores:
``APIClient.bocceclusters`` -> ``APIClient.bocce_clusters``
``APIClient.matchtargets`` -> ``APIClient.match_targets``
``APIClient.remotehosts`` -> ``APIClient.remote_hosts``
- ``civis.io.csv_to_civis`` and ``civis.io.dataframe_to_civis`` functions now use
``civis.io.file_to_civis`` and ``civis.io.civis_file_to_table`` functions instead
of separate logic
- ``civis.io.file_to_civis``, ``civis.io.csv_to_civis`` and ``civis.io.dataframe_to_civis``
now support files over 5GB
- Refactor internals of ``CivisFuture`` and ``PollableResult`` to centralize handling
of threads and ``pubnub`` subscription.
- Updated API specification and base resources to include all general
availability endpoints.
- Changed ``civis.io.file_to_civis`` and ``civis.io.civis_to_file`` to allow
strings for paths to local files in addition to just file/buffer objects.
Fixed
- Fixed parsing of multiword endpoints. Parsing no longer removes underscores
in endpoint names.
- In ``civis.futures.ContainerFuture``, return ``False`` when users attempt to cancel
an already-completed job. Previously, the object would sometimes give a ``CivisAPIError``
with a 404 status code. This fix affects the executors and joblib backend, which
use the ``ContainerFuture``.
- Tell ``flake8`` to ignore a broad except in a ``CivisFuture`` callback.
- Close open sockets (in both the ``APIClient`` and ``CivisFuture``) when they're no
longer needed, so as to not use more system file handles than necessary (173).
- Correct treatment of ``FileNotFoundError`` in Python 2 (176).
- Fixed parsing of endpoints containing hyphens. Hyphens are replaced with
underscores.
- Use ``civis.compat.TemporaryDirectory`` in ``civis.io.file_to_civis`` to be
compatible with Python 2.7
- Catch notifications sent up to 30 seconds before the ``CivisFuture`` connects.
Fixes a bug where we would sometimes miss an immediate error on SQL scripts (174).
Added
- Documentation updated to include new CivisML features (137).
- ``civis.resources.cache_api_spec`` function to make it easier to record the
current API spec locally (141).
- Autospecced mock of the ``APIClient`` for use in testing third-party code which
uses this library (141).
- Added `etl`, `n_jobs`, and `validation_data` arguments to
ModelPipeline.train (139).
- Added `cpu`, `memory`, and `disk` arguments to ModelPipeline.predict
(139).
- Added ``remote_backend`` keyword to the ``civis.parallel.make_backend_factory``
and ``civis.parallel.infer_backend_factory`` in order to set the joblib
backend in the container for nested calls to ``joblib.Parallel``.
- Added the PyPI trove classifiers for Python 3.4 and 3.6 (152).
- ``civis.io.civis_file_to_table`` function to import an existing Civis file
to a table
- ``civis.io.file_to_civis`` function will now automatically retry uploads to
the Civis Platform up to 5 times if is there is an HTTPError, ConnectionError
or ConnectionTimeout
- Additional documentation about the use case for the Civis joblib backend.
- Added a note about serializing ``ModelPipeline`` ``APIClient`` objects to the docstring.
- Added `civis notebooks download` command-line interface command to facilitate
downloading notebooks.
Performance Enhancements
- ``civis.io.file_to_civis`` now takes advantage of multipart uploads to chunk
files and perform I/O in parallel
- ``civis.io.civis_to_csv`` and ``civis.io.read_civis_sql`` will always request
data with gzip compression to reduce I/O. Also, they will attempt to fetch
headers in a separate query so that data can be unloaded in parallel
- ``civis.io.civis_to_csv`` with ``compression='gzip'`` currently returns a file
with no compression. In a future release, ``compression='gzip'`` will return a
gzip compressed file.