-
Notifications
You must be signed in to change notification settings - Fork 78
Cannot import name 'Agent' from 'agent' #8
Comments
You need to build the C++ client first so you end up with a file like python/agent.cpython-37m-darwin.so (on OSX) ... from the root directory you could cd into client dir and cmake . && make (you are basically missing the lib python is "talking" to) |
I cloned and ran make as the readme says, the server itself starts up fine, indicating building worked afaik. Of note, I am running Arch Linux. Edit: I just re-read it I think I get what you mean
|
Looks similar to issue @ #5 ... either way obviously the agent did not build correctly so could not be imported (on the py side). Maybe dig around the pybind11 side if it's an issue on Arch Linux, https://github.com/pybind/pybind11/ |
I asked someone who uses pybind, they said as far as they know it's not them, and pointed at this https://stackoverflow.com/questions/2522299/c-catch-blocks-catch-exception-by-value-or-reference/2522311#2522311 |
It does look pretty similar to issue #5, what version of gcc are you using so that we can try to repro? |
9.1.0, but it also failed when I tried to use 7.4.1. You can fix the first couple errors and run into some entirely different (memory related?) errors if you do this in agent.cpp Replace:
with
|
Okay so: Make the change above, then
|
Thanks for the additional information! We just tried again from scratch to install the repo using the specified gcc on ubuntu and succeeded (as have others, on ubuntu and mac). So it seems likely that is specific to Arch Linux, which we don't currently support. However, we appreciate you continuing to solve the errors that are arising on your system and hope it will be helpful for others who run into similar ones! |
I mean, these errors should probably be resolved regardless, since the longer you wait the harder it will be to make this run on newer systems. Ubuntu releases every 6 months, remember, and is going to eventually update gcc. Edit: Realized I needed to install the Python Development Files. Flips table |
Also worth noting that on my Arch system and my Solus system, neither one can install the python requirements. Any tips? Edit: Previous edit was intended to go here. |
(Everything now compiles, but it still doesn't run) |
Progress, great! Yeah, if you can repro the problem on another system we'll keep trying to repro as well. I actually think you're pretty close, if you're using conda, try: From there, if it still doesn't work (depending on the error) I might suggest a path that uses anaconda + conda environments. Separately, we just updated our README to make this part easier, thanks for the feedback! |
My wording was imprecise, what I meant was "great, thanks for repro'ing on another system. Because you've demonstrated its a broader problem, its a supported issue and we'll keep working with you to fix it. Thank you for testing our project and finding and surfacing ways that we can improve it!" Did you get a chance to try the pip/conda install commands? |
I haven't had a chance to sit down and play with it again yet, no. Soon though! |
Thanks so much for keeping us updated! |
I can't get Conda to agree with my system, so ignoring that since it's still using the base env which whatever, I'm still unable to install all pacakges. https://paste.ubuntu.com/p/fYwN2kPvhv/ |
Ah, perhaps I'm missing something, my understanding was that as of your "(Everything now compiles, but it still doesn't run)" comment the only failure when you ran the bot was that Is the paste above from trying to start from scratch with conda? And if so, in your old setup where everything else was working, would you mind trying Then we can work through starting from scratch with conda if thats what your paste is from! Otherwise, what commands did you run to produce that paste? |
I copied the script in the readme into a .sh file and ran it, and it output that, after install conda (which annoyingly doesn't want to init no matter how many times I init it) I'm going to try installing torch manually in just a moment Edit: That worked, but the client is back at "No module named 'agent'" |
We were eventually able to repro this issue and have a fix. We're in the process of pushing the fix but if you would like to try it out before the push: First, update the requirements.txt file to contain the following:
Then, after making sure you have the dependencies listed in the "Dependencies" section, use conda to create a new env preloaded with the conda install deps and activate the env:
Then, install the rest of the deps with pip:
The versions specified above, installed in this order should work and solve the no module named agent issue (but let us know if this is not the case)! |
Hi @Krutonium , can you please confirm if the above instructions helped ? |
Sorry, I completely missed the notification - I'll give it a shot shortly. |
I started with a completely fresh clone and this is where it finished. |
This looks like the build didn't go through. |
Hi @Krutonium, we just did a push and I stepped through the new instructions in the README start to finish to ensure that they worked for me from a clean conda env and build. Would you please pull and then specifically do the instructions under "Python Requirements: Using a Conda Environment" through "Checking out the repo" (the curl and tar commands to get the model data files) and let me know if you're still getting the above error? If you're still getting the error, would you please also paste the output of a |
Hi @Krutonium , |
So this is where I am at now https://asciinema.org/a/nFExrEMeYhRr9sRI1TmFdPkXX It would seem the requirements are no longer functional, specifically
Also, the readme seems to be out of order, since you have to clone the repo before you have access to requirements.txt It also says to |
Hi @Krutonium , Glad to help here!
In the video, it looks like some objects are skipped because your git lfs is not properly installed. e.g.:
Try run
You are right. You can do
It should be |
https://asciinema.org/a/Yp1M9qcJ987lnAXwX7AFgY7fm How does this look? |
Hi @Krutonium , it seems like an anaconda linker issue. Please refer pytorch/pytorch#16683 (comment) to see if it solves your problem. Related issues: |
Hi @Krutonium ! |
Hi @Krutonium ! |
Am I being boneheaded or am I doing somthing wrong?
The text was updated successfully, but these errors were encountered: