Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External models #32

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

External models #32

wants to merge 5 commits into from

Conversation

beasteers
Copy link

@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 added 2 commits June 5, 2020 14:48

Verified

This commit was signed with the committer’s verified signature.
rvagg Rod Vagg

Verified

This commit was signed with the committer’s verified signature.
rvagg Rod Vagg
@beasteers
Copy link
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.

beasteers added 3 commits June 5, 2020 16:55

Verified

This commit was signed with the committer’s verified signature.
rvagg Rod Vagg
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.

None yet

1 participant