Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GodAI

Immerse yourself in an AI-driven literary universe where anything can happen. · By AWK

"pytorch" error

A topic by Bzrkrrr created Apr 29, 2021 Views: 1,274 Replies: 7
Viewing posts 1 to 2

I'm not sure if I'll get a reply on this considering how inactive the topics are unfortunately, but no matter how many times I re-install I seem to be getting the same error. If anyone has a fix for this, please let me know when you can. Thank you.

(+1)

Have you tried that godai.yml hack?

Thanks for the reply, I uninstalled the game a bit after making the post because I was beginning to lose hope, but after seeing your reply I decided to install it again to try out the fix. Strangely enough, I don't see the error anymore, and the AI server boots up just fine. The catch is, the AI won't generate any responses, instead giving an "Error in connection handler" message and then it gives various lines of code, afterwards it gets stuck on "Awaiting for input". When it gets stuck, I have the option to abort the AI, and after that despite trying to reroll or put in a new action nothing happens except for the same above code, error, and "Awaiting for input" being outputted.

(+1)

Did you edit the yml file before running the app first? On linux to trigger a reinstall of the transformer library after editing the yml file, I deleted the ~/godai/miniconda3 folder; I'm not sure where it goes on windows, but I think it's probably somewhere inside %appdata%\ ; even if you did edit before you first ran it, try doing that anyway, in case the uninstall didn't affect that folder during that initial try.

Sorry, but in what way would I edit the .yml file?

(1 edit) (+1)

Oh, sorry, I thought you had already found it since you didn't ask about it the first time I mentioned it.


Here, lemme quote an old reply of mine:


Looks like the game isn't compatible with the latest transformers library. While the game isn't fixed, looks like you can get it to work by making it install an older version of the library.
The way I got it to work was to first, delete the ~/godai/miniconda3 folder (that's on Linux, not sure where it would be on Windows, maybe somewhere inside %appdata%\ ?), to make the game reinstall the dependencies next launch. And then inside the GodAI install folder, go into  the APIs folder, and then in the TransformersAPI folder, and in there open the godai.yml file in a text editor (notepad or whatever) and change the last line from:
        - transformers
Into:
        - transformers==3.5.1 And make sure to make a backup before editing it just in case. And actually, just rename that folder I told you delete as well instead of outright deleting it just in case.
But like I said up top, this is just a sorta hacky way to get it to run; the ideal would be for the devs to update the code to be compatible with more modern versions of the transformers library.
ps: I've only tested this in Linux, dunno if there are any different steps required under Windows.


Alternatively, I've seen a suggestion to just replace the whole contents of the file with the following:

name: godai
channels:
    - conda-forge
    - pytorch
dependencies:
    - python=3.8.5
    - websockets
    - pytorch==1.6.0
    - torchvision==0.7.0
    - pip
    - pip:
        - transformers==3.2.0


I haven't tried with those values myself though.

And there may be some better info in the Discord channel, but I haven't gotten around making a Discord account yet to take a look there.

(+1)

I've tried using the latter code, and it works now. Thanks!

(+1)

:)