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

Add a method to list the name of the parameters for a flow. #143

Merged
merged 3 commits into from
Mar 6, 2020

Conversation

romain-intel
Copy link
Contributor

@romain-intel romain-intel commented Feb 25, 2020

Addresses #137 .

You can now do:
for name in current.parameter_names:
print('I have a parameter %s with a value of %s' % (name, getattr(self, name)))

You can now do:
for name in self.parameters:
  print('I have a parameter %s with a value of %s' % (name, getattr(self, name)))
@romain-intel romain-intel self-assigned this Mar 2, 2020
metaflow/current.py Outdated Show resolved Hide resolved
@romain-intel
Copy link
Contributor Author

romain-intel commented Mar 3, 2020 via email

return self._parameter_names
raise RuntimeError("Parameter names not set")

@parameter_names.setter
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@romain-intel use current._update_env for setting parameters

@romain-intel romain-intel merged commit 6a6fa91 into master Mar 6, 2020
@savingoyal savingoyal deleted the list_parameter_names branch March 6, 2020 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants