Skip to content

importing an executed module #41

@agoryuno

Description

@agoryuno

adet.data.__init__.py contains an import:

from . import builtin

while adet.data.builtin.py contains code in global scope (starting on line 81) which is meant to be run when executing the module from the shell. This causes ipykernel to explode when running any code that imports anything from adet.data in a Notebook or Google Colab. The simple solution is to hide the executable code in an if __name__ == '__main__' block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions