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

add defaults to EnsembleTask #217

Closed

Conversation

Titousensei
Copy link
Contributor

Summary: Depends on D13441705

Differential Revision: D13706787

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 17, 2019
Titousensei added a commit to Titousensei/pytext that referenced this pull request Jan 26, 2019
Summary:
Pull Request resolved: facebookresearch#217

Depends on D13441705

Differential Revision: D13706787

fbshipit-source-id: a3d778ceb82440320abdc71466582d12ccf37343
Summary:
because fblearner is confused about types List[Union], we can't
give a default value to those Config parameters and we leave them empty.
That's a problem for gen_default_config, which relies on instanciating
components with default values. So those configs, like JointTextTask, can't
be used with gen_default_config.

This diff introduces a generic solution for Tasks like this (not for all
components, coming soon) by allowing each task to provide an optional
function "example_config" that returns a Config object with default values
suitable for gen_default_config. This default values for List[Union] should
be a list of each possible class of the union, to give a complete example
that users can edit at their convenience.

We solve the case of JointTextTask as an example. Other tasks will be solved
in following diffs.

Differential Revision: D13441705

fbshipit-source-id: 31b8e93879959c2fb9062bd6af55e37dd4170f6c
Summary:
Pull Request resolved: facebookresearch#217

Depends on D13441705

Reviewed By: m3rlin45

Differential Revision: D13706787

fbshipit-source-id: c521c55601a47b7672de96913756a409e0206fab
@Titousensei Titousensei deleted the export-D13706787 branch April 17, 2019 19:33
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants