Skip to content

External models#32

Open
beasteers wants to merge 5 commits intobmcfee:mainfrom
beasteers:external_models
Open

External models#32
beasteers wants to merge 5 commits intobmcfee:mainfrom
beasteers:external_models

Conversation

@beasteers
Copy link
Copy Markdown

@beasteers beasteers commented Jun 5, 2020

This lets you easily define a crema model that lives outside of the core repo, which I imagine most models are at some point before they get merged in. This has no effect on the default behavior and only matters for subclasses that modify these attributes. So for example:

import crema
from .custom_layer import CustomLayer

class MyModel(crema.models.base.CremaModel):
    name = 'my_model'
    model_root = '~/.crema/models'
    custom_objects = {
        'CustomLayer': CustomLayer
    }

And voila - an externally defined model at ~/.crema/models/my_model can be used as a crema model with its own custom layers.

@beasteers
Copy link
Copy Markdown
Author

The test failure happens when installing llvmlite on python 3.5. it looks like it's an issue upstream where some package is not supporting 3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant