diff --git a/_config.yaml b/_config.yaml new file mode 100644 index 0000000..19a0deb --- /dev/null +++ b/_config.yaml @@ -0,0 +1 @@ +include: ["_sources", "_static"] diff --git a/_sources/api.rst.txt b/_sources/api.rst.txt new file mode 100644 index 0000000..f461195 --- /dev/null +++ b/_sources/api.rst.txt @@ -0,0 +1,14 @@ +.. _api-label: + +TorchFort API +============= + +The following sections describe the types and functions available in the TorchFort library for C/C++ and Fortran programs and +the also the configuration file structure and available options. + +.. toctree:: + + api/config + api/c_api + api/f_api + diff --git a/_sources/api/c_api.rst.txt b/_sources/api/c_api.rst.txt new file mode 100644 index 0000000..725dfaa --- /dev/null +++ b/_sources/api/c_api.rst.txt @@ -0,0 +1,277 @@ +.. _torchfort_api_c-ref: + +############### +TorchFort C API +############### + +These are all the types and functions available in the TorchFort C API. + +******* +General +******* + +Types +----- + +.. _torchfort_datatype_t-ref: + +torchfort_datatype_t +____________________ +.. doxygenenum :: torchfort_datatype_t + +------ + +.. _torchfort_result_t-ref: + +torchfort_result_t +__________________ +.. doxygenenum :: torchfort_result_t + +------ + +Global Context Settings +------------------------ + +These are global routines which affect the behavior of the libtorch backend. It is therefore recommended to call these functions before any other TorchFort calls are made. + +.. _torchfort_set_cudnn_benchmark-ref: + +torchfort_set_cudnn_benchmark +_____________________________ +.. doxygenfunction:: torchfort_set_cudnn_benchmark + + +.. _torchfort_general_c-ref: + +******************* +Supervised Learning +******************* + +Model Creation +----------------------------------- + +.. _torchfort_create_model-ref: + +torchfort_create_model +______________________ +.. doxygenfunction:: torchfort_create_model + +------ + +.. _torchfort_create_distributed-model-ref: + +torchfort_create_distributed_model +__________________________________ +.. doxygenfunction:: torchfort_create_distributed_model + +------ + +Model Training/Inference +----------------------------------- + +.. _torchfort_train-ref: + +torchfort_train +_______________ +.. doxygenfunction:: torchfort_train + +------ + +.. _torchfort_inference-ref: + +torchfort_inference +___________________ +.. doxygenfunction:: torchfort_inference + +------ + +Model Management +---------------- + +.. _torchfort_save_model-ref: + +torchfort_save_model +____________________ +.. doxygenfunction:: torchfort_save_model + +------ + +.. _torchfort_load_model-ref: + +torchfort_load_model +____________________ +.. doxygenfunction:: torchfort_load_model + +------ + +.. _torchfort_save_checkpoint-ref: + +torchfort_save_checkpoint +_________________________ +.. doxygenfunction:: torchfort_save_checkpoint + +------ + +.. _torchfort_load_checkpoint-ref: + +torchfort_load_checkpoint +_________________________ +.. doxygenfunction:: torchfort_load_checkpoint + +------ + +Weights and Biases Logging +-------------------------- + +.. _torchfort_wandb_log_int-ref: + +torchfort_wandb_log_int +_______________________ +.. doxygenfunction:: torchfort_wandb_log_int + +------ + +.. _torchfort_wandb_log_float-ref: + +torchfort_wandb_log_float +_________________________ +.. doxygenfunction:: torchfort_wandb_log_float + +------ + +.. _torchfort_wandb_log_double-ref: + +torchfort_wandb_log_double +__________________________ +.. doxygenfunction:: torchfort_wandb_log_double + +------ + +.. _torchfort_rl_c-ref: + +********************** +Reinforcement Learning +********************** + +System Creation +----------------------------------- + +Basic routines to create and register a reinforcement learning system in the internal registry. A (synchronous) data parallel distributed option is available. + +.. _torchfort_rl_off_policy_create_system-ref: + +torchfort_rl_off_policy_create_system +_____________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_create_system + +------ + +.. _torchfort_rl_off_policy_create_distributed_system-ref: + +torchfort_rl_off_policy_create_distributed_system +_________________________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_create_distributed_system + +------ + +Training/Evaluation +----------------------------------------- + +These routines are used for training the reinforcement learning system or for steering the environment. + +.. _torchfort_rl_off_policy_train_step-ref: + +torchfort_rl_off_policy_train_step +__________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_train_step + +------ + +.. _torchfort_rl_off_policy_predict_explore-ref: + +torchfort_rl_off_policy_predict_explore +_______________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_predict_explore + +------ + +.. _torchfort_rl_off_policy_predict-ref: + +torchfort_rl_off_policy_predict +_______________________________ +.. doxygenfunction:: torchfort_rl_off_policy_predict + +------ + +.. _torchfort_rl_off_policy_evaluate-ref: + +torchfort_rl_off_policy_evaluate +________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_evaluate + +------ + +System Management +----------------- + +The purpose of these routines is to manage the reinforcement learning systems internal data. It allows the user to add tuples to the replay buffer and query the system for readiness. Additionally, save and restore functionality is also provided. + +.. _torchfort_rl_off_policy_update_replay_buffer-ref: + +torchfort_rl_off_policy_update_replay_buffer +____________________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_update_replay_buffer + +------ + +.. _torchfort_rl_off_policy_is_ready-ref: + +torchfort_rl_off_policy_is_ready +________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_is_ready + +------ + +.. _torchfort_rl_off_policy_save_checkpoint-ref: + +torchfort_rl_off_policy_save_checkpoint +_______________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_save_checkpoint + +------ + +.. _torchfort_rl_off_policy_load_checkpoint-ref: + +torchfort_rl_off_policy_load_checkpoint +_______________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_load_checkpoint + +------ + + +Weights and Biases Logging +-------------------------- + +The reinforcement learning system performs logging for all involved networks automatically during training. The following routines are provided for additional logging of system relevant quantities, such as e.g. the accumulated reward. + +.. _torchfort_rl_off_policy_wandb_log_int-ref: + +torchfort_rl_off_policy_wandb_log_int +_____________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_wandb_log_int + +------ + +.. _torchfort_rl_off_policy_wandb_log_float-ref: + +torchfort_rl_off_policy_wandb_log_float +_______________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_wandb_log_float + +------ + +.. _torchfort_rl_off_policy_wandb_log_double-ref: + +torchfort_rl_off_policy_wandb_log_double +________________________________________ +.. doxygenfunction:: torchfort_rl_off_policy_wandb_log_double diff --git a/_sources/api/config.rst.txt b/_sources/api/config.rst.txt new file mode 100644 index 0000000..2c4d849 --- /dev/null +++ b/_sources/api/config.rst.txt @@ -0,0 +1,448 @@ +.. _torchfort_config-ref: + +############################# +TorchFort Configuration Files +############################# + +The TorchFort library relies on a user-defined YAML configuration file to define several aspects of the training procedure, +with specific blocks to control: + + - general properties + - model properties + - optimizer properties + - loss function properties + - learning rate schedule properties + +The following sections define each configuration block and available options. + +Common +====== + +The following sections list configuration file blocks common to supervised learning and reinforcement learning configuration files. + +General Properties +~~~~~~~~~~~~~~~~~~ +The block in the configuration file defining general properties takes the following structure: + +.. code-block:: yaml + + general: +