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

Easier deployment on local network #119

Open
hummuscience opened this issue Nov 25, 2024 · 30 comments
Open

Easier deployment on local network #119

hummuscience opened this issue Nov 25, 2024 · 30 comments
Labels
enhancement New feature or request

Comments

@hummuscience
Copy link

I managed to get a linux machine with a GPU to get the Pose App running.

I need to be able to access the App from the network (the machine is not generally accessible). So I tried to open up the appropriate port (7501) on the machine. It seems to have worked, as I see the browser tab change to "lightning.ai" and the tab going straight to http://<server-ip>:7501/view/Manage Project .

But now I get errors that other ports can't be accessed (localhost:44429 for example).

If I understand this correctly, these are the ports on which the multiple servers required by the Pose App are running. two streamlit servers, one label-studio and one fiftyone. These ports are also currently not fixed and change every time I re-start the app.

Opening up all the ports on the machine is not an option for our IT (too much attack surface).

I am currently thinking of editing the App code and hard-code the $host and $port variables. This is a temporary solution, as it will probably be overwritten or needs to be manually adjusted every time there is a Pose App update.

Is there an easier way of doing so?

@themattinthehatt
Copy link
Collaborator

@hummuscience when you first connect to the remote machine and launch the app, do you see that the other ports assigned are 7502, 7503, etc.? When we run the app in the cloud we actually have to specify usage on those ports for similar security reasons, but the assigned ports are always monotonically increasing from 7501 - it sounds like that's not the case for you though?

@hummuscience
Copy link
Author

hummuscience commented Nov 27, 2024

This is not the case for me. I get a random bag of ports that doesn't seem to fit any range.

From what I understand, the code also currently doesn't fix these ports. Instead its just $port. Unless I am missing something in the code.

Streamlit:

+ " --server.address $host --server.port $port --server.headless true" \

Tensorboard:

Pose-app/app.py

Line 265 in edfe0e5

cmd = f"tensorboard --logdir {logdir} --host $host --port $port --reload_interval 30"

Fiftyone:

Pose-app/app.py

Line 270 in edfe0e5

cmd = "fiftyone app launch --address $host --port $port --remote --wait -1"

label-studio:
"label-studio start --no-browser --internal-host $host --port $port --log-level ERROR",

@themattinthehatt
Copy link
Collaborator

You are correct, the ports are not fixed. It appears you can, however, fix these ports in the construction of the lighting works: https://pytorch-lightning.readthedocs.io/en/2.2.5/app/core_api/lightning_work/lightning_work.html#lightningwork

It might be worth trying this with a single work first (like LabelStudio) and sending it to a port that you're able to access

@hummuscience
Copy link
Author

I will give this a try and report. Thank you!

@hummuscience
Copy link
Author

I am able to set the host to 0.0.0.0 and fixed ports on all services except for Streamlit. Somehow, PoseApp starts 4 streamlit instances at once. Still getting random ports every time I run the app...

Any idea what might be causing this?

@themattinthehatt
Copy link
Collaborator

I'm not really sure how to fix the ports for Streamlit. There should indeed be 4 different Streamlit instances starting at once:

  • project manager page
  • extract frames page
  • train/infer page
  • video player page

There are actually 2 more pages that use streamlit (image/video diagnostics) but these are bundled with the LP code instead of the app and so they are launched differently.

Can I ask what your use-case is for running the app remotely? If you want to label data and/or look at diagnostics then the app is definitely handy, if you just want to train a model or run inference on a bunch of videos then launching those jobs from the command line may be easier.

@hummuscience
Copy link
Author

I need to extract frames, label data, check diagnostics etc.

I trained already many models but need to refine the models and add model labelled frames. And going through DLC all the time it tedious.

@themattinthehatt
Copy link
Collaborator

themattinthehatt commented Dec 3, 2024

@hummuscience I got in touch with the folks at Lightning, according to them the behavior that I see in the studio can be replicated by setting an environment variable in your shell before launching the app. So can you try running

export LIGHTNING_CLOUDSPACE_HOST=0

and then launching the app? You should see the different tabs launched on ports 7501, 7502, 7503, etc.

Please let me know if that works!

@hummuscience
Copy link
Author

Thanks for checking!

I tried the fix out and got the following error:

Traceback (most recent call last):
File "/home/abdelhaym/conda/envs/lai/lib/python3.10/site-packages/lightning/app/runners/multiprocess.py", line 70, in dispatch
port = find_free_network_port)
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/network.py", line 42, in find_free_network_port return _find_free_network_port_cloudspace(
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/network.py", line 84, in _find_free_network-port_cloudspace raise RuntimeError(f"All {constants.LIGHTNING_CLOUDSPACE_EXPOSED_PORT_COUNT} ports are already in use.")
RuntimeError: All 0 ports are already in use.

No matter is I set the variable to 0 or 0.0.0.0, "0.0.0.0".

I also don't seem to find a documentation of this environment variable. Any idea where I can find more infos about it?

@hummuscience
Copy link
Author

Okay, we are getting somwhere.

I also had to set LIGHTNING_CLOUDSPACE_EXPOSED_PORT_COUNT to something higher than 10. At least I am getting the streamlit instances on the right port range now! :)

@hummuscience
Copy link
Author

hummuscience commented Dec 4, 2024

I am able to access the 7501 page but I am only shown "lightning is intializing..." briefly and a blank page.
The last error message in the terminal is the following:

[2024-12-04 14:21:58, 706] [django.server:: 10g_message::161] [INFO] "GET /api/tasks?project=3&page=1&page_size=100&query=%7B%22filters%22%3A+nul1%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3

A+%7B%22a11%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 422355

[2024-12-84 14:21:58,786] [django.server::10g_message::161] [INFO] "GET /api/tasks?project=3&page=1&page_size=100&query=%7B%22filters%22%3A+nu]1%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3

A+%7B%22a11%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 422355

