human
I am working on the file "04_Times_Series/02.0 - TF ARRegressor - Experiment + CSV.ipynb".
The first task is:
b. Define Experiment Function
Can you write Python program for it?
 What is a the Python program you requested?
assistant
#Here is the Python program you requested.

def generate_experiment_fn(**experiment_args):
    
    train_input_fn = generate_input_fn(
        TRAIN_DATA_FILES,
        skip_header_lines=1,
        mode = tf.estimator.ModeKeys.TRAIN,
        batch_size=hparams.batch_size,
        windows_size = hparams.input_window_size + hparams.output_window_size
    )

    eval_input_fn = generate_input_fn(
        TRAIN_DATA_FILES,
        skip_header_lines=1,
        mode = tf.estimator.ModeKeys.EVAL,
        windows_size = hparams.input_window_size + hparams.output_window_size
    )

    def _experiment_fn(run_config, hparams):

        estimator = create_estimator(run_config, hparams)

        return tf.contrib.learn.Experiment(
            estimator,
            train_steps=hparams.training_steps,
            eval_steps=1,
            train_input_fn=train_input_fn,
            eval_input_fn=eval_input_fn,
            **experiment_args
        )

    return _experiment_fn