Open OhhTuRnz opened 1 week ago
Hi @OhhTuRnz ,
I might need a bit more detail to help debug. Is there a specific error message you can share? What pip command are you using to try to install kspdg or your fork of kspdg?
As a possible alternate approach: when I want to develop agents to be tested in kspdg, I create a new repository for the agents that depends on this repo, but does not clone/modify this repo. For example, I could create a new repo called ohhturnz-agents with a conda environment.yml file to create a conda environment called ohhturnz_agents. Then in that conda environment, I would install the kspdg dependency with a command like
conda activate ohhturnz_agents
pip install git+ssh://git@github.com/mit-ll/spacegym-kspdg.git
Then my new repo only contains code for creating agents to be tested in kspdg scenarios and does not contain the kspdg scenario code
Hi @rallen10,
Thanks for your rapid response.
Yes, the problem raises in serverless tests, and is this:
ERROR tests/serverless_tests/test_jl_solvers.py - NameError: name '__lg3_envs_module' is not defined Module kspdg.private_src.python3_12.Windows_x86_64.kspdg_envs.lbg1.lg3_envs not found.
I think it just doesn't detect the installed kspdg module or some of its dependencies (maybe because of relative path names?).
Anyway, your solution makes sense so I will try that.
When installing the conda environment with your repo, all tests pass, and I can switch to my own agents using that environment. However, I can only load the environment for my agents if I first run your hello agent. Otherwise, it throws an error where the init method for my env fails to load.
Is that because we need to reset the environment before loading?
Per your error message: I don't believe it should be using relative paths based on the directory structure, exactly. Rather it should be using "relative python modules", which are closely related to the directory structure, but not identical. In other words, I think you should be able to make a fork of spacegym-kspdg
and change the top-level directory name, and the imports should still work as long as you keep src/kspdg
named the same thing.
The fact that you are getting this error specifically for lg3_envs
is interesting, though, and probably hints at some other/underlying problem. lg3_envs
are the obfuscated code that was generated using pyarmor
and require a lot of special handling in order to work across platforms (windows, mac, linux) and python versions (3.9, 3.12, and I'm working on 3.13). I'm guessing there is something about the special handling of the obfuscated code that is causing the problem.
Per your commend on loading environments: that sounds strange to me. I would need to see your code and how you are loading the environment. You should not need to run my hello-kspdg agent first; you should be able to use that agent as a template for creating your own agent and run it on its own: https://github.com/mit-ll/spacegym-kspdg?tab=readme-ov-file#example-agent-environment-runner
Hi! Thank you for all your work.
I find problems with the installation of kspdg with pip install using julia if the folder and repository where I install kspdg is not exactly the one cloned from this repository. We wanted to upload this repo in a private repo from our organization to start developing there. Any idea on how to solve this? I am thinking on installing kspdg using this repository and then using the other repository with the environment created from here.
Thank you in advance.