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

releasing 5.0 #101

Merged
merged 13 commits into from
May 22, 2024
Merged

releasing 5.0 #101

merged 13 commits into from
May 22, 2024

Conversation

marcverhagen
Copy link
Contributor

Overview

This release adds a script to run a server-less app from the command line, adds and fixes parameters, and updates dependencies.

Additions

  • Added CLI capabilities
  • Added allowOverlap parameter
  • Added map parameter for postbin mapping

Changes

  • Updated to clams-python 1.2.2
  • Updated base container to clams-python-opencv4-torch2:1.2.2
  • Simplified model names
  • Documentation updates

Copy link
Member

@keighrim keighrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app doesn't work. Here's the error msg.

{
  "metadata": {
    "mmif": "http://mmif.clams.ai/1.0.0"
  },
  "documents": [
    {
      "@type": "http://mmif.clams.ai/vocabulary/VideoDocument/v1",
      "properties": {
        "mime": "video",
        "id": "d1",
        "location": "file:///llc_data/clams/swt-gbh/speedtest/cpb-aacip-259-c53f255d.mp4"
      }
    }
  ],
  "views": [
    {
      "id": "v_0",
      "metadata": {
        "timestamp": "2024-05-20T11:55:31.751899",
        "app": "http://apps.clams.ai/swt-detection/v4.4-13-geeffacd",
        "parameters": {
          "pretty": "",
          "stopAt": "30000"
        },
        "error": {
          "message": "<class 'AttributeError'>: 'list' object has no attribute 'items'",
          "stackTrace": "  File \"/home/krim/anaconda3/envs/clams-app-swt-detection/lib/python3.8/site-packages/clams/restify/__init__.py\", line 144, in post\n    return self.json_to_response(self.cla.annotate(raw_data, **raw_params))\n\t\n  File \"/home/krim/anaconda3/envs/clams-app-swt-detection/lib/python3.8/site-packages/clams/app/__init__.py\", line 128, in annotate\n    annotated = self._annotate(mmif, **refined)\n\t\n  File \"/home/krim/syncing/projects/clams/clamsproject/app-swt-detection/app.py\", line 43, in _annotate\n    self._configure_postbin()\n\t\n  File \"/home/krim/syncing/projects/clams/clamsproject/app-swt-detection/app.py\", line 104, in _configure_postbin\n    self.configs['postbin'] = invert_mappings(self.configs['map'])\n\t\n  File \"/home/krim/syncing/projects/clams/clamsproject/app-swt-detection/app.py\", line 162, in invert_mappings\n    for in_label, out_label in mappings.items():\n"
        }
      },
      "annotations": []
    }
  ]
}

Also the __init__ signature needs a cleanup. Then, I guess the app.py doesn't need to depend on yaml at all.

@marcverhagen
Copy link
Contributor Author

Weird, you get that while running the container?

@marcverhagen
Copy link
Contributor Author

@keighrim The yaml import does indeed seem superfluous and I will remove it. As for __init__ cleanup, the SwtDetection.__init__ method has some logging code that you put in there, mostly for timing purposes, I will be happy to remove it as well as other logging and timing elsewhere in the app.

@marcverhagen
Copy link
Contributor Author

@keighrim By the way, the error you got is consistent with having the wrong version of clams-python, it needs 1.2.2 and when I replaced that with 1.2.1 I get the same error.

@keighrim
Copy link
Member

Yup, that was python environment problem on my side, my bad. I can confirm the app.py runs fine.

@marcverhagen
Copy link
Contributor Author

Hmmmm, I did fine an error with the CLI script which must have crept in late in the game. Sigh.

@marcverhagen
Copy link
Contributor Author

After banging my head against the CLI "error" reported above for a while I realized the error was in a mistake with the arguments given to the CLI. So I am going to say we are good to go.

@marcverhagen marcverhagen merged commit dede3ef into main May 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants