{"id":18753029,"url":"https://github.com/spotify/tfreader","last_synced_at":"2025-04-13T06:14:01.630Z","repository":{"id":39756010,"uuid":"237092180","full_name":"spotify/tfreader","owner":"spotify","description":"TensorFlow TFRecord reader CLI tool","archived":false,"fork":false,"pushed_at":"2024-08-19T20:49:25.000Z","size":1084,"stargazers_count":61,"open_issues_count":21,"forks_count":16,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-13T06:13:53.788Z","etag":null,"topics":["cats","cli","fs2","graal-native","scala","tensorflow","tfrecords"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spotify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-29T22:08:41.000Z","updated_at":"2024-09-16T19:42:25.000Z","dependencies_parsed_at":"2024-02-24T17:29:14.120Z","dependency_job_id":"9039a015-dc59-4e19-9336-457e9a79b5b7","html_url":"https://github.com/spotify/tfreader","commit_stats":{"total_commits":573,"total_committers":7,"mean_commits":81.85714285714286,"dds":"0.22513089005235598","last_synced_commit":"cdbff9a8a0a7184252a0c45a366db307f3cd8b98"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Ftfreader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Ftfreader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Ftfreader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Ftfreader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spotify","download_url":"https://codeload.github.com/spotify/tfreader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670435,"owners_count":21142904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cats","cli","fs2","graal-native","scala","tensorflow","tfrecords"],"created_at":"2024-11-07T17:23:53.263Z","updated_at":"2025-04-13T06:14:01.612Z","avatar_url":"https://github.com/spotify.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tfreader [![build](https://github.com/spotify/tfreader/actions/workflows/build.yml/badge.svg)](https://github.com/spotify/tfreader/actions/workflows/build.yml)\n\nSimple native CLI tool to read `TensorFlow` `TFRecords`.\n\n## Install\n\n### MacOs\n\n```bash\nbrew tap spotify/public\nbrew install tfreader\n```\n\n### Linux\n\nRight now we only have binaries available under [releases](https://github.com/spotify/tfreader/releases)\n\n## Usage\n\n```bash\nUsage: tfr [options] \u003cfiles? | STDIN\u003e\nTensorFlow TFRecord reader CLI tool\nOptions:\n\n  -c, --check-crc32     Enable checks CRC32 on each record\n  -f, --flat            Output examples as flat JSON objects\n  -n, --number  \u003carg\u003e   Number of records to output\n  -r, --record  \u003carg\u003e   Record type to be read { example | prediction_log }\n  -h, --help            Show help message\n\n trailing arguments:\n  files (not required)   files? | STDIN\n```\n\n## Examples\n\n#### Google Cloud Storage\n\n```bash\ntfr -n 1 gs://\u003cbucket\u003e/\u003cpath\u003e/part-00000-of-00004.tfrecords | jq .\n```\n\n#### Local Filesystem\n\n```bash\ntfr -n 1 core/src/test/resources/part-00000-of-00004.tfrecords | jq .\n```\n\n#### `stdin`\n\n```bash\ncat core/src/test/resources/part-00000-of-00004.tfrecords | tfr -n 1 | jq .\n```\n\n### Output\n\n#### Flat\n\n```json\n{\n  \"tips\": [0],\n  \"trip_seconds\": [60],\n  \"payment_type\": [\"Cash\"],\n  \"trip_miles\": [0],\n  \"dropoff_longitude\": [-87.63785],\n  \"dropoff_latitude\": [41.893215],\n  \"pickup_longitude\": [-87.63187],\n  \"pickup_latitude\": [41.89204],\n  \"trip_start_timestamp\": [1402934400],\n  \"trip_start_day\": [2],\n  \"trip_start_hour\": [16],\n  \"trip_start_month\": [6],\n  \"fare\": [3.25],\n  \"dropoff_census_tract\": [\"17031081800\"],\n  \"dropoff_community_area\": [\"8\"],\n  \"pickup_community_area\": [\"8\"],\n  \"trip_id\": [\"8106c1f6-e6f3-426f-9aaf-b4e9703b4f10\"]\n}\n```\n\n#### Default\n\n```json\n{\n  \"features\": {\n    \"feature\": {\n      \"tips\": {\n        \"floatList\": {\n          \"value\": [0]\n        }\n      },\n      \"trip_seconds\": {\n        \"int64List\": {\n          \"value\": [60]\n        }\n      },\n      \"payment_type\": {\n        \"bytesList\": {\n          \"value\": [\"Cash\"]\n        }\n      },\n      \"trip_miles\": {\n        \"floatList\": {\n          \"value\": [0]\n        }\n      },\n      \"dropoff_longitude\": {\n        \"floatList\": {\n          \"value\": [-87.63785]\n        }\n      },\n      \"dropoff_latitude\": {\n        \"floatList\": {\n          \"value\": [41.893215]\n        }\n      },\n      \"pickup_longitude\": {\n        \"floatList\": {\n          \"value\": [-87.63187]\n        }\n      },\n      \"pickup_latitude\": {\n        \"floatList\": {\n          \"value\": [41.89204]\n        }\n      },\n      \"trip_start_timestamp\": {\n        \"int64List\": {\n          \"value\": [1402934400]\n        }\n      },\n      \"trip_start_day\": {\n        \"int64List\": {\n          \"value\": [2]\n        }\n      },\n      \"trip_start_hour\": {\n        \"int64List\": {\n          \"value\": [16]\n        }\n      },\n      \"trip_start_month\": {\n        \"int64List\": {\n          \"value\": [6]\n        }\n      },\n      \"fare\": {\n        \"floatList\": {\n          \"value\": [3.25]\n        }\n      },\n      \"dropoff_census_tract\": {\n        \"bytesList\": {\n          \"value\": [\"17031081800\"]\n        }\n      },\n      \"dropoff_community_area\": {\n        \"bytesList\": {\n          \"value\": [\"8\"]\n        }\n      },\n      \"pickup_community_area\": {\n        \"bytesList\": {\n          \"value\": [\"8\"]\n        }\n      },\n      \"trip_id\": {\n        \"bytesList\": {\n          \"value\": [\"8106c1f6-e6f3-426f-9aaf-b4e9703b4f10\"]\n        }\n      }\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Ftfreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspotify%2Ftfreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Ftfreader/lists"}