From 58cd502eacd39af71c8a4b657af403b9af74458c Mon Sep 17 00:00:00 2001 From: Sean Yang Date: Wed, 15 Jan 2025 14:11:55 -0800 Subject: [PATCH] Add user guide and docs for logging (#3134) ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Quick tests passed locally by running `./runtest.sh`. - [ ] In-line docstrings updated. - [ ] Documentation updated. --- docs/examples/hello_cross_val.rst | 2 +- docs/examples/hello_scatter_and_gather.rst | 2 +- docs/quickstart.rst | 15 +- docs/real_world_fl/application.rst | 8 +- docs/real_world_fl/operation.rst | 6 +- docs/real_world_fl/workspace.rst | 4 +- .../resources/{log.config => log_config.json} | 0 .../configurations/logging_configuration.rst | 391 ++++++++++++++---- docs/user_guide/nvflare_cli/fl_simulator.rst | 38 +- .../user_guide/security/identity_security.rst | 2 + .../security/site_policy_management.rst | 4 +- 11 files changed, 361 insertions(+), 111 deletions(-) rename docs/resources/{log.config => log_config.json} (100%) diff --git a/docs/examples/hello_cross_val.rst b/docs/examples/hello_cross_val.rst index f8c62f82a5..10ebcbe1bd 100644 --- a/docs/examples/hello_cross_val.rst +++ b/docs/examples/hello_cross_val.rst @@ -52,7 +52,7 @@ Custom FL applications can contain the folders: #. **custom**: contains the custom components (``np_trainer.py``, ``np_model_persistor.py``, ``np_validator.py``, ``np_model_locator``, ``np_formatter``) #. **config**: contains client and server configurations (``config_fed_client.json``, ``config_fed_server.json``) - #. **resources**: contains the logger config (``log.config``) + #. **resources**: contains the logger config (``log_config.json``) Let's get started. First clone the repo, if you haven't already: diff --git a/docs/examples/hello_scatter_and_gather.rst b/docs/examples/hello_scatter_and_gather.rst index da5d3a2e5d..baea6b0287 100644 --- a/docs/examples/hello_scatter_and_gather.rst +++ b/docs/examples/hello_scatter_and_gather.rst @@ -40,7 +40,7 @@ Custom FL applications can contain the folders: #. **custom**: contains any custom components (custom Python code) #. **config**: contains client and server configurations (``config_fed_client.json``, ``config_fed_server.json``) - #. **resources**: contains the logger config (``log.config``) + #. **resources**: contains the logger config (``log_config.json``) Let's get started. First clone the repo, if you haven't already: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index f7bf6b1892..4dd2fa4030 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -247,12 +247,12 @@ Basic usage for the :ref:`FL Simulator ` is available with ``nvfla .. code-block:: shell $ nvflare simulator -h - usage: nvflare simulator [-h] [-w WORKSPACE] [-n N_CLIENTS] [-c CLIENTS] [-t THREADS] [-gpu GPU] [-m MAX_CLIENTS] job_folder - + usage: nvflare simulator [-h] [-w WORKSPACE] [-n N_CLIENTS] [-c CLIENTS] [-t THREADS] [-gpu GPU] [-m MAX_CLIENTS] [--end_run_for_all] job_folder + positional arguments: job_folder - - optional arguments: + + options: -h, --help show this help message and exit -w WORKSPACE, --workspace WORKSPACE WORKSPACE folder @@ -265,6 +265,7 @@ Basic usage for the :ref:`FL Simulator ` is available with ``nvfla -gpu GPU, --gpu GPU list of GPU Device Ids, comma separated -m MAX_CLIENTS, --max_clients MAX_CLIENTS max number of clients + --end_run_for_all flag to indicate if running END_RUN event for all clients Before we get into the Simulator, we'll walk through a few additional setup steps in the next section required @@ -328,7 +329,7 @@ and codes, logs of the output, site and global models, cross-site validation res /tmp/nvflare/jobs/workdir ├── server │ ├── local - │ │ └── log.config + │ │ └── log_config.json │ ├── log.txt │ ├── pool_stats │ │ └── simulator_cell_stats.json @@ -347,7 +348,7 @@ and codes, logs of the output, site and global models, cross-site validation res ├── site-1 │ ├── cifar_net.pth │ ├── local - │ │ └── log.config + │ │ └── log_config.json │ ├── log.txt │ ├── simulate_job │ │ ├── app_site-1 @@ -358,7 +359,7 @@ and codes, logs of the output, site and global models, cross-site validation res ├── site-2 │ ├── cifar_net.pth │ ├── local - │ │ └── log.config + │ │ └── log_config.json │ ├── log.txt │ ├── simulate_job │ │ ├── app_site-2 diff --git a/docs/real_world_fl/application.rst b/docs/real_world_fl/application.rst index 9b3f7fe305..65d93c2db2 100644 --- a/docs/real_world_fl/application.rst +++ b/docs/real_world_fl/application.rst @@ -18,7 +18,7 @@ The structure of the app folder needs to be:: [another file with custom code].py ... resources/ - log.config + log_config.json .. note:: @@ -121,9 +121,9 @@ to certain roles or even orgs or users. See :ref:`federated_authorization` for d Resources ********* -A ``log.config`` is needed inside the resources folder. +A ``log_config.json`` is needed inside the resources folder. This file is for the Python logger to use. -If you don't want to customize the log behavior, you can use the same ``log.config`` from one of +If you don't want to customize the log behavior, you can use the same ``log_config.json`` from one of the example application folder. -.. literalinclude:: ../resources/log.config +.. literalinclude:: ../resources/log_config.json diff --git a/docs/real_world_fl/operation.rst b/docs/real_world_fl/operation.rst index 23dde1eb5c..b676edc604 100644 --- a/docs/real_world_fl/operation.rst +++ b/docs/real_world_fl/operation.rst @@ -19,7 +19,7 @@ commands shown as examples of how they may be run with a description. .. csv-table:: :header: Command,Example,Description - :widths: 15, 10, 30 + :widths: 15, 20, 30 bye,``bye``,Exit from the client help,``help``,Get command help information @@ -30,6 +30,8 @@ commands shown as examples of how they may be run with a description. ,``check_status client clientname``,"The name, token, and status of the specified client with *clientname* are displayed." submit_job,``submit_job job_folder_name``,Submits the job to the server. list_jobs,``list_jobs``,Lists the jobs on the server. (Options: [-n name_prefix] [-d] [job_id_prefix]) + configure_job_log,``configure_job_log job_id server config``,"Configure the job log on the server. (*config* can be a path to a json config file, a levelname/levelnumber, or 'reload')" + ,``configure_job_log job_id client ... config``,Configure the job log on the target client(s). abort_job,``abort_job job_id``,Aborts the job of the specified job_id if it is running or dispatched clone_job,``clone_job job_id``,Creates a copy of the specified job with a new job_id abort,``abort job_id client``,Aborts the job for the specified job_id for all clients. Individual client jobs can be aborted by specifying *clientname*. @@ -47,6 +49,8 @@ commands shown as examples of how they may be run with a description. ,``ls clientname -SR``,List files in workspace root directory (-S: sort by file size; -R: list subdirectories recursively) pwd,``pwd server``,Print the name of workspace root directory ,``pwd clientname``,Print the name of workspace root directory + configure_site_log,``configure_job_log server config``,"Configure the site log on the server. (*config* can be a path to a json config file, a levelname/levelnumber, or 'reload')" + ,``configure_site_log client ... config``,Configure the site log on the target client(s). sys_info,``sys_info server``,Get system information ,``sys_info client *clientname*``,Get system information. Individual clients can be shutdown by specifying *clientname*. remove_client,``remove_client clientname``,Issue command for server to release client before the 10 minute timeout to allow client to rejoin after manual restart. diff --git a/docs/real_world_fl/workspace.rst b/docs/real_world_fl/workspace.rst index a422cd4377..90fefdaa86 100644 --- a/docs/real_world_fl/workspace.rst +++ b/docs/real_world_fl/workspace.rst @@ -21,7 +21,7 @@ Server startup/ authorization.json fed_server.json - log.config + log_config.json readme.txt rootCA.pem server_context.tenseal @@ -89,7 +89,7 @@ Client client.crt client.key fed_client.json - log.config + log_config.json readme.txt rootCA.pem signature.pkl diff --git a/docs/resources/log.config b/docs/resources/log_config.json similarity index 100% rename from docs/resources/log.config rename to docs/resources/log_config.json diff --git a/docs/user_guide/configurations/logging_configuration.rst b/docs/user_guide/configurations/logging_configuration.rst index 4dff67b6be..a6496e025f 100644 --- a/docs/user_guide/configurations/logging_configuration.rst +++ b/docs/user_guide/configurations/logging_configuration.rst @@ -1,121 +1,362 @@ .. _logging_configuration: -################################## -NVIDIA FLARE Logging Configuration -################################## +##################### +Logging Configuration +##################### + +FLARE uses python logging with the `dictConfig API `_ following the `configuration dictionary schema `_. +FLARE Loggers are designed to follow the package level hierarchy using dot separated logger names in order to faciliate granular control at different levels. + +We provide a :ref:`Default Logging Configuration ` file **log_config.json.default** for all NVFLARE sub-systems with pre-configured handlers for console level colors, logs, error logs, structured json logs, and fl training logs. + +Overwrite the default configuration by :ref:`Modifying Logging Configurations ` files, +or change the logging configuration during runtime by using the :ref:`Dynamic Logging Configuration Commands ` ``configure_site_log`` and ``configure_job_log``. + +********************************** +Logging Configuration and Features +********************************** + +.. _default_logging_configuration: +Default Logging Configuration +============================= + +The default logging configuration json file **log_config.json.default** is divided into 3 main sections: formatters, handlers, and loggers. +See the `configuration dictionary schema <(https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema)>`_ for more details. + +.. code-block:: json + + { + "version": 1, + "disable_existing_loggers": false, + "formatters": { + "baseFormatter": { + "()": "nvflare.fuel.utils.log_utils.BaseFormatter", + "fmt": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + }, + "colorFormatter": { + "()": "nvflare.fuel.utils.log_utils.ColorFormatter", + "fmt": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + }, + "jsonFormatter": { + "()": "nvflare.fuel.utils.log_utils.JsonFormatter", + "fmt": "%(asctime)s - %(name)s - %(fullName)s - %(levelname)s - %(message)s" + } + }, + "filters": { + "FLFilter": { + "()": "nvflare.fuel.utils.log_utils.LoggerNameFilter", + "logger_names": ["custom", "nvflare.app_common", "nvflare.app_opt"] + } + }, + "handlers": { + "consoleHandler": { + "class": "logging.StreamHandler", + "level": "DEBUG", + "formatter": "colorFormatter", + "filters": [], + "stream": "ext://sys.stdout" + }, + "logFileHandler": { + "class": "logging.handlers.RotatingFileHandler", + "level": "DEBUG", + "formatter": "baseFormatter", + "filename": "log.txt", + "mode": "a", + "maxBytes": 20971520, + "backupCount": 10 + }, + "errorFileHandler": { + "class": "logging.handlers.RotatingFileHandler", + "level": "ERROR", + "formatter": "baseFormatter", + "filename": "log_error.txt", + "mode": "a", + "maxBytes": 20971520, + "backupCount": 10 + }, + "jsonFileHandler": { + "class": "logging.handlers.RotatingFileHandler", + "level": "DEBUG", + "formatter": "jsonFormatter", + "filename": "log.json", + "mode": "a", + "maxBytes": 20971520, + "backupCount": 10 + }, + "FLFileHandler": { + "class": "logging.handlers.RotatingFileHandler", + "level": "DEBUG", + "formatter": "baseFormatter", + "filters": ["FLFilter"], + "filename": "log_fl.txt", + "mode": "a", + "maxBytes": 20971520, + "backupCount": 10, + "delay": true + } + }, + "loggers": { + "root": { + "level": "INFO", + "handlers": ["consoleHandler", "logFileHandler", "errorFileHandler", "jsonFileHandler", "FLFileHandler"] + } + } + } + +We use different formatters, filters, and handlers to output log records to the console and various log files, which are described in more detail below. + +Formatters +========== + +`Formatters `_ are used to specify the format of log records. +We provide several useful formatters by default: + +BaseFormatter +------------- +The :class:`BaseFormatter` is the default formatter serving as the base class for other FLARE formatters. + +- All the default `Formatter `_ arguments such as **fmt** with `log record attributes `_ and the **datefmt** `date format string `_ can be specified. +- The **record.name** is shortened to the logger base name, and **record.fullName** is set to the logger full name. +Example configuration and output: + +.. code-block:: json + + "baseFormatter": { + "()": "nvflare.fuel.utils.log_utils.BaseFormatter", + "fmt": "%(asctime)s - %(name)s - %(fullName)s - %(levelname)s - %(message)s", + "datefmt": "%m-%d-%Y- %H:%M:%S" + } -NVFLARE uses python logging, specifically fileConfig( configure https://docs.python.org/3/library/logging.config.html) +.. code-block:: shell -We provide default logging configuration files for NVFLARE sub-systems. You can overwrite these logging configurations by modifying the configuration files. + 01-14-2025 14:44:46 - PTInProcessClientAPIExecutor - nvflare.app_opt.pt.in_process_client_api_executor.PTInProcessClientAPIExecutor - INFO - [identity=site-1, run=fc711945-a7cf-4834-9fc4-aa9cb60e327b, peer=example_project, peer_run=fc711945-a7cf-4834-9fc4-aa9cb60e327b, task_name=train, task_id=a16b7a02-b2ea-4eb5-895a-b40d507b2c5c]: execute for task (train) -************************************ -Logging configuration files location -************************************ -Startup kits log configurations -=============================== +ColorFormatter +-------------- +The :class:`ColorFormatter` uses ANSI color codes to format log records based on log level and/or logger names. -The log configuration files are located in the startup kits under the local directory. +We provide the :class:`ANSIColor` class for commonly used colors and default mappings for log levels. +To customize the colors, use either string of a color name specifed in ANSIColor.COLORS, or an ANSI color code (semicolons can be used for additional ANSI arguments). -If you search for the ``log.config.*`` files in the startup kits workspace, you will find the following files: +- **level_colors**: dict of levelname: ANSI color. Defaults to ANSIColor.DEFAULT_LEVEL_COLORS. +- **logger_colors**: dict of loggername: ANSI color. Defaults to {}. -.. code-block:: shell +Example configuration: - find . -name "log.config.*" +.. code-block:: json - ./site-1/local/log.config.default - ./site-2/local/log.config.default - ./server1/local/log.config.default + "colorFormatter": { + "()": "nvflare.fuel.utils.log_utils.ColorFormatter", + "fmt": "%(asctime)s - %(name)s - %(levelname)s - %(message)s", + "level_colors": { + "NOTSET": "grey", + "DEBUG": "grey", + "INFO": "grey", + "WARNING": "yellow", + "ERROR": "red", + "CRITICAL": "bold_red" + }, + "logger_colors": { + "nvflare.app_common": "blue", + "nvflare.app_opt": "38;5;212" + } + } -The server ``log.config.default`` is the default logging configuration used by the FL Server and clients. To overwrite the default, -you can change ``log.config.default`` to ``log.config`` and modify the configuration. -POC log configurations -====================== -Similarly, if you search the POC workspace, you will find the following: +JsonFormatter +------------- +The :class:`JsonFormatter` converts the log records into a json string. -.. code-block:: shell +The **extract_brackets** argument can be used to parse the message and add a nested **fl_ctx_fields** object with the fl context keys and values. + +Example configuration and output: + +.. code-block:: json + + "jsonFormatter": { + "()": "nvflare.fuel.utils.log_utils.JsonFormatter", + "fmt": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + } + +.. code-block:: json + + {"asctime": "2025-01-14 14:44:46,559", "name": "PTInProcessClientAPIExecutor", "levelname": "INFO", "fl_ctx_fields": {"identity": "site-1", "run": "fc711945-a7cf-4834-9fc4-aa9cb60e327b", "peer": "example_project", "peer_run": "fc711945-a7cf-4834-9fc4-aa9cb60e327b", "task_name": "train", "task_id": "a16b7a02-b2ea-4eb5-895a-b40d507b2c5c"}, "message": "execute for task (train)"} + + +Filters +======= + +`Filters `_ are used to allow certain log records to pass through based on specified criteria. + +LoggerNameFilter +---------------- +:class:`LoggerNameFilter` filters loggers based on a list of logger_names. +Filters utilize the logger hierarchy, so any descendants of the specified names will also be allowed through the filter. + +We leverage this in our FLFilter, which filters loggers related to fl training or custom code. + +.. code-block:: json + + "FLFilter": { + "()": "nvflare.fuel.utils.log_utils.LoggerNameFilter", + "logger_names": ["custom", "nvflare.app_common", "nvflare.app_opt"] + } + +Handlers +======== +`Handlers `_ are responsible for sending log records to a destination, while applying any specified Formatter or Filters (applied sequentially). + +consoleHandler +-------------- + +The consoleHandler uses the `StreamHandler `_ to send logging output to a stream, such as sys.stdout. + +Example configuration: + +.. code-block:: json + + "consoleHandler": { + "class": "logging.StreamHandler", + "level": "DEBUG", + "formatter": "colorFormatter", + "filters": ["FLFilter"], + "stream": "ext://sys.stdout" + } + + +FileHandlers +------------ +We use `FileHandlers `_ to send different formatted and filtered log records to different files. + +In the pre-configured handlers, more specifically we utilize the `RotatingFileHandler `_ to rollover to backup files after a certain file size is reached. +FLARE dynamically interprets the ``filename`` to be relative to the either the workspace root directory (for site log files), or the run directory (for job log files). + +Example configuration: - find /tmp/nvflare/poc -name "log.config*" +.. code-block:: json - /tmp/nvflare/poc/server/local/log.config - /tmp/nvflare/poc/site-1/local/log.config - /tmp/nvflare/poc/site-2/local/log.config + "logFileHandler": { + "class": "logging.handlers.RotatingFileHandler", + "level": "DEBUG", + "formatter": "baseFormatter", + "filename": "log.txt", + "mode": "a", + "maxBytes": 20971520, + "backupCount": 10 + } -You can directly modify ``log.config`` to make changes. +The following log file handlers are pre-configured: + +- logFileHandler with baseFormatter to write all logs to ``log.txt`` +- errorFileHandler with baseFormatter and level "ERROR" to write error level logs to ``log_error.txt`` +- jsonFileHandler with jsonFormatter to write json formatted logs to ``log.json`` +- FLFileHandler with baseFormatter and FLFilter to write fl training and custom logs to ``log_fl.txt`` + + +Loggers +======= + +Loggers can be configured in the logger section to have a level and handlers. + +We define the root logger with INFO level and add the desired handlers. + +.. code-block:: json + + "root": { + "level": "INFO", + "handlers": ["consoleHandler", "logFileHandler", "errorFileHandler", "jsonFileHandler", "FLFileHandler"] + } + +Given the hierarchical structure of loggers, specific loggers can be configured using their dot separated names. +Furthermore, any intermediate logger parents are already created and are configureable. + +When creating loggers for FLARE, we provide several convenience functions to help adhere to the package logger hierarchy: + +- :func:`get_obj_logger` for classes +- :func:`get_script_logger` for scripts (if not in a package, default to custom.) +- :func:`get_module_logger` for modules + + +.. _modifying_logging_configurations: +******************************** +Modifying Logging Configurations +******************************** Simulator log configuration =========================== -Simulator logging configuration uses the default log configuration. If you want to overwrite the default configuration, you can add ``log.config`` to -``/startup/log.config``. +Simulator logging configuration uses the default log configuration. If you want to overwrite the default configuration, you can add ``log_config.json`` to +``/startup/log_config.json``. -For example, for hello-numpy-sag examples, the CLI command is: +For example, for hello-numpy-sag examples, if the workspace is ``/tmp/nvflare/hello-numpy-sag/``, then you can add log_config.json in ``/tmp/nvflare/hello-numpy-sag/startup/log_config.json`` to overwrite the default one, then run the CLI command: .. code-block:: shell nvflare simulator -w /tmp/nvflare/hello-numpy-sag -n 2 -t 2 hello-world/hello-numpy-sag/jobs/hello-numpy-sag -If the workspace is ``/tmp/nvflare/hello-numpy-sag/``, then you can add log.config in ``/tmp/nvflare/hello-numpy-sag/startup/log.config`` to overwrite the default one. +Users can also instead specify a log configuration file in the command with the ``-l`` simulator argument: -Configuration logging -===================== +.. code-block:: shell -The default logging file-config based logging configuration is the following: + nvflare simulator -w /tmp/nvflare/hello-numpy-sag -n 2 -t 2 hello-world/hello-numpy-sag/jobs/hello-numpy-sag -l log_config.json -.. code-block:: shell +POC log configurations +====================== +Similarly, if you search the POC workspace, you will find the following: - [loggers] - keys=root +.. code-block:: shell - [handlers] - keys=consoleHandler + find /tmp/nvflare/poc -name "log_config.json*" - [formatters] - keys=fullFormatter + /tmp/nvflare/poc/server/local/log_config.json.default + /tmp/nvflare/poc/site-1/local/log_config.json.default + /tmp/nvflare/poc/site-2/local/log_config.json.default - [logger_root] - level=INFO - handlers=consoleHandler +You can add a ``log_config.json`` to make changes. - [handler_consoleHandler] - class=StreamHandler - level=DEBUG - formatter=fullFormatter - args=(sys.stdout,) +Startup kits log configurations +=============================== - [formatter_fullFormatter] - format=%(asctime)s - %(name)s - %(levelname)s - %(message)s +The log configuration files are located in the startup kits under the local directory. -Suppose we would like to change the logging for :class:`ScatterAndGather` from to INFO to ERROR, -we can do the following: +If you search for the ``log_config.json.*`` files in the startup kits workspace, you will find the following files: .. code-block:: shell - [loggers] - keys=root, ScatterAndGather + find . -name "log_config.json.*" + + ./site-1/local/log_config.json.default + ./site-2/local/log_config.json.default + ./server1/local/log_config.json.default + +The server ``log_config.json.default`` is the default logging configuration used by the FL Server and clients. To overwrite the default, +you can change ``log_config.json.default`` to ``log_config.json`` and modify the configuration. - [handlers] - keys=consoleHandler +.. _dynamic_logging_configuration_commands: +************************************** +Dynamic Logging Configuration Commands +************************************** - [formatters] - keys=fullFormatter +We provide two admin commands to enable users to dynamically configure the site or job level logging. - [logger_root] - level=INFO - handlers=consoleHandler +- **target**: ``server``, ``client ...``, or ``all`` +- **config**: log configuration - [logger_ScatterAndGather] - level=ERROR - handlers=consoleHandler - qualname=ScatterAndGather - propagate=0 + - path to a json log configuration file (``/path/to/my_log_config.json``) + - log level name/number (``debug``, ``INFO``, ``30``) + - read the current log configuration file (``reload``) + +To configure the target site logging (does not affect jobs): + +.. code-block:: shell + + configure_site_log target config + +To configure the target job logging (the job must be running): + +.. code-block:: shell - [handler_consoleHandler] - class=StreamHandler - level=DEBUG - formatter=fullFormatter - args=(sys.stdout,) + configure_job_log job_id target config - [formatter_fullFormatter] - format=%(asctime)s - %(name)s - %(levelname)s - %(message)s +See :ref:`operating_nvflare` for how to use commands and :ref:`command_categories` for the default authorization policy. diff --git a/docs/user_guide/nvflare_cli/fl_simulator.rst b/docs/user_guide/nvflare_cli/fl_simulator.rst index f52fd47078..778a47828d 100644 --- a/docs/user_guide/nvflare_cli/fl_simulator.rst +++ b/docs/user_guide/nvflare_cli/fl_simulator.rst @@ -20,28 +20,30 @@ and jobs that can then be directly used in a real production deployment. Command Usage *********************** -.. code-block:: +.. code-block:: shell - usage: nvflare simulator [-h] -w WORKSPACE [-n N_CLIENTS] [-c CLIENTS] [-t THREADS] [-gpu GPU] job_folder + $ nvflare simulator -h + usage: nvflare simulator [-h] [-w WORKSPACE] [-n N_CLIENTS] [-c CLIENTS] [-t THREADS] [-gpu GPU] [-m MAX_CLIENTS] [--end_run_for_all] job_folder positional arguments: - job_folder - - optional arguments: - -h, --help show this help message and exit - -w WORKSPACE, --workspace WORKSPACE - WORKSPACE folder - -n N_CLIENTS, --n_clients N_CLIENTS - number of clients - -c CLIENTS, --clients CLIENTS - client names list - -t THREADS, --threads THREADS - number of parallel running clients - -gpu GPU, --gpu GPU - list of GPU Device Ids, comma separated - -m MAX_CLIENTS, --max_clients MAX_CLIENTS - maximum number of clients + job_folder + + options: + -h, --help show this help message and exit + -w WORKSPACE, --workspace WORKSPACE + WORKSPACE folder + -n N_CLIENTS, --n_clients N_CLIENTS + number of clients + -c CLIENTS, --clients CLIENTS + client names list + -t THREADS, --threads THREADS + number of parallel running clients + -gpu GPU, --gpu GPU list of GPU Device Ids, comma separated + -m MAX_CLIENTS, --max_clients MAX_CLIENTS + max number of clients + --end_run_for_all flag to indicate if running END_RUN event for all clients + ***************** Command examples ***************** diff --git a/docs/user_guide/security/identity_security.rst b/docs/user_guide/security/identity_security.rst index 7667727200..c389574bc7 100644 --- a/docs/user_guide/security/identity_security.rst +++ b/docs/user_guide/security/identity_security.rst @@ -200,6 +200,7 @@ Command Categories AC.START_APP: CommandCategory.MANAGE_JOB, AC.DELETE_JOB: CommandCategory.MANAGE_JOB, AC.DELETE_WORKSPACE: CommandCategory.MANAGE_JOB, + AC.CONFIGURE_JOB_LOG: CommandCategory.MANAGE_JOB, AC.CHECK_STATUS: CommandCategory.VIEW, AC.SHOW_STATS: CommandCategory.VIEW, @@ -213,6 +214,7 @@ Command Categories AC.REMOVE_CLIENT: CommandCategory.OPERATE, AC.SET_TIMEOUT: CommandCategory.OPERATE, AC.CALL: CommandCategory.OPERATE, + AC.CONFIGURE_SITE_LOG: CommandCategory.OPERATE, AC.SHELL_CAT: CommandCategory.SHELL_COMMANDS, AC.SHELL_GREP: CommandCategory.SHELL_COMMANDS, diff --git a/docs/user_guide/security/site_policy_management.rst b/docs/user_guide/security/site_policy_management.rst index 75889453b3..d7297dfd19 100644 --- a/docs/user_guide/security/site_policy_management.rst +++ b/docs/user_guide/security/site_policy_management.rst @@ -29,11 +29,11 @@ Here is the complete workspace structure, with the addition of the "local" folde resources.json.default authorization.json.default privacy.json.sample - log.config.default + log_config.json.default resources.json authorization.json privacy.json - log.config + log_config.json custom/ local_code.xyz audit.txt