Coder Social home page Coder Social logo

Comments (1)

aabhi02 avatar aabhi02 commented on July 22, 2024

if the datasets are being loaded from the dspy.datasets module then why not gsm8k dataset can be loaded in the same manner as others. And also GSM8k does not inherit from the class Dataset if I try to change it to be child class of the Dataset class i am encountering the following error

AttributeError                            Traceback (most recent call last)
Cell In[2], [line 1](vscode-notebook-cell:?execution_count=2&line=1)
----> [1](vscode-notebook-cell:?execution_count=2&line=1) dataset = GSM8K()
      [3](vscode-notebook-cell:?execution_count=2&line=3) print(dataset.train)

File ~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:62, in GSM8K.__init__(self, *args, **kwargs)
     [56](https://file+.vscode-resource.vscode-cdn.net/media/jayanth/DATA/Naanu/practice/DSPy/~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:56) testset = [dspy.Example(**x).with_inputs('question') for x in testset]
     [58](https://file+.vscode-resource.vscode-cdn.net/media/jayanth/DATA/Naanu/practice/DSPy/~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:58) # print(f"Trainset size: {len(trainset)}")
     [59](https://file+.vscode-resource.vscode-cdn.net/media/jayanth/DATA/Naanu/practice/DSPy/~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:59) # print(f"Devset size: {len(devset)}")
     [60](https://file+.vscode-resource.vscode-cdn.net/media/jayanth/DATA/Naanu/practice/DSPy/~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:60) # print(f"Testset size: {len(testset)}")
---> [62](https://file+.vscode-resource.vscode-cdn.net/media/jayanth/DATA/Naanu/practice/DSPy/~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:62) self.train = trainset
     [63](https://file+.vscode-resource.vscode-cdn.net/media/jayanth/DATA/Naanu/practice/DSPy/~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:63) self.dev = devset
     [64](https://file+.vscode-resource.vscode-cdn.net/media/jayanth/DATA/Naanu/practice/DSPy/~/anaconda3/envs/dspy/lib/python3.10/site-packages/dspy/datasets/gsm8k.py:64) self.test = testset

AttributeError: can't set attribute 'train'

and i am not getting why is this error being thrown

from dspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.