def test_load_file_from_disk(self): all_objects = [] MLSchema.populate_registry() all_objects.append( IO.get_content_from_path(Path('tests/data/0/0/1/datapath.yaml'))) self.assertTrue(len(all_objects) == 1)
def create_object_from_file(file_path: str): """ Creates an MLObject based on a file path. File must be valid yaml.""" ml_content_from_disk = IO.get_content_from_path(file_path) return MLObject.create_object_from_string(ml_content_from_disk)