Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

When working with multiple files for training, using MLOpsDatabricks, the train script will fail on importing dependencies #23

@riserrad

Description

@riserrad

Describe the bug
When working with multiple files for training - and referencing them from train.py for example - using MLOpsDatabricks, the train script will fail on importing dependencies

To Reproduce
Instead of using a single to train the model, have a main file that loads some other dependencies (stored on the folder structure) and submit the Pipeline Step to AML.

Expected behavior
Wether the file is on the same folder level as the train script or the file is available within the structure under sources_directory, it should be able to use/import the dependency.

Screenshots
Instead, we get an error saying it could not load the dependency:

ModuleNotFoundError                       Traceback (most recent call last)
<command--1> in <module>()
     13 
     14 with open(filename, "rb") as f:
---> 15   exec(f.read())
     16 

<string> in <module>()

ModuleNotFoundError: No module named 'documentprocessor'

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