• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ottogroup / palladium
90%
master: 90%

Build:
Build:
LAST BUILD BRANCH: dependabot/pip/jinja2-2.11.3
DEFAULT BRANCH: master
Repo Added 17 Apr 2015 07:58AM UTC
Files 12
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH feature/model-attachments
branch: feature/model-attachments
CHANGE BRANCH
x
Reset
  • feature/model-attachments
  • 1.0.1
  • 1.2.0
  • 1.2.1
  • 1.2.1.1
  • 1.2.1.dev1
  • 1.2.2
  • 1.2.3
  • 1.2.dev4
  • 1.2b1
  • 1.2b2.dev1
  • GBIPMMF-190
  • batch-processing
  • bug/permissive-recursive-get-config
  • bugfix-ujson-precision
  • bugfix/R-tzlocal
  • bugfix/alive-handler
  • bugfix/bad-server-fit-decorator-name
  • bugfix/better-default-cache-dir
  • bugfix/cache-wraps
  • bugfix/cachedupdatepersister-without-active-model
  • bugfix/conda-build-3.6
  • bugfix/conda-install-quiet
  • bugfix/config-copy-tests-coverage
  • bugfix/docs-parallelism
  • bugfix/dont-register-update-model-cache
  • bugfix/fit-evaluate-scorer
  • bugfix/flakey-tests
  • bugfix/openml-travis
  • bugfix/persistence-decorators
  • bugfix/pip-install-travis
  • bugfix/pld-config-key-bad-value
  • bugfix/simplify-travis
  • bugfix/some-deprecation-warnings
  • bugfix/travis-docs-require
  • bugfix/travis-py-3.5
  • dependabot/pip/jinja2-2.11.3
  • develop
  • feature-active-model
  • feature-admin-delete
  • feature-database-clob
  • feature-document-backward-incompatiblity
  • feature-document-commands
  • feature-params-from-data-api
  • feature-python-3.3
  • feature-streaming-io-api
  • feature-update-requirements
  • feature/R-categorical
  • feature/activate-web-service
  • feature/add-conda-recipe
  • feature/add-poolclass-param
  • feature/avoid-delayed-initialization
  • feature/bayesian-hyperparameter-example
  • feature/cachedupdatepersister-avoid-loading-same-model
  • feature/ci-add-python-3-7
  • feature/config-exclamation-mark-as-factory
  • feature/copy-with-default
  • feature/cv-iterator-apply-X
  • feature/default-configfile-name
  • feature/get-metadata-decorators
  • feature/grid-search-impl
  • feature/grid-search-persist-best
  • feature/grid-search-save-results
  • feature/keras-and-xgboost-examples
  • feature/list-webservice
  • feature/multiple-entry-points
  • feature/openml
  • feature/pld-export
  • feature/pld-fit-memory
  • feature/pld-test-scoring
  • feature/predict-service-unwrap-for-text
  • feature/refit-web
  • feature/requirements-update
  • feature/resolve-dotted-name-modules
  • feature/rest-persister
  • feature/travis-py-3.7
  • feature/travis-run-conda-build
  • feature/update-dependencies
  • feature/update-pip-dependencies
  • feature/update_dependencies
  • features/docs-dask-hyperparameter
  • master

pending completion
607

push

travis-ci

dnouri
Proposal implementation for handling model attachments

The idea is that we sometimes want to attach files to models, such as
HTML reports or the like, and in the backend, these files should be
stored separately, to allow easy access.

Here we're implemeting this idea for the 'FileLike' model persister
and testing it for the 'File' subclass.  This should work for 'Rest'
and 'S3' as well, but I thought it's best to add tests when we all
agreed on the idea.

Usage is demonstrated in 'TestFileAttachments'.  The contract is as
follows: Use 'palladium.util.annotate' to add an arbitrary number of
attachments to the model, like so:

```
annotate(model1, {'attachments/myatt.txt': 'aGV5',
                  'attachments/my2ndatt.txt': 'aG8='})
```

Note that the keys of such attachments must start with 'attachments/',
with the rest indicating a filename.  The values must be base64
encoded but converted from bytes to strings.  This is arguably a bit
awkward, but we do this because the attachments dictionary must in
general be JSON serializable, and using bytes would violate this.

When 'model1' is persisted, 'FileLike' will create one file for each
attachment and call them 'model-1-myatt.txt' and
'model-1-my2ndatt.txt'.  The implementation chooses to use flat files
rather than a folder to hold all attachments for a given model.  This
is done so that we do not need to add extra methods to
'FileLikeIO' (such as mkdir), which means we should get support for
other 'FileLike' implementations such as 'Rest' and 'S3' for free.

Moreover, the attachments will be removed from the model's pickle and
from the metadata files, in order not to blow up the size of those.
When the model is loaded back through the model persister, the
attachments are loaded and put back into the model's metadata
dictionary.

What's a good time to add the attachments to the model?  Use the
'write_model_decorators' pluggable decorator hook to add a decorator
that adds your attachment just before i... (continued)

1279 of 1425 relevant lines covered (89.75%)

1.8 hits per line

Relevant lines Covered
Build:
Build:
1425 RELEVANT LINES 1279 COVERED LINES
1.8 HITS PER LINE
Source Files on feature/model-attachments
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
607 feature/model-attachments Proposal implementation for handling model attachments The idea is that we sometimes want to attach files to models, such as HTML reports or the like, and in the backend, these files should be stored separately, to allow easy access. Here we're ... push 05 Nov 2019 09:40AM UTC dnouri travis-ci pending completion  
608 feature/model-attachments Proposal implementation for handling model attachments The idea is that we sometimes want to attach files to models, such as HTML reports or the like, and in the backend, these files should be stored separately, to allow easy access. Here we're ... Pull #119 05 Nov 2019 09:40AM UTC web-flow travis-ci pending completion  
See All Builds (475)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc