Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add the ability to pass parameter values to gen-default-config #856

Closed
wants to merge 1 commit into from

Conversation

Titousensei
Copy link
Contributor

pytext gen-default-config DocumentClassificationTask field_names=text,label column_mapping=a:1,b:2

When there's possible conflicts finding the exact parameter, you get a nice error message with the possible paths

pytext gen-default-config DocumentClassificationTask freeze=0
...
Exception: Multiple possibilities for freeze=1: task.model.embedding.freeze, task.model.representation.freeze, task.model.representation.lstm.freeze, task.model.decoder.freeze, task.model.output_layer.freeze

Choose the parameter you want by passing the unambiguous suffix of one of the paths

pytext gen-default-config DocumentClassificationTask decoder.freeze=0

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [ x] I have read the CONTRIBUTING document.
  • [ x] I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • [ x] All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 30, 2019
@Titousensei Titousensei force-pushed the cfg_param branch 2 times, most recently from 41975f1 to 7b498b8 Compare July 30, 2019 22:40
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@Titousensei has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@Titousensei has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Titousensei has updated the pull request. Re-import the pull request

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@Titousensei has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Titousensei has updated the pull request. Re-import the pull request

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@Titousensei has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

  > pytext gen-default-config DocumentClassificationTask field_names=text,label column_mapping=a:1,b:2

When there's possible conflicts finding the exact parameter, you get a nice error message with the possible paths

  > pytext gen-default-config DocumentClassificationTask freeze=0
  ...
  Exception: Multiple possibilities for freeze=1: task.model.embedding.freeze, task.model.representation.freeze, task.model.representation.lstm.freeze, task.model.decoder.freeze, task.model.output_layer.freeze

Choose the parameter you want by passing the unambiguous suffix of one of the paths

  > pytext gen-default-config DocumentClassificationTask decoder.freeze=0
@facebook-github-bot
Copy link
Contributor

@Titousensei has updated the pull request. Re-import the pull request

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@Titousensei has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Titousensei merged this pull request in a528c75.

@Titousensei Titousensei deleted the cfg_param branch August 27, 2019 18:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants