gmucsn / mTree

Computational Experimental Economics Platform
5 stars 2 forks source link

Getting info from config to environment #32

Open antoniohramirez opened 5 years ago

antoniohramirez commented 5 years ago

How can environment access information from the conifg json file that's not in the properties dictionary? In particular, we want to take the ID from the config for logging purposes

skunath commented 5 years ago

It's injected as well. You should be able to get it from the "simulation_id" property.

On Tue, Jul 23, 2019 at 2:10 PM antoniohramirez notifications@github.com wrote:

How can environment access information from the conifg json file that's not in the properties dictionary? In particular, we want to take the ID from the config for logging purposes

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gmucsn/mTree/issues/32?email_source=notifications&email_token=AABDF3FPCFJZC7G2ACLCJZLQA4GMZA5CNFSM4IGE26CKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HA54LBQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDF3AQWPRPCTCDKQRX3P3QA4GMZANCNFSM4IGE26CA .

antoniohramirez commented 5 years ago

Do you mean using the get_property() method? That works for getting the properties we injected, but it's not working for getting the simulation_id -- it's not stored with the other properties in the json config file

skunath commented 5 years ago

Were you able to try? My point is that it injects that property regardless of it being in the properties hash.

If it doesn't, you might want to pull the latest mTree code as it's included in the dispatcher there.

On Tue, Jul 23, 2019 at 2:55 PM antoniohramirez notifications@github.com wrote:

Do you mean using the get_property() method? That works for getting the properties we injected, but it's not working for getting the simulation_id -- it's not stored with the other properties in the json config file

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gmucsn/mTree/issues/32?email_source=notifications&email_token=AABDF3EIPIEMRRFX3LE6DJTQA4LWTA5CNFSM4IGE26CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2TMPYQ#issuecomment-514246626, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDF3HV5A6MXJ4KR4Y2WL3QA4LWTANCNFSM4IGE26CA .

antoniohramirez commented 5 years ago

I've pulled the latest version of mTree, but the id still isn't being injected

skunath commented 5 years ago

print out the content of this in the environment: self.mtree_properties

On Tue, Jul 23, 2019 at 7:29 PM antoniohramirez notifications@github.com wrote:

I've pulled the latest version of mTree, but the id still isn't being injected

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gmucsn/mTree/issues/32?email_source=notifications&email_token=AABDF3DPCJNFKTZZYCPSBKDQA5LYHA5CNFSM4IGE26CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UF2JY#issuecomment-514350375, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDF3BHTFWO2V3EFHVWG4TQA5LYHANCNFSM4IGE26CA .