Computational-Content-Analysis-2020 / frequently-asked-questions

Repo to ask questions and see answers
2 stars 0 forks source link

HW3 import issues #8

Closed sanittawan closed 4 years ago

sanittawan commented 4 years ago

Hi! I ran into AttributeError when I tried to generate the toy data set.

Here's what I ran:

dfTrain, dfTest = lucem_illud_2020.trainTestSplit(lucem_illud_2020.xorSplit(noise)) #Please try this one

Here's the error message:

AttributeError: module 'lucem_illud_2020' has no attribute 'trainTestSplit'

I got around this by running

import lucem_illud_2020.proccessing import lucem_illud_2020.cartoons

Then,

dfTrain, dfTest = lucem_illud_2020.proccessing.trainTestSplit(lucem_illud_2020.cartoons.targetSplit(noise))

Which fixed the issue. However, is this supposed to be the way? Or is there a better way to import all submodules at once? (I tried from lucem_illud_2020 import * but it didn't work)

bhargavvader commented 4 years ago

@sanittawan , that's odd - I've set up the code so that you wouldn't need to do that... your workaround is 100% a correct way to do things too, though. I'm going to troubleshoot more. Is this on your local or on RCC? I tried it on RCC and it worked. Just checking to see if I need to have a look at that too.

sanittawan commented 4 years ago

resolved in class. Thanks!