<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Experiment Report</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
        <script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
    </head>
    <body>
        <section class="section">
            <div class="container">
                <a class="button is-primary" onclick="window.history.back()">Go back</a>
                <hr class="hr" />
                <h1 class="title is-3">Experiment Results Report</h1>
                <p class="subtitle is-3">
                    {{% import os %}}
                    {{% import datetime %}}
                    {{{{os.path.basename(config['package_path'])}}}}: {{{{datetime.datetime.now().isoformat()}}}}
                </p>

                <hr class="hr" />

                <p>Author: {{{{global_config.get_path("user.name")}}}}</p>
                <p>Email: <a href="mailto:{{{{global_config.get_path('user.email')}}}}">{{{{global_config.get_path("user.email")}}}}</a></p>

                <hr class="hr" />

                <h2 class="title is-4">Metrics</h2>
                <table class="table is-hoverable is-fullwidth is-striped">
                    <thead>
                        <tr>
                            <th>Metric</th>
                            <th>Value</th>
                        </tr>
                    </thead>
                    <tbody>
                        {{% for m_key, m_value in state.metrics.items() %}}
                        <tr>
                            <td>{{{{m_key}}}}</td>
                            <td>{{{{str(m_value)}}}}</td>
                        </tr>
                        {{% end %}}
                    </tbody>
                </table>

                <hr class="hr" />

                <h2 class="title is-4">Config</h2>
                <table class="table is-hoverable is-fullwidth is-striped">
                    <thead>
                        <tr>
                            <th>Key</th>
                            <th>Value</th>
                        </tr>
                    </thead>
                    <tbody>
                        {{% for key, value in config.get_dict().items() %}}
                        <tr>
                            <td>{{{{key}}}}</td>
                            <td>{{{{str(value)}}}}</td>
                        </tr>
                        {{% end %}}
                    </tbody>
                </table>

                <hr class="hr" />
                <p>Generated by <a href="https://github.com/a2i2/surround">Surround</a> v{{{{surround_version}}}}</p>
            </div>
        </section>
    </body>
</html>