pyrddlgym-project / pyRDDLGym

A toolkit for auto-generation of OpenAI Gym environments from RDDL description files.
https://pyrddlgym.readthedocs.io/
MIT License
67 stars 17 forks source link

Need to decide what standalone domains go in rddlrepository and which in pyrddlgym (assuming there will be in pyrddlgym) #242

Closed mike-gimelfarb closed 8 months ago

ssanner commented 9 months ago

A lot of people are going to work with their own locally defined domains and never touch rddlrepo outside of running the canned examples. So we need to support this and having built-in examples in PyRDDLGym to demonstrate it makes sense.

Sorry about the "load from string" suggestion, I thought our tutorial Colab's did this (they allow domain modification as a string), but I gather by the discussion that you're saving the file to disk. It won't kill me if we have to do that... it's not something we're doing 1000 times per second.

On Sun, Feb 4, 2024 at 11:51 PM Mike Gimelfarb @.***> wrote:

In any case, I am suggesting we make the api as simple as possible with the least effort on the user's side. Then, if the user needs more than make(), e.g. mainly to register their own domains, then they have the rddlrepo api at their disposal. Even so, the user can register their own domain, then call make() on it.

— Reply to this email directly, view it on GitHub https://github.com/ataitler/pyRDDLGym/issues/242#issuecomment-1926228179, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRA3JHTRUCFUYK77YUGUJ3YSBQNTAVCNFSM6AAAAABCZK3OCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRWGIZDQMJXHE . You are receiving this because you were mentioned.Message ID: @.***>

ataitler commented 9 months ago

I am not sure I agree with these groups, but in any case, I think this discussion is really diverging... I say we dont "register", we work with path because we can (unlike gym who has python code for envs). User should have two option from the pyrddlgym perspective:

  1. load example. make(example=name) few carefully chosen examples, loaded from rddlrepo in the background (not by the user)
  2. load path. make(domain=path, instance=path), this should cover every other option, and it worked until now and with no complaints.

you want to add content strings, I think it is ugly but if you think this is the most important thing we need to do, it can be added.

ataitler commented 9 months ago

About re-naming everything in rddlrepo please lets have an organized discussion about it and not like this.

mike-gimelfarb commented 9 months ago

Scott: I agree it is just feature bloat at the moment. Nothing wrong with saving to disk and loading in 99.5% of the cases. Let Ayal: So I agree with all of this, except, for 1 you need example =name. You can just do make(domain=, instance=). The domain name and instance should match what is in rddlrepo. If the user names are good in rddlrepo, there is no need to distinguish examples in pyrddlgym vs rddlrepo.

This way, we can say in the documentation, "domain and instance must be valid names in rddlrepo (point to table of supported domains + instances, which we need)." Otherwise, you need two tables, one to list what is considered a valid example from POV of pyrddlgym, and one to list what is valid from rddlrepo. 99% of users will be running a specific domain they need, not a random domain. So rddlrepo domains will be critical regardless of the user.

ataitler commented 9 months ago

I dont see any reason why the user should specify "wildfire_MDP_IPPC2011" when he has no idea (probably) what is IPPC and only wants to do a quick make("wildfire").. if by coincidence the names of the problems we want as example have nice names in rddlrepo, then fine we can use them, else we can do this mapping for the 5 exapmle, which makes more sense than refactoring completely rddlrepo.

mike-gimelfarb commented 9 months ago

Yes, so in rddlrepo, we add wildfire, or we use the domains that already have nice names. I don't like mapping things through dict, it will break at one point.

ataitler commented 9 months ago

OK lets do zoom, this is not a design meeting.

ataitler commented 9 months ago

tomorrow please.

mike-gimelfarb commented 9 months ago

Sure, let's chat on slack about timing.

haz commented 9 months ago

popcorn

mike-gimelfarb commented 8 months ago

This issue will be closed upon merging pyrddlgym-v2 branch. All domains removed from pyrddlgym and rddlrepository is now mandatory.