Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove get_writer function and initialize writer variable in calling function #4

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

payalcha
Copy link
Owner

Remove the get_writer function and initialize the SummaryWriter directly in the write_metric function in multiple files.

  • openfl-tutorials/deprecated/native_api/Federated_Pytorch_MNIST_Tutorial.ipynb

    • Remove the direct initialization of SummaryWriter and replace it with a get_writer function.
    • Use the get_writer function to initialize the writer in the write_metric function.
  • openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/102_aggregator_validation/src/utils.py

    • Remove the direct initialization of SummaryWriter and replace it with a get_writer function.
    • Use the get_writer function to initialize the writer in the write_metric function.
  • openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/104_keras_mnist/src/utils.py

    • Remove the direct initialization of SummaryWriter and replace it with a get_writer function.
    • Use the get_writer function to initialize the writer in the write_metric function.
  • openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/301_torch_cnn_mnist_watermarking/src/utils.py

    • Remove the direct initialization of SummaryWriter and replace it with a get_writer function.
    • Use the get_writer function to initialize the writer in the write_metric function.
  • openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/501_pytorch_tinyimagenet_transfer_learning/src/utils.py

    • Remove the direct initialization of SummaryWriter and replace it with a get_writer function.
    • Use the get_writer function to initialize the writer in the write_metric function.
  • openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/vertical_fl/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_datastore_cli/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_include_exclude/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_internalloop/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_private_attributes_initialization_with_both_options/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_private_attributes_initialization_without_callable/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_private_attributes/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_reference_with_include_exclude/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_reference/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_subset_of_collaborators/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.
  • tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_validate_particpant_names/src/utils.py

    • Remove the get_writer function.
    • Initialize SummaryWriter directly in the write_metric function.

…function

Remove the `get_writer` function and initialize the `SummaryWriter` directly in the `write_metric` function in multiple files.

* **openfl-tutorials/deprecated/native_api/Federated_Pytorch_MNIST_Tutorial.ipynb**
  - Remove the direct initialization of `SummaryWriter` and replace it with a `get_writer` function.
  - Use the `get_writer` function to initialize the writer in the `write_metric` function.

* **openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/102_aggregator_validation/src/utils.py**
  - Remove the direct initialization of `SummaryWriter` and replace it with a `get_writer` function.
  - Use the `get_writer` function to initialize the writer in the `write_metric` function.

* **openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/104_keras_mnist/src/utils.py**
  - Remove the direct initialization of `SummaryWriter` and replace it with a `get_writer` function.
  - Use the `get_writer` function to initialize the writer in the `write_metric` function.

* **openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/301_torch_cnn_mnist_watermarking/src/utils.py**
  - Remove the direct initialization of `SummaryWriter` and replace it with a `get_writer` function.
  - Use the `get_writer` function to initialize the writer in the `write_metric` function.

* **openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/501_pytorch_tinyimagenet_transfer_learning/src/utils.py**
  - Remove the direct initialization of `SummaryWriter` and replace it with a `get_writer` function.
  - Use the `get_writer` function to initialize the writer in the `write_metric` function.

* **openfl-workspace/experimental/workflow/AggregatorBasedWorkflow/vertical_fl/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_datastore_cli/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_include_exclude/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_internalloop/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_private_attributes_initialization_with_both_options/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_private_attributes_initialization_without_callable/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_private_attributes/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_reference_with_include_exclude/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_reference/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_subset_of_collaborators/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.

* **tests/github/experimental/workflow/AggregatorBasedWorkflow/testcase_validate_particpant_names/src/utils.py**
  - Remove the `get_writer` function.
  - Initialize `SummaryWriter` directly in the `write_metric` function.
@payalcha payalcha merged commit 9cd3323 into fix-global-writer Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant