Query regarding the method in helpers library

I tried to run the entire tutorials on colab using a different dataset.
I am getting error on "AttributeError: module ‘helpers’ has no attribute ‘visualize_langkit_metric’ "
Could you please help on this error.

1 Like

Hi @Jayabalambika_R

Welcome to the community.

This error is reporting that you are trying to import a method that doesn’t exists on the helpers package or it wasn’t defied before calling it

1 Like

Thank you for the reply. I have installed and imported the helpers package before calling it. Please visit this notebook link (Google Colab)
for the error. Maybe i am doing a wrong install of the package. Can you give me the correct installation name for pip install.
Thank you

Hi @Jayabalambika_R

I’m looking into the helpers.py file in order to understand this error and looks like the helpers.py file it is just a reference to another package.

This is the file:

import sys #This line is importing a package that handle the operation system methods.

sys.path.append('./extras') #This line of code adding the ./extra path to the main colab path but virtually

# This line is importing some kind of package that is stored on the ./extra path that was added before. 
from langkit_bounty_helpers import *

So, i’m not sure, but i think that the helpers method it is just a reference to other method that is is stored on the course envirioment.

Unfortunately the package the it is stored on the ./extra path on the course envirioment it is package that it is not available.

@Jayabalambika_R were u able to solve this issue? if yes how?

Actually as @elirod pointed out, there are references in the code to local packages which seems to be missing. I have not got any solution still for the same. please let me know if you find solution

1 Like

Havent got any solution as this package helpers seem to be old. any idea which directory did elirod find the helpers.py file?

I have got the files @Jayabalambika_R
dlai_helpers.zip (55.7 KB)

Thank you. will download this file and check if the code works

1 Like

Thank you for your help, @stimin

@elirod @stimin
AttributeError Traceback (most recent call last)

in <cell line: 1>()
----> 1 helpers.visualize_langkit_metric(
2 chats,
3 “prompt.has_patterns”
4 )

AttributeError: module ‘helpers’ has no attribute ‘visualize_langkit_metric’

i got this error running helpers.visualize_langkit_metric(
this code i am using above helper.py file in google colab

Can you guys worked on that part and suggest any solution?