API Reference#
This reference provides detailed documentation for all the features in FEAT
feat.detector module#
feat.data module#
feat.plotting module#
feat.utils module#
py-feat helper functions and variables
- feat.utils.flatten_list(data)#
Helper function to flatten a list of lists
- feat.utils.generate_coordinate_names(num_points=478)#
Generates a list of names for x, y, z coordinates for a given number of points.
- Parameters
num_points (int) – Number of points (478 in this case).
- Returns
List of coordinate names like [‘x_1’, ‘y_1’, ‘z_1’, …, ‘x_n’, ‘y_n’, ‘z_n’].
- Return type
list
- feat.utils.hf_hub_download_with_fallback(repo_id, filename, fallback_filename, cache_dir)#
Download
filenamefrom HuggingFace; on miss, downloadfallback_filename.Used to roll out new model file versions without breaking installs in the window between a code release and the artifact upload. Once the new file is reliably present on the hub, the fallback path is dead code; once the old file is removed, the fallback path errors. Both are good outcomes.
Returns the local path of whichever file was successfully downloaded.
- feat.utils.is_list_of_lists_empty(list_of_lists)#
Helper function to check if list of lists is empty
- feat.utils.set_torch_device(device='cpu')#
Helper function to set device for pytorch model