From 4125a8e950f9103714803bf69682748dcba4c6e6 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 13 Sep 2024 20:40:42 +0200 Subject: [PATCH] move `.readthedocs.yml` to docs/ --- SandBox/issue-2656.py | 9 +++++++++ .readthedocs.yml => docs/.readthedocs.yaml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 SandBox/issue-2656.py rename .readthedocs.yml => docs/.readthedocs.yaml (98%) diff --git a/SandBox/issue-2656.py b/SandBox/issue-2656.py new file mode 100644 index 00000000000..e2905508cfe --- /dev/null +++ b/SandBox/issue-2656.py @@ -0,0 +1,9 @@ +from torchmetrics import MultitaskWrapper, F1Score +import torch +wrapper = MultitaskWrapper({"F1": F1Score(num_classes=2, average='macro', task="multiclass")}) +wrapper2 = wrapper.clone(postfix="train") +preds = {"F1": torch.ones((5, 2))} +tgt = {"F1": torch.tensor([0, 1, 0, 1, 0], dtype=torch.long)} + +#wrapper(preds, tgt) # This one works +wrapper2(preds, tgt) \ No newline at end of file diff --git a/.readthedocs.yml b/docs/.readthedocs.yaml similarity index 98% rename from .readthedocs.yml rename to docs/.readthedocs.yaml index e797ae385fe..ba81077847d 100644 --- a/.readthedocs.yml +++ b/docs/.readthedocs.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# .readthedocs.yml +# .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details