[2024-12-04 14:21:58,716] [core.utils.common::custom_exception_handler::91] [ERROR] 28b2b2d8-b25f-40c3-8213-bc92c9288c87 Invalid page.
Traceback (most recent call last):


File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 204, in paginate_queryset
self page = paginator.page (page_number)


File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 76, in page
number = self.validate_number (number)


File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 58, in validate_number
raise EmptyPage(_('That page contains no results'))

django.core.paginator.EmptyPage: That page contains no results
Traceback (most recent call last):
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler (request, *args, **kwargs)
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/utils/decorators.py", line 43, in _wrapper return bound_method (*args, **kwargs)
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 305, in get
page = self.paginate_queryset(queryset)
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/generics.py", line 171, in paginate_queryset return self.paginator.paginate_queryset(queryset, self.request, view=self)
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 231, in paginate_queryset return self.sync_paginate_queryset(queryset, request, view)
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 225, in sync_paginate_queryset return super) .paginate queryset(queryset, request, view)
File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 209, in paginate_queryset raise NotFound (msg)
rest_framework.exceptions.NotFound: Invalid page.
[2024-12-04 14:21:58,718] [django. request:: 10g_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:21:58,718] [django. request:: 10g_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:21:58,719] [django.server:: 10g_message::161] [WARNING] "GET /api/tasks?project=3&page=2&page_size=100&query=%7B%22filters%22%3A+nu11%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%2
2%3A+%7B%22al1%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
[2024-12-04 14:21:58,719] [django.server::log_message::161] [WARNING] "GET /api/tasks?project=3&page=2&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%2
2%3A+%7B%22a11%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
INFO: APP.BASHWORK:python /home/abdelhaym/repos/Pose-app/lightning_pose_app/label_studio/create_labeling_config.py --proj_dir /home/abdelhaym/repos/Pose-app/data/mirror-mouse-example --filename labe 1_studio_config.xm --keypoints_list pawlLH_top/paw2LF_top/paw3RF_top/paw4RH_top/tailBase_top/tailMid_top/nose_top/paw1LH_bot/paw2LF_bot/paw3RF_bot/paw4RH_bot/tailBase_bot/tailMid_bot/nose_bot
WARNING:py warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to th e 'run()' method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a 'lightning app.storage.Path' object to be able to access these files in yo ur Work.
INFO:APP: Importing demo dataset; this will only take a minute
take a minute t
WARNING: py warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to th e 'run()' method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a 'lightning.app.storage.Path' object to be able to access these files in yo ur Work.

@themattinthehatt
Copy link
Collaborator

can you share more of the terminal output? The EmptyPage error is not an issue. After that it appears the app is importing the demo dataset, which can indeed take a few minutes. The 'lightning.app.storage.Path' warning is also just a warning, not an error, so I don't think that's an issue. How long was the app blank for?

@hummuscience
Copy link
Author

Here is the whole output:

Your Lightning App is starting. This won't take long.
2024-12-04 15:48:02.941 WARNING streamlit.runtime.caching.cache_data_api: No runtime found, using MemoryCacheStorageManager
2024-12-04 15:48:02.954 WARNING streamlit.runtime.caching.cache_data_api: No runtime found, using MemoryCacheStorageManager
2024-12-04 15:48:02.955 WARNING streamlit.runtime.caching.cache_data_api: No runtime found, using MemoryCacheStorageManager
INFO:APP.UTILS:Running streamlit on http://0.0.0.0:7502
INFO:APP.UTILS:Running streamlit on http://0.0.0.0:7503
INFO:APP.UTILS:Running streamlit on http://0.0.0.0:7504
INFO:APP.UTILS:Running streamlit on http://0.0.0.0:7505
INFO: Your app has started.
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.label_studio.label_studio and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app/data/labelstudio_db' as an argument to the `run()` method of root.label_studio.label_studio and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP.BASHWORK:label-studio start --no-browser --internal-host 0.0.0.0 --port 7508 --log-level ERROR
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP.BASHWORK:fiftyone app launch --address 0.0.0.0 --port 7506 --remote --wait -1
=> Database and media directory: /home/abdelhaym/repos/Pose-app/data/labelstudio_db
=> Static URL is set to: /static/
=> Database and media directory: /home/abdelhaym/repos/Pose-app/data/labelstudio_db
=> Static URL is set to: /static/
Read environment variables from: /home/abdelhaym/repos/Pose-app/data/labelstudio_db/.env
get 'SECRET_KEY' casted as '<class 'str'>' with default ''
INFO:APP:Importing demo dataset; this will only take a minute
INFO:APP.BASHWORK:python /home/abdelhaym/repos/Pose-app/lightning_pose_app/label_studio/create_labeling_config.py --proj_dir /home/abdelhaym/repos/Pose-app/data/mirror-mouse-example --filename label_studio_config.xml --keypoints_list paw1LH_top/paw2LF_top/paw3RF_top/paw4RH_top/tailBase_top/tailMid_top/nose_top/paw1LH_bot/paw2LF_bot/paw3RF_bot/paw4RH_bot/tailBase_bot/tailMid_bot/nose_bot
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
INFO:APP.BASHWORK:python /home/abdelhaym/repos/Pose-app/lightning_pose_app/label_studio/create_new_project.py --label_studio_url http://localhost:7508 --proj_dir /home/abdelhaym/repos/Pose-app/data/mirror-mouse-example --api_key whitenoise --project_name mirror-mouse-example --label_config /home/abdelhaym/repos/Pose-app/data/mirror-mouse-example/label_studio_config.xml
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /pypi/label-studio/json HTTP/1.1" 200 33344

   ╔════════════════════════════════════════════╗
   ║                                            ║
   ║   Update available 1.13.1 → 1.14.0.post0   ║
   ║   Run pip install -U label-studio          ║
   ║                                            ║
   ╚════════════════════════════════════════════╝

WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
User user@localhost already exists
Performing system checks...

System check identified no issues (1 silenced).
December 04, 2024 - 14:48:07
Django version 3.2.25, using settings 'label_studio.core.settings.label_studio'
Starting development server at http://0.0.0.0:7508/
Quit the server with CONTROL-C.
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
[2024-12-04 14:48:08,733] [django.server::log_message::161] [INFO] "GET /api/version HTTP/1.1" 200 801
[2024-12-04 14:48:08,733] [django.server::log_message::161] [INFO] "GET /api/version HTTP/1.1" 200 801
[2024-12-04 14:48:08,782] [django.server::log_message::161] [INFO] "POST /api/projects HTTP/1.1" 201 3613
[2024-12-04 14:48:08,782] [django.server::log_message::161] [INFO] "POST /api/projects HTTP/1.1" 201 3613
[2024-12-04 14:48:08,846] [django.server::log_message::161] [INFO] "POST /api/storages/localfiles HTTP/1.1" 201 356
[2024-12-04 14:48:08,846] [django.server::log_message::161] [INFO] "POST /api/storages/localfiles HTTP/1.1" 201 356
INFO:APP.BASHWORK:python /home/abdelhaym/repos/Pose-app/lightning_pose_app/label_studio/update_tasks.py --label_studio_url http://localhost:7508 --proj_dir /home/abdelhaym/repos/Pose-app/data/mirror-mouse-example --api_key whitenoise --config_file /home/abdelhaym/repos/Pose-app/data/mirror-mouse-example/model_config_mirror-mouse-example.yaml --update_from_csv
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
[2024-12-04 14:48:09,602] [django.server::log_message::161] [INFO] "GET /api/version HTTP/1.1" 200 801
[2024-12-04 14:48:09,602] [django.server::log_message::161] [INFO] "GET /api/version HTTP/1.1" 200 801
[2024-12-04 14:48:09,617] [django.server::log_message::161] [INFO] "GET /api/projects/9 HTTP/1.1" 200 3589
[2024-12-04 14:48:09,617] [django.server::log_message::161] [INFO] "GET /api/projects/9 HTTP/1.1" 200 3589
[2024-12-04 14:48:09,673] [django.server::log_message::161] [INFO] "GET /api/tasks?project=9&page=1&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 66
[2024-12-04 14:48:09,673] [django.server::log_message::161] [INFO] "GET /api/tasks?project=9&page=1&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 66
[2024-12-04 14:48:09,722] [core.utils.common::custom_exception_handler::91] [ERROR] 1aea11e8-7c56-4e42-8f6d-1bdd7f459267 Invalid page.
Traceback (most recent call last):
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 204, in paginate_queryset
    self.page = paginator.page(page_number)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 76, in page
    number = self.validate_number(number)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 58, in validate_number
    raise EmptyPage(_('That page contains no results'))
django.core.paginator.EmptyPage: That page contains no results

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 305, in get
    page = self.paginate_queryset(queryset)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/generics.py", line 171, in paginate_queryset
    return self.paginator.paginate_queryset(queryset, self.request, view=self)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 231, in paginate_queryset
    return self.sync_paginate_queryset(queryset, request, view)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 225, in sync_paginate_queryset
    return super().paginate_queryset(queryset, request, view)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 209, in paginate_queryset
    raise NotFound(msg)
rest_framework.exceptions.NotFound: Invalid page.
[2024-12-04 14:48:09,728] [django.request::log_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:48:09,728] [django.request::log_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:48:09,728] [django.server::log_message::161] [WARNING] "GET /api/tasks?project=9&page=2&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
[2024-12-04 14:48:09,728] [django.server::log_message::161] [WARNING] "GET /api/tasks?project=9&page=2&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
You have launched a remote App on port 7506. To connect to this App from another
machine, issue the following command to configure port forwarding:

ssh -N -L 5151:127.0.0.1:7506 [<username>@]<hostname>

where `[<username>@]<hostname>` refers to your current machine. The App can
then be viewed in your browser at http://localhost:5151.

Alternatively, if you have FiftyOne installed on your local machine, just run:

fiftyone app connect --destination [<username>@]<hostname> --port 7506

See https://docs.voxel51.com/user_guide/app.html#remote-sessions
for more information about remote sessions.
[2024-12-04 14:48:09,832] [django.server::log_message::161] [INFO] "POST /api/projects/9/import?return_task_ids=1 HTTP/1.1" 201 550
[2024-12-04 14:48:09,832] [django.server::log_message::161] [INFO] "POST /api/projects/9/import?return_task_ids=1 HTTP/1.1" 201 550
[2024-12-04 14:48:10,012] [django.server::log_message::161] [INFO] "GET /api/tasks?project=9&page=1&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 65667
[2024-12-04 14:48:10,012] [django.server::log_message::161] [INFO] "GET /api/tasks?project=9&page=1&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 65667
[2024-12-04 14:48:10,022] [core.utils.common::custom_exception_handler::91] [ERROR] 9cfd5c56-f42c-497a-8a58-ef86a096ca50 Invalid page.
Traceback (most recent call last):
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 204, in paginate_queryset
    self.page = paginator.page(page_number)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 76, in page
    number = self.validate_number(number)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 58, in validate_number
    raise EmptyPage(_('That page contains no results'))
django.core.paginator.EmptyPage: That page contains no results

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 305, in get
    page = self.paginate_queryset(queryset)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/generics.py", line 171, in paginate_queryset
    return self.paginator.paginate_queryset(queryset, self.request, view=self)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 231, in paginate_queryset
    return self.sync_paginate_queryset(queryset, request, view)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 225, in sync_paginate_queryset
    return super().paginate_queryset(queryset, request, view)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 209, in paginate_queryset
    raise NotFound(msg)
rest_framework.exceptions.NotFound: Invalid page.
[2024-12-04 14:48:10,024] [django.request::log_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:48:10,024] [django.request::log_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:48:10,025] [django.server::log_message::161] [WARNING] "GET /api/tasks?project=9&page=2&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
[2024-12-04 14:48:10,025] [django.server::log_message::161] [WARNING] "GET /api/tasks?project=9&page=2&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
[2024-12-04 14:48:10,185] [django.server::log_message::161] [INFO] "POST /api/tasks/721/annotations/ HTTP/1.1" 201 3109
[2024-12-04 14:48:10,185] [django.server::log_message::161] [INFO] "POST /api/tasks/721/annotations/ HTTP/1.1" 201 3109
[2024-12-04 14:48:10,334] [django.server::log_message::161] [INFO] "POST /api/tasks/722/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:10,334] [django.server::log_message::161] [INFO] "POST /api/tasks/722/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:10,489] [django.server::log_message::161] [INFO] "POST /api/tasks/723/annotations/ HTTP/1.1" 201 3328
[2024-12-04 14:48:10,489] [django.server::log_message::161] [INFO] "POST /api/tasks/723/annotations/ HTTP/1.1" 201 3328
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
[2024-12-04 14:48:10,641] [django.server::log_message::161] [INFO] "POST /api/tasks/724/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:10,641] [django.server::log_message::161] [INFO] "POST /api/tasks/724/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:10,793] [django.server::log_message::161] [INFO] "POST /api/tasks/725/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:10,793] [django.server::log_message::161] [INFO] "POST /api/tasks/725/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:10,943] [django.server::log_message::161] [INFO] "POST /api/tasks/726/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:10,943] [django.server::log_message::161] [INFO] "POST /api/tasks/726/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:11,094] [django.server::log_message::161] [INFO] "POST /api/tasks/727/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:11,094] [django.server::log_message::161] [INFO] "POST /api/tasks/727/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:11,243] [django.server::log_message::161] [INFO] "POST /api/tasks/728/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:11,243] [django.server::log_message::161] [INFO] "POST /api/tasks/728/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:11,392] [django.server::log_message::161] [INFO] "POST /api/tasks/729/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:11,392] [django.server::log_message::161] [INFO] "POST /api/tasks/729/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:11,541] [django.server::log_message::161] [INFO] "POST /api/tasks/730/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:11,541] [django.server::log_message::161] [INFO] "POST /api/tasks/730/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:11,690] [django.server::log_message::161] [INFO] "POST /api/tasks/731/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:11,690] [django.server::log_message::161] [INFO] "POST /api/tasks/731/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:11,841] [django.server::log_message::161] [INFO] "POST /api/tasks/732/annotations/ HTTP/1.1" 201 3530
[2024-12-04 14:48:11,841] [django.server::log_message::161] [INFO] "POST /api/tasks/732/annotations/ HTTP/1.1" 201 3530
[2024-12-04 14:48:11,990] [django.server::log_message::161] [INFO] "POST /api/tasks/733/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:11,990] [django.server::log_message::161] [INFO] "POST /api/tasks/733/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:12,140] [django.server::log_message::161] [INFO] "POST /api/tasks/734/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:12,140] [django.server::log_message::161] [INFO] "POST /api/tasks/734/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:12,292] [django.server::log_message::161] [INFO] "POST /api/tasks/735/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:12,292] [django.server::log_message::161] [INFO] "POST /api/tasks/735/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:12,439] [django.server::log_message::161] [INFO] "POST /api/tasks/736/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:12,439] [django.server::log_message::161] [INFO] "POST /api/tasks/736/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:12,590] [django.server::log_message::161] [INFO] "POST /api/tasks/737/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:12,590] [django.server::log_message::161] [INFO] "POST /api/tasks/737/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:12,741] [django.server::log_message::161] [INFO] "POST /api/tasks/738/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:12,741] [django.server::log_message::161] [INFO] "POST /api/tasks/738/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:12,899] [django.server::log_message::161] [INFO] "POST /api/tasks/739/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:12,899] [django.server::log_message::161] [INFO] "POST /api/tasks/739/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:13,053] [django.server::log_message::161] [INFO] "POST /api/tasks/740/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:13,053] [django.server::log_message::161] [INFO] "POST /api/tasks/740/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:13,207] [django.server::log_message::161] [INFO] "POST /api/tasks/741/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:13,207] [django.server::log_message::161] [INFO] "POST /api/tasks/741/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:13,360] [django.server::log_message::161] [INFO] "POST /api/tasks/742/annotations/ HTTP/1.1" 201 3547
[2024-12-04 14:48:13,360] [django.server::log_message::161] [INFO] "POST /api/tasks/742/annotations/ HTTP/1.1" 201 3547
[2024-12-04 14:48:13,513] [django.server::log_message::161] [INFO] "POST /api/tasks/743/annotations/ HTTP/1.1" 201 3554
[2024-12-04 14:48:13,513] [django.server::log_message::161] [INFO] "POST /api/tasks/743/annotations/ HTTP/1.1" 201 3554
[2024-12-04 14:48:13,667] [django.server::log_message::161] [INFO] "POST /api/tasks/744/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:13,667] [django.server::log_message::161] [INFO] "POST /api/tasks/744/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:13,822] [django.server::log_message::161] [INFO] "POST /api/tasks/745/annotations/ HTTP/1.1" 201 3114
[2024-12-04 14:48:13,822] [django.server::log_message::161] [INFO] "POST /api/tasks/745/annotations/ HTTP/1.1" 201 3114
[2024-12-04 14:48:13,976] [django.server::log_message::161] [INFO] "POST /api/tasks/746/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:13,976] [django.server::log_message::161] [INFO] "POST /api/tasks/746/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:14,131] [django.server::log_message::161] [INFO] "POST /api/tasks/747/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:14,131] [django.server::log_message::161] [INFO] "POST /api/tasks/747/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:14,285] [django.server::log_message::161] [INFO] "POST /api/tasks/748/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:14,285] [django.server::log_message::161] [INFO] "POST /api/tasks/748/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:14,439] [django.server::log_message::161] [INFO] "POST /api/tasks/749/annotations/ HTTP/1.1" 201 3562
[2024-12-04 14:48:14,439] [django.server::log_message::161] [INFO] "POST /api/tasks/749/annotations/ HTTP/1.1" 201 3562
[2024-12-04 14:48:14,594] [django.server::log_message::161] [INFO] "POST /api/tasks/750/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:14,594] [django.server::log_message::161] [INFO] "POST /api/tasks/750/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:14,750] [django.server::log_message::161] [INFO] "POST /api/tasks/751/annotations/ HTTP/1.1" 201 3553
[2024-12-04 14:48:14,750] [django.server::log_message::161] [INFO] "POST /api/tasks/751/annotations/ HTTP/1.1" 201 3553
[2024-12-04 14:48:14,907] [django.server::log_message::161] [INFO] "POST /api/tasks/752/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:14,907] [django.server::log_message::161] [INFO] "POST /api/tasks/752/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:15,061] [django.server::log_message::161] [INFO] "POST /api/tasks/753/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:15,061] [django.server::log_message::161] [INFO] "POST /api/tasks/753/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:15,216] [django.server::log_message::161] [INFO] "POST /api/tasks/754/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:15,216] [django.server::log_message::161] [INFO] "POST /api/tasks/754/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:15,370] [django.server::log_message::161] [INFO] "POST /api/tasks/755/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:15,370] [django.server::log_message::161] [INFO] "POST /api/tasks/755/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:15,524] [django.server::log_message::161] [INFO] "POST /api/tasks/756/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:15,524] [django.server::log_message::161] [INFO] "POST /api/tasks/756/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:15,682] [django.server::log_message::161] [INFO] "POST /api/tasks/757/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:15,682] [django.server::log_message::161] [INFO] "POST /api/tasks/757/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:15,836] [django.server::log_message::161] [INFO] "POST /api/tasks/758/annotations/ HTTP/1.1" 201 3540
[2024-12-04 14:48:15,836] [django.server::log_message::161] [INFO] "POST /api/tasks/758/annotations/ HTTP/1.1" 201 3540
[2024-12-04 14:48:15,995] [django.server::log_message::161] [INFO] "POST /api/tasks/759/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:15,995] [django.server::log_message::161] [INFO] "POST /api/tasks/759/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:16,148] [django.server::log_message::161] [INFO] "POST /api/tasks/760/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:16,148] [django.server::log_message::161] [INFO] "POST /api/tasks/760/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:16,303] [django.server::log_message::161] [INFO] "POST /api/tasks/761/annotations/ HTTP/1.1" 201 3552
[2024-12-04 14:48:16,303] [django.server::log_message::161] [INFO] "POST /api/tasks/761/annotations/ HTTP/1.1" 201 3552
[2024-12-04 14:48:16,458] [django.server::log_message::161] [INFO] "POST /api/tasks/762/annotations/ HTTP/1.1" 201 3542
[2024-12-04 14:48:16,458] [django.server::log_message::161] [INFO] "POST /api/tasks/762/annotations/ HTTP/1.1" 201 3542
[2024-12-04 14:48:16,616] [django.server::log_message::161] [INFO] "POST /api/tasks/763/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:16,616] [django.server::log_message::161] [INFO] "POST /api/tasks/763/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:16,770] [django.server::log_message::161] [INFO] "POST /api/tasks/764/annotations/ HTTP/1.1" 201 2884
[2024-12-04 14:48:16,770] [django.server::log_message::161] [INFO] "POST /api/tasks/764/annotations/ HTTP/1.1" 201 2884
[2024-12-04 14:48:16,924] [django.server::log_message::161] [INFO] "POST /api/tasks/765/annotations/ HTTP/1.1" 201 3554
[2024-12-04 14:48:16,924] [django.server::log_message::161] [INFO] "POST /api/tasks/765/annotations/ HTTP/1.1" 201 3554
[2024-12-04 14:48:17,079] [django.server::log_message::161] [INFO] "POST /api/tasks/766/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:17,079] [django.server::log_message::161] [INFO] "POST /api/tasks/766/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:17,233] [django.server::log_message::161] [INFO] "POST /api/tasks/767/annotations/ HTTP/1.1" 201 3105
[2024-12-04 14:48:17,233] [django.server::log_message::161] [INFO] "POST /api/tasks/767/annotations/ HTTP/1.1" 201 3105
[2024-12-04 14:48:17,387] [django.server::log_message::161] [INFO] "POST /api/tasks/768/annotations/ HTTP/1.1" 201 3554
[2024-12-04 14:48:17,387] [django.server::log_message::161] [INFO] "POST /api/tasks/768/annotations/ HTTP/1.1" 201 3554
[2024-12-04 14:48:17,539] [django.server::log_message::161] [INFO] "POST /api/tasks/769/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:17,539] [django.server::log_message::161] [INFO] "POST /api/tasks/769/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:17,691] [django.server::log_message::161] [INFO] "POST /api/tasks/770/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:17,691] [django.server::log_message::161] [INFO] "POST /api/tasks/770/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:17,843] [django.server::log_message::161] [INFO] "POST /api/tasks/771/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:17,843] [django.server::log_message::161] [INFO] "POST /api/tasks/771/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:17,996] [django.server::log_message::161] [INFO] "POST /api/tasks/772/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:17,996] [django.server::log_message::161] [INFO] "POST /api/tasks/772/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:18,156] [django.server::log_message::161] [INFO] "POST /api/tasks/773/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:18,156] [django.server::log_message::161] [INFO] "POST /api/tasks/773/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:18,307] [django.server::log_message::161] [INFO] "POST /api/tasks/774/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:18,307] [django.server::log_message::161] [INFO] "POST /api/tasks/774/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:18,460] [django.server::log_message::161] [INFO] "POST /api/tasks/775/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:18,460] [django.server::log_message::161] [INFO] "POST /api/tasks/775/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:18,613] [django.server::log_message::161] [INFO] "POST /api/tasks/776/annotations/ HTTP/1.1" 201 3083
[2024-12-04 14:48:18,613] [django.server::log_message::161] [INFO] "POST /api/tasks/776/annotations/ HTTP/1.1" 201 3083
[2024-12-04 14:48:18,765] [django.server::log_message::161] [INFO] "POST /api/tasks/777/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:18,765] [django.server::log_message::161] [INFO] "POST /api/tasks/777/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:18,917] [django.server::log_message::161] [INFO] "POST /api/tasks/778/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:18,917] [django.server::log_message::161] [INFO] "POST /api/tasks/778/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:19,070] [django.server::log_message::161] [INFO] "POST /api/tasks/779/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:19,070] [django.server::log_message::161] [INFO] "POST /api/tasks/779/annotations/ HTTP/1.1" 201 3555
[2024-12-04 14:48:19,220] [django.server::log_message::161] [INFO] "POST /api/tasks/780/annotations/ HTTP/1.1" 201 3332
[2024-12-04 14:48:19,220] [django.server::log_message::161] [INFO] "POST /api/tasks/780/annotations/ HTTP/1.1" 201 3332
[2024-12-04 14:48:19,380] [django.server::log_message::161] [INFO] "POST /api/tasks/781/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:19,380] [django.server::log_message::161] [INFO] "POST /api/tasks/781/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:19,529] [django.server::log_message::161] [INFO] "POST /api/tasks/782/annotations/ HTTP/1.1" 201 3103
[2024-12-04 14:48:19,529] [django.server::log_message::161] [INFO] "POST /api/tasks/782/annotations/ HTTP/1.1" 201 3103
[2024-12-04 14:48:19,680] [django.server::log_message::161] [INFO] "POST /api/tasks/783/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:19,680] [django.server::log_message::161] [INFO] "POST /api/tasks/783/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:19,830] [django.server::log_message::161] [INFO] "POST /api/tasks/784/annotations/ HTTP/1.1" 201 3549
[2024-12-04 14:48:19,830] [django.server::log_message::161] [INFO] "POST /api/tasks/784/annotations/ HTTP/1.1" 201 3549
[2024-12-04 14:48:19,982] [django.server::log_message::161] [INFO] "POST /api/tasks/785/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:19,982] [django.server::log_message::161] [INFO] "POST /api/tasks/785/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:20,132] [django.server::log_message::161] [INFO] "POST /api/tasks/786/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:20,132] [django.server::log_message::161] [INFO] "POST /api/tasks/786/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:20,286] [django.server::log_message::161] [INFO] "POST /api/tasks/787/annotations/ HTTP/1.1" 201 3332
[2024-12-04 14:48:20,286] [django.server::log_message::161] [INFO] "POST /api/tasks/787/annotations/ HTTP/1.1" 201 3332
[2024-12-04 14:48:20,437] [django.server::log_message::161] [INFO] "POST /api/tasks/788/annotations/ HTTP/1.1" 201 3546
[2024-12-04 14:48:20,437] [django.server::log_message::161] [INFO] "POST /api/tasks/788/annotations/ HTTP/1.1" 201 3546
[2024-12-04 14:48:20,588] [django.server::log_message::161] [INFO] "POST /api/tasks/789/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:20,588] [django.server::log_message::161] [INFO] "POST /api/tasks/789/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:20,740] [django.server::log_message::161] [INFO] "POST /api/tasks/790/annotations/ HTTP/1.1" 201 3319
[2024-12-04 14:48:20,740] [django.server::log_message::161] [INFO] "POST /api/tasks/790/annotations/ HTTP/1.1" 201 3319
[2024-12-04 14:48:20,890] [django.server::log_message::161] [INFO] "POST /api/tasks/791/annotations/ HTTP/1.1" 201 3092
[2024-12-04 14:48:20,890] [django.server::log_message::161] [INFO] "POST /api/tasks/791/annotations/ HTTP/1.1" 201 3092
[2024-12-04 14:48:21,038] [django.server::log_message::161] [INFO] "POST /api/tasks/792/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:21,038] [django.server::log_message::161] [INFO] "POST /api/tasks/792/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:21,189] [django.server::log_message::161] [INFO] "POST /api/tasks/793/annotations/ HTTP/1.1" 201 3549
[2024-12-04 14:48:21,189] [django.server::log_message::161] [INFO] "POST /api/tasks/793/annotations/ HTTP/1.1" 201 3549
[2024-12-04 14:48:21,337] [django.server::log_message::161] [INFO] "POST /api/tasks/794/annotations/ HTTP/1.1" 201 3548
[2024-12-04 14:48:21,337] [django.server::log_message::161] [INFO] "POST /api/tasks/794/annotations/ HTTP/1.1" 201 3548
[2024-12-04 14:48:21,489] [django.server::log_message::161] [INFO] "POST /api/tasks/795/annotations/ HTTP/1.1" 201 3544
[2024-12-04 14:48:21,489] [django.server::log_message::161] [INFO] "POST /api/tasks/795/annotations/ HTTP/1.1" 201 3544
[2024-12-04 14:48:21,638] [django.server::log_message::161] [INFO] "POST /api/tasks/796/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:21,638] [django.server::log_message::161] [INFO] "POST /api/tasks/796/annotations/ HTTP/1.1" 201 3559
[2024-12-04 14:48:21,787] [django.server::log_message::161] [INFO] "POST /api/tasks/797/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:21,787] [django.server::log_message::161] [INFO] "POST /api/tasks/797/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:21,937] [django.server::log_message::161] [INFO] "POST /api/tasks/798/annotations/ HTTP/1.1" 201 3104
[2024-12-04 14:48:21,937] [django.server::log_message::161] [INFO] "POST /api/tasks/798/annotations/ HTTP/1.1" 201 3104
[2024-12-04 14:48:22,087] [django.server::log_message::161] [INFO] "POST /api/tasks/799/annotations/ HTTP/1.1" 201 3542
[2024-12-04 14:48:22,087] [django.server::log_message::161] [INFO] "POST /api/tasks/799/annotations/ HTTP/1.1" 201 3542
[2024-12-04 14:48:22,237] [django.server::log_message::161] [INFO] "POST /api/tasks/800/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:22,237] [django.server::log_message::161] [INFO] "POST /api/tasks/800/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:22,386] [django.server::log_message::161] [INFO] "POST /api/tasks/801/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:22,386] [django.server::log_message::161] [INFO] "POST /api/tasks/801/annotations/ HTTP/1.1" 201 3556
[2024-12-04 14:48:22,536] [django.server::log_message::161] [INFO] "POST /api/tasks/802/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:22,536] [django.server::log_message::161] [INFO] "POST /api/tasks/802/annotations/ HTTP/1.1" 201 3560
[2024-12-04 14:48:22,685] [django.server::log_message::161] [INFO] "POST /api/tasks/803/annotations/ HTTP/1.1" 201 3562
[2024-12-04 14:48:22,685] [django.server::log_message::161] [INFO] "POST /api/tasks/803/annotations/ HTTP/1.1" 201 3562
[2024-12-04 14:48:22,835] [django.server::log_message::161] [INFO] "POST /api/tasks/804/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:22,835] [django.server::log_message::161] [INFO] "POST /api/tasks/804/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:22,985] [django.server::log_message::161] [INFO] "POST /api/tasks/805/annotations/ HTTP/1.1" 201 3332
[2024-12-04 14:48:22,985] [django.server::log_message::161] [INFO] "POST /api/tasks/805/annotations/ HTTP/1.1" 201 3332
[2024-12-04 14:48:23,136] [django.server::log_message::161] [INFO] "POST /api/tasks/806/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:23,136] [django.server::log_message::161] [INFO] "POST /api/tasks/806/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:23,285] [django.server::log_message::161] [INFO] "POST /api/tasks/807/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:23,285] [django.server::log_message::161] [INFO] "POST /api/tasks/807/annotations/ HTTP/1.1" 201 3558
[2024-12-04 14:48:23,438] [django.server::log_message::161] [INFO] "POST /api/tasks/808/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:23,438] [django.server::log_message::161] [INFO] "POST /api/tasks/808/annotations/ HTTP/1.1" 201 3557
[2024-12-04 14:48:23,588] [django.server::log_message::161] [INFO] "POST /api/tasks/809/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:23,588] [django.server::log_message::161] [INFO] "POST /api/tasks/809/annotations/ HTTP/1.1" 201 3334
[2024-12-04 14:48:23,755] [django.server::log_message::161] [INFO] "POST /api/tasks/810/annotations/ HTTP/1.1" 201 3333
[2024-12-04 14:48:23,755] [django.server::log_message::161] [INFO] "POST /api/tasks/810/annotations/ HTTP/1.1" 201 3333
[2024-12-04 14:48:24,083] [django.server::log_message::161] [INFO] "GET /api/tasks?project=9&page=1&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 422355
[2024-12-04 14:48:24,083] [django.server::log_message::161] [INFO] "GET /api/tasks?project=9&page=1&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 200 422355
[2024-12-04 14:48:24,092] [core.utils.common::custom_exception_handler::91] [ERROR] d4e97729-4e54-45fa-92d6-0ddb78274122 Invalid page.
Traceback (most recent call last):
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 204, in paginate_queryset
    self.page = paginator.page(page_number)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 76, in page
    number = self.validate_number(number)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/core/paginator.py", line 58, in validate_number
    raise EmptyPage(_('That page contains no results'))
django.core.paginator.EmptyPage: That page contains no results

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 305, in get
    page = self.paginate_queryset(queryset)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/generics.py", line 171, in paginate_queryset
    return self.paginator.paginate_queryset(queryset, self.request, view=self)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 231, in paginate_queryset
    return self.sync_paginate_queryset(queryset, request, view)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/label_studio/data_manager/api.py", line 225, in sync_paginate_queryset
    return super().paginate_queryset(queryset, request, view)
  File "/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/rest_framework/pagination.py", line 209, in paginate_queryset
    raise NotFound(msg)
rest_framework.exceptions.NotFound: Invalid page.
[2024-12-04 14:48:24,095] [django.request::log_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:48:24,095] [django.request::log_response::224] [WARNING] Not Found: /api/tasks/
[2024-12-04 14:48:24,096] [django.server::log_message::161] [WARNING] "GET /api/tasks?project=9&page=2&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
[2024-12-04 14:48:24,096] [django.server::log_message::161] [WARNING] "GET /api/tasks?project=9&page=2&page_size=100&query=%7B%22filters%22%3A+null%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True HTTP/1.1" 404 123
INFO:APP.BASHWORK:python /home/abdelhaym/repos/Pose-app/lightning_pose_app/label_studio/create_labeling_config.py --proj_dir /home/abdelhaym/repos/Pose-app/data/mirror-mouse-example --filename label_studio_config.xml --keypoints_list paw1LH_top/paw2LF_top/paw3RF_top/paw4RH_top/tailBase_top/tailMid_top/nose_top/paw1LH_bot/paw2LF_bot/paw3RF_bot/paw4RH_bot/tailBase_bot/tailMid_bot/nose_bot
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

INFO:APP:Importing demo dataset; this will only take a minute
WARNING:py.warnings:/home/abdelhaym/.conda/envs/lai/lib/python3.10/site-packages/lightning/app/utilities/proxies.py:163: You passed a the value '/home/abdelhaym/repos/Pose-app' as an argument to the `run()` method of root.fiftyone and it looks like this is a path to a file or a folder. Consider wrapping this path in a `lightning.app.storage.Path` object to be able to access these files in your Work.

@hummuscience
Copy link
Author

Developer toosl on the website is showing the following errors:

TypeError: URL constructor: https://7503-0.0.0.0/root.project_ui is not a valid URL.
    Oh IFrameRoute.tsx:24
    js React
    unstable_runWithPriority scheduler.production.min.js:18
    React 3
    F scheduler.production.min.js:16
    onmessage scheduler.production.min.js:12
    6813 scheduler.production.min.js:12
    Webpack 10
[react-dom.production.min.js:216:199](http://esi-wshsv009:7501/static/node_modules/react-dom/cjs/react-dom.production.min.js)
Uncaught TypeError: URL constructor: https://7503-0.0.0.0/root.project_ui is not a valid URL.
    Oh IFrameRoute.tsx:24
    js React
    unstable_runWithPriority scheduler.production.min.js:18
    React 3
    F scheduler.production.min.js:16
    onmessage scheduler.production.min.js:12
    6813 scheduler.production.min.js:12
    Webpack 10
[IFrameRoute.tsx:24:37](http://esi-wshsv009:7501/static/js/components/IFrameRoute.tsx)

@themattinthehatt
Copy link
Collaborator

Hmm what if you change the address back to 127.0.0.1? Is that the default? [Unfortunately we are bumping up against the edge of my network knowledge here]

@themattinthehatt
Copy link
Collaborator

When I check LIGHTNING_CLOUDSPACE_HOST in the actual studio I get 01jbetaf7134t2fd2vqgknn9ga.cloudspaces.litng.ai. I assume you set this value to 0.0.0.0? Or was that somehow resolved from another value you set?

@hummuscience
Copy link
Author

Yeah, I set it to 0.0.0.0 since =0 didnt work

@themattinthehatt
Copy link
Collaborator

I see. Does switching everything back to 127.0.0.1 work? Was that the default host?

@hummuscience
Copy link
Author

I am creating a clean environment right now and will try from scratch. Something was set somewhere that is confusing me. Will report :)

@hummuscience
Copy link
Author

Somehow I am unable to get back to the original way everything works. I have a feeling there there is some .config file that was changed that always sends things to 0.0.0.0 instead.

I think what is happening is that the app is always thinking that its "in the cloud" end uses this logic to create the project page (which in my case is always http://7503-<LIGHTNING_CLOUDSPACE_HOST> which seems to be a valid address in the cloud but not in a local network

@hummuscience
Copy link
Author

hummuscience commented Dec 5, 2024

So, here is the summary:

If I unset LIGHTNING_CLOUDSPACE_HOST, the app runs through 127.0.0.1/localhost and takes random ports to run all the instances

If I export LIGHTNING_CLOUDSPACE_HOST=0 I also have to set export LIGHTNING_CLOUDSPACE_EXPOSED_PORT_COUNT=15 (to something higher than 10). This then switches everything to 0.0.0.0:ports except for the project_ui page which gets this url http://7503-0. This might make sense in the cloud as with your LIGHTINING_CLOUDSPACE_HOST but not in a local network (unless I am mistaken).

I will link this issue in the lightning-pytorch repo and see if someone has an idea...

@hummuscience
Copy link
Author

So, I got the main page working but its not pretty.

I had to change the lightning pytorch code where the weird URL is generated and hard-code the machines hostname into it. like so: http://hostname:{port}

@themattinthehatt
Copy link
Collaborator

Oof that's not pretty. Did this work for the other pages as well, or just the project management page?

@hummuscience
Copy link
Author

The project management page is the only one that gets this weird URL, all the others get typical 0.0.0.0:port URLs

Trying out the app today and will report.

@hummuscience
Copy link
Author

hummuscience commented Dec 6, 2024

The username and password for label-studio are not working.

When I try a random set of username and password I get the following: The email and password you entered don't match.
When I use user@localhost and pw, it seems like something is happening but I am just returned to an empty login page.

This is the output in the terminal when I attemp to login with the correct credentials:

[2024-12-86 14:56:39,464] [django.server::log_message::161] [INFO] "POST /user/login/?next=/projects/ HTTP/1.1" 302 0

[2024-12-86 14:56:39,464]
[django.server::log_message::161] [INFO] "POST /user/login/?next=/projects/ HTTP/1.1" 302 0
[2024-12-86 14:56:39,478]
[django.server:: log_message::161] [INFO] "GET /projects/ HTTP/1.1" 302 0
2024-12-06 14:56:39,4781
[django.server::log_message::161] [INFO] "GET /projects/ HTTP/1.1" 302 0
2024-12-06 14:56:39,491]
[django.server:: log_message::161] [INFO] "GET /?next=/projects/ HTTP/1.1" 302 0
[2024-12-06 14:56:39,491]
[django.server:: log_message::161]
[INFO] "GET /?next=/projects/ HTTP/1.1" 302 0
[2024-12-06 14:56:39,5021
[django.server:: log_message:: 161]
[INFO] "GET /user/login/ HTTP/1.1" 200 5457
[2024-12-06 14:56:39,502]
[django.server::10g_message::161] [INFO] "GET /user/login/ HTTP/1.1" 200 5457

@hummuscience
Copy link
Author

Had to set "LABEL_STUDIO_SESSION_COOKIE_SECURE": "0" in the label studio component.py

"LABEL_STUDIO_SESSION_COOKIE_SECURE": "1",

@themattinthehatt
Copy link
Collaborator

interesting - ok I'll test this in the lightning studio and see if everything still works fine. If so I can update the repo

@themattinthehatt
Copy link
Collaborator

themattinthehatt commented Dec 9, 2024

@hummuscience has this issue been fully addressed now? There is still the issue with the way lightning sets the ports, but I want to make sure that everything else is fine.

@hummuscience
Copy link
Author

Yes. From my side I would say it is solved.

The "fix" is not pretty and I wonder if there will be another way to get this working.

@themattinthehatt themattinthehatt added the enhancement New feature or request label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants