{"id":10280,"library":"tbparse","title":"tbparse","description":"tbparse is a Python library that allows users to load TensorBoard event logs directly into pandas DataFrames. It provides an easy way to read, parse, and plot TensorBoard data, simplifying analysis for machine learning experiments. The current version is 0.0.9, and the library maintains an active release cadence with frequent updates and bug fixes.","status":"active","version":"0.0.9","language":"en","source_language":"en","source_url":"https://github.com/j3soon/tbparse","tags":["tensorboard","pandas","data-analysis","machine-learning","logging","experiment-tracking"],"install":[{"cmd":"pip install tbparse","lang":"bash","label":"Install tbparse"}],"dependencies":[{"reason":"Core dependency for DataFrame operations.","package":"pandas","optional":false},{"reason":"Optional dependency for full support of all event types (e.g., images, audio, older tensor formats), though tbparse can parse many types without it as of v0.0.9.","package":"tensorflow","optional":true}],"imports":[{"symbol":"SummaryReader","correct":"from tbparse import SummaryReader"}],"quickstart":{"code":"import os\nfrom tbparse import SummaryReader\n\n# Create a dummy log directory for demonstration\nlog_dir = './logs/example_run'\nif not os.path.exists(log_dir):\n    os.makedirs(log_dir)\n    # In a real scenario, TensorBoard logs would be generated here\n    # For this quickstart, we'll assume logs exist or will be generated later\n\n# Example usage:\n# Replace 'path/to/your/log_dir' with your actual TensorBoard log directory\ntry:\n    reader = SummaryReader(log_dir)\n    df = reader.scalars\n    print(\"Scalars DataFrame (first 5 rows):\")\n    print(df.head())\n\n    if not df.empty:\n        # Access specific columns\n        print(f\"\\nAvailable tags: {df['tag'].unique()}\")\nexcept FileNotFoundError:\n    print(f\"Warning: Log directory '{log_dir}' not found or empty. Please ensure TensorBoard logs are present.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"Initialize a SummaryReader with your TensorBoard log directory and access event types like 'scalars' or 'histograms' as pandas DataFrames. The example includes a basic check for log directory existence."},"warnings":[{"fix":"Upgrade Python to 3.8 or newer. Alternatively, pin `tbparse<0.0.9` in your `requirements.txt` if using Python 3.7.","message":"Python 3.7 support has been dropped starting from `tbparse` v0.0.9. Users on Python 3.7 will need to upgrade their Python version or use an older `tbparse` version.","severity":"breaking","affected_versions":">=0.0.9"},{"fix":"Review your usage of `event_types` in `SummaryReader`'s constructor or `read()` method. Consult the official documentation for the updated filtering semantics.","message":"The behavior of the `event_types` parameter for `SummaryReader` was changed in v0.0.7. This might lead to unexpected filtering or empty results if you relied on the old behavior.","severity":"breaking","affected_versions":">=0.0.7"},{"fix":"Update your code to use the unified `histogram` API as described in the `tbparse` documentation. Check for methods that might have been deprecated or renamed.","message":"The `histogram` API was unified in v0.0.6. If you were using specific methods or parameters for histograms prior to this version, your code might break.","severity":"breaking","affected_versions":">=0.0.6"},{"fix":"If you encounter errors parsing specific event types or expect more data than you receive, try installing `tensorflow` alongside `tbparse` (`pip install tensorflow`).","message":"While `tbparse` can parse many event types without `tensorflow` (especially after v0.0.9), full functionality for complex events like images, audio, or older tensor formats might still require `tensorflow` to be installed.","severity":"gotcha","affected_versions":"all"},{"fix":"Check the `SummaryReader` constructor's parameters in the `tbparse` documentation and update your instantiation calls accordingly.","message":"The parameters for `SummaryReader` were clarified and potentially changed in v0.0.3. This could affect code that directly instantiated `SummaryReader` with specific arguments in older versions.","severity":"breaking","affected_versions":">=0.0.3"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Install `pandas` using `pip install pandas`.","cause":"The `pandas` library, which `tbparse` relies on for DataFrame operations, is not installed in your environment.","error":"ModuleNotFoundError: No module named 'pandas'"},{"fix":"Verify that the path to your TensorBoard log directory is correct and that it contains `.tfevents` files generated by TensorBoard. Ensure `SummaryReader` points to the *parent* directory containing the run subdirectories, or directly to a run directory.","cause":"The specified log directory for `SummaryReader` does not exist or is inaccessible. This could also mean the directory is empty or does not contain valid TensorBoard event files.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'path/to/your/log_dir'"},{"fix":"Install `tensorflow` in your environment (`pip install tensorflow`). Ensure it's a compatible version with your Python setup. `tbparse` v0.0.9 includes some parsing without `tensorflow`, but for full coverage, it's often needed.","cause":"This error typically occurs when trying to parse image or audio events without the `tensorflow` library installed, or with a `tensorflow` version mismatch that prevents the necessary operations.","error":"tensorflow.errors.NotFoundError: No OpKernel was registered to support Op 'DecodePng'"},{"fix":"Consult the `tbparse` documentation for `SummaryReader` to understand the updated `event_types` parameter behavior and adjust your code accordingly. You might need to refine your filtering logic.","cause":"You are likely using `tbparse` v0.0.7 or newer, and your code is still relying on the deprecated behavior of the `event_types` parameter in `SummaryReader`.","error":"TypeError: 'event_types' parameter changed its behavior. Please check the documentation."}]}