Utils
            check_file(path)
¶
    Checks if file present on local
Source code in openqdc/utils/io.py
              123 124 125  |  | 
            create_hdf5_file(hdf5_file_path)
¶
    Creates hdf5 file with fsspec
Source code in openqdc/utils/io.py
              179 180 181 182 183 184  |  | 
            get_conversion(in_unit, out_unit)
¶
    Utility function to get the conversion function between two units.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
in_unit | 
            
               The input unit  | 
            required | |
out_unit | 
            
               The output unit  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  Callable[[float], float]
             | 
            
               The conversion function  | 
          
Source code in openqdc/utils/units.py
              156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172  |  | 
            get_local_cache()
¶
    Returns the local cache directory. It creates it if it does not exist.
Returns:
| Name | Type | Description | 
|---|---|---|
str |             
                  str
             | 
            
               path to the local cache directory  | 
          
Source code in openqdc/utils/io.py
              48 49 50 51 52 53 54 55 56 57  |  | 
            get_remote_cache(write_access=False)
¶
    Returns the entry point based on the write access.
Source code in openqdc/utils/io.py
              60 61 62 63 64 65 66 67 68 69 70  |  | 
            load_hdf5_file(hdf5_file_path)
¶
    Loads hdf5 file with fsspec
Source code in openqdc/utils/io.py
              161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176  |  | 
            load_json(path)
¶
    Loads json file
Source code in openqdc/utils/io.py
              187 188 189 190  |  | 
            load_pkl(path, check=True)
¶
    Load pkl file
Source code in openqdc/utils/io.py
              151 152 153 154 155 156 157 158  |  | 
            makedirs(path, exist_ok=True)
¶
    Creates directory
Source code in openqdc/utils/io.py
              118 119 120  |  | 
            read_qc_archive_h5(raw_path, subset, energy_target_names, force_target_names=None)
¶
    Extracts data from the HDF5 archive file.
Source code in openqdc/utils/io.py
              288 289 290 291 292 293 294 295 296 297  |  | 
            save_pkl(file, path)
¶
    Saves pkl file
Source code in openqdc/utils/io.py
              134 135 136 137 138  |  | 
            set_cache_dir(d)
¶
    Optionally set the _OPENQDC_CACHE_DIR directory.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
d | 
            
                  str
             | 
            
               path to a local folder.  | 
            required | 
Source code in openqdc/utils/io.py
              35 36 37 38 39 40 41 42 43 44 45  |  |