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 feature to optionally provide stats to trainer so number of examples can be determined dynamically #7734

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pritamdodeja
Copy link
Contributor

Enables the user to use number of examples information computed by StatisticsGen in their training code. Passing statistics to trainer enables the use of

splits = fn_args.num_examples.keys()                                                                                                                                                                  
training_examples = fn_args.num_examples['train']                                                                                                                                            
validation_examples = fn_args.num_examples['eval']

in

run_fn(fn_args: tfx.components.FnArgs):

The configuration of Trainer would look as follows:

trainer = Trainer(                                                                                                                                                                                          
    module_file=trainer_file,                                                                                                                                                                               
    examples=transform.outputs['transformed_examples'],                                                                                                                                                     
    transform_graph=transform.outputs['transform_graph'],                                                                                                                                                   
    schema=transform.outputs['post_transform_schema'],                                                                                                                                                      
    hyperparameters=tuner.outputs['best_hyperparameters'],                                                                                                                                                  
    statistics=statistics_gen.outputs['statistics'], #new
)

More details at:
#7700

Enables the user to use number of examples information computed by
StatisticsGen in their training code.  Passing statistics to trainer
enables the use of

fn_args.num_examples['train'] etc., in run_fn

More details at:
tensorflow#7700
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.

1 participant