Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking specific environment variables #17

Closed
eyalto opened this issue Jun 30, 2019 · 10 comments
Closed

Tracking specific environment variables #17

eyalto opened this issue Jun 30, 2019 · 10 comments
Labels
Feature Request Feature Request - Support w/ :+1: reaction

Comments

@eyalto
Copy link
Contributor

eyalto commented Jun 30, 2019

Is there a way to provide a default list of environment variables that are not part of args that are tracked along with the experiment ?
If not can you add this as feature request ?

@bmartinn
Copy link
Member

bmartinn commented Jul 1, 2019

@eyalto How about this one (it will work in tandem with ArgParse, absl etc.):
(it is basically another set of parameters dictionary, we connect with the experiment/task)

import os
from trains import Task
task = Task.init(project_name='examples', task_name='os environment example')
task.connect({k: os.environ.get(k) for k in ['PATH', 'PWD', 'PYTHONPATH']})

@eyalto
Copy link
Contributor Author

eyalto commented Jul 1, 2019

@bmartinn -

This indeed results in the same effect but I was looking for a mechanism that is external to the code that can be configured somehow externally and minimises the footprint in the code
.
This would be a way to track instrumentation of the external environment to the training job.
Things like dedicated links to additional tools (like job-id or link to the container running the training job - or other resources generated by the external environment)

I will take your advise and implement such mechanism inside our code - but it may be useful for other users / developers as well - if this is indeed the case ....

@bmartinn bmartinn transferred this issue from allegroai/clearml-server Jul 1, 2019
@bmartinn bmartinn added the Feature Request Feature Request - Support w/ :+1: reaction label Jul 1, 2019
@bmartinn
Copy link
Member

bmartinn commented Jul 1, 2019

@eyalto thank you for the feature suggestion.
Here is what I was thinking:

$ export TRAINS_LOG_ENVIRONMENT=
(default) TRAINS does not log OS environment variables

$ export TRAINS_LOG_ENVIRONMENT="PWD,PYTHONPATH"
Will result in TRAINS logging values of both PWD and PYTHONPATH

$ export TRAINS_LOG_ENVIRONMENT="*"
Will result in TRAINS logging values of ALL environment variables

Is that what you had in mind?

@eyalto
Copy link
Contributor Author

eyalto commented Jul 1, 2019 via email

@bmartinn
Copy link
Member

@eyalto, the feature is included in the latest release v0.10.2 exactly as suggested.

@shaulimaya
Copy link

Hey!
Thanks for the feature!
I already start using it, but I think that this is a little bit strange that the env params are under HYPER PARAMETERS
Maybe we can find other place for it?
Env params?

@bmartinn
Copy link
Member

@shaulimaya great to hear you are already using this feature.
Yes, in the next version we will have a separate section for Environment Variables, until then they are under Hyper-Parameters.

@shaulimaya
Copy link

Thanks a lot!
Another small thing - if you can render links "http://blabla" as link
:)

@bmartinn
Copy link
Member

@shaulimaya not sure security wise, this is recommended :)

@bmartinn
Copy link
Member

Closing, feature is now available in 0.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Feature Request - Support w/ :+1: reaction
Projects
None yet
Development

No branches or pull requests

3 participants