Skip to content

DENG-8307 Test new "moz-mlops" W&B Team - #47

Draft
abhi-agg wants to merge 4 commits into
mainfrom
track-artifacts-imageclassifier-example
Draft

DENG-8307 Test new "moz-mlops" W&B Team#47
abhi-agg wants to merge 4 commits into
mainfrom
track-artifacts-imageclassifier-example

Conversation

@abhi-agg

@abhi-agg abhi-agg commented Apr 17, 2025

Copy link
Copy Markdown
Collaborator

Goal(s) of this Pull Request:

Example of how it works:

Follow the instructions

Acceptance criteria:

In order to approve, reviewer must be able to...

  • ...

Uses #41

@abhi-agg abhi-agg changed the title Update image classifier example to track artifacts using W&B Test new "moz-mlops" W&B Team Apr 23, 2025
@abhi-agg

Copy link
Copy Markdown
Collaborator Author

Testing

  1. Run the ImageClassifier Flow (replace your-api-key-here with your own API key)
    WANDB_API_KEY=your-api-key-here WANDB_PROJECT=test-moz-mlops-team python image_classifier_flow.py --environment=pypi run --offline False
    

However, I ran into the issues:

Metaflow 2.15.7.2+obcheckpoint(0.2.1);ob(v1) executing ImageClassifierFlow for user:aaggarwal@mozilla.com
Validating your flow...
    The graph looks good!
Running pylint...
    Pylint is happy!
2025-04-22 14:52:20.251 Creating local datastore in current directory (/Users/aaggarwal/work/mozmlops/examples/image_classifier/.metaflow)
2025-04-22 14:52:21.002 Bootstrapping virtual environment(s) ...








2025-04-22 15:07:10.680 Virtual environment(s) bootstrapped!
2025-04-22 15:07:13.781 Workflow starting (run-id 45814), see it in the UI at https://ui.desertowl.obp.outerbounds.com/p/contml/ImageClassifierFlow/45814
2025-04-22 15:07:30.043 [45814/start/259539 (pid 21897)] Task is starting.
2025-04-22 15:07:38.334 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Task is starting (Pod is running, Container is running)...
2025-04-22 15:07:34.963 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Setting up task environment.
2025-04-22 15:07:37.954 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Downloading code package...
2025-04-22 15:07:38.795 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Code package downloaded.
2025-04-22 15:07:39.169 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Task is starting.
2025-04-22 15:07:41.517 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Bootstrapping virtual environment...
2025-04-22 15:08:06.299 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Environment bootstrapped.
2025-04-22 15:08:09.885 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] <flow ImageClassifierFlow step start> failed:
2025-04-22 15:08:10.844 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     Internal error
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Traceback (most recent call last):
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torch/__init__.py", line 318, in _load_global_deps
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     ctypes.CDLL(global_deps_lib_path, mode=ctypes.RTLD_GLOBAL)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/ctypes/__init__.py", line 376, in __init__
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     self._handle = _dlopen(self._name, mode)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]                    ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] OSError: libcudart.so.12: cannot open shared object file: No such file or directory
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] During handling of the above exception, another exception occurred:
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] Traceback (most recent call last):
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/cli.py", line 611, in main
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     start(auto_envvar_prefix="METAFLOW", obj=state)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/_vendor/click/core.py", line 829, in __call__
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     return self.main(args, kwargs)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]            ^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/_vendor/click/core.py", line 782, in main
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     rv = self.invoke(ctx)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]          ^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/cli_components/utils.py", line 69, in invoke
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     return _process_result(sub_ctx.command.invoke(sub_ctx))
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/_vendor/click/core.py", line 1066, in invoke
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     return ctx.invoke(self.callback, ctx.params)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/_vendor/click/core.py", line 610, in invoke
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     return callback(args, kwargs)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]            ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/tracing/__init__.py", line 27, in wrapper_func
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     return func(args, kwargs)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]            ^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/_vendor/click/decorators.py", line 21, in new_func
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     return f(get_current_context(), args, kwargs)
2025-04-22 15:08:10.846 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/cli_components/step_cmd.py", line 167, in step
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     task.run_step(
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/task.py", line 672, in run_step
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     self._exec_step_function(step_func)
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/metaflow/task.py", line 62, in _exec_step_function
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     step_function()
2025-04-22 15:08:20.102 [45814/start/259539 (pid 21897)] Kubernetes error:
2025-04-22 15:08:20.102 [45814/start/259539 (pid 21897)] Error: low/metaflow/_vendor/click/core.py", line 610, in invoke
2025-04-22 15:08:20.226 [45814/start/259539 (pid 21897)] return callback(args, kwargs)
2025-04-22 15:08:20.226 [45814/start/259539 (pid 21897)] ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:20.226 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/metaflow/tracing/__init__.py", line 27, in wrapper_func
2025-04-22 15:08:20.226 [45814/start/259539 (pid 21897)] return func(args, kwargs)
2025-04-22 15:08:20.226 [45814/start/259539 (pid 21897)] ^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:20.226 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/metaflow/_vendor/click/decorators.py", line 21, in new_func
2025-04-22 15:08:20.226 [45814/start/259539 (pid 21897)] return f(get_current_context(), args, kwargs)
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/metaflow/cli_components/step_cmd.py", line 167, in step
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] task.run_step(
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/metaflow/task.py", line 672, in run_step
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] self._exec_step_function(step_func)
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/metaflow/task.py", line 62, in _exec_step_function
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] step_function()
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/image_classifier_flow.py", line 41, in start
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] import torchvision
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torchvision/__init__.py", line 5, in <module>
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] import torch
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torch/__init__.py", line 404, in <module>
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] _load_global_deps()
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torch/__init__.py", line 362, in _load_global_deps
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] _preload_cuda_deps(lib_folder, lib_name)
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torch/__init__.py", line 302, in _preload_cuda_deps
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] raise ValueError(f"{lib_name} not found in the system path {sys.path}")
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] ValueError: libcublas.so.[0-9] not found in the system path ['/home/worker/metaflow', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python311.zip', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/lib-dynload', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/setuptools/_vendor']
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)]
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)] (exit code 1). This could be a transient error. Use @retry to retry.
2025-04-22 15:08:20.227 [45814/start/259539 (pid 21897)]
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/image_classifier_flow.py", line 41, in start
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     import torchvision
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torchvision/__init__.py", line 5, in <module>
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     import torch
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torch/__init__.py", line 404, in <module>
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     _load_global_deps()
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torch/__init__.py", line 362, in _load_global_deps
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     _preload_cuda_deps(lib_folder, lib_name)
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]   File "/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/torch/__init__.py", line 302, in _preload_cuda_deps
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]     raise ValueError(f"{lib_name} not found in the system path {sys.path}")
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc] ValueError: libcublas.so.[0-9] not found in the system path ['/home/worker/metaflow', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python311.zip', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/lib-dynload', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages', '/home/worker/metaflow/linux-64/1210a8438335d32/lib/python3.11/site-packages/setuptools/_vendor']
2025-04-22 15:08:10.847 [45814/start/259539 (pid 21897)] [pod t-5dced5f5-bql8g-6h5mc]
2025-04-22 15:08:20.528 [45814/start/259539 (pid 21897)] Task failed.
2025-04-22 15:08:20.781 Workflow failed.
2025-04-22 15:08:20.781 Terminating 0 active tasks...
2025-04-22 15:08:20.781 Flushing logs...
    Step failure:
    Step start (task-id 259539) failed.

I sought help from outerbounds team but it is taking long time to resolve this issue. Hence, I will test W&B integration without metaflow.

@abhi-agg

Copy link
Copy Markdown
Collaborator Author

Default Team in my W&B user account: mlops-mozilla, My role in that team: Admin

Ran the following command on the terminal:
WANDB_API_KEY=<your-api-key-here> WANDB_PROJECT=test-moz-mlops-team python test_wandb_integration.py

And it logged the run in mlops-mozilla Team. See console logs for details:

wandb: Currently logged in as: aaggarwal (mlops-mozilla). Use `wandb login --relogin` to force relogin
wandb: Tracking run with wandb version 0.17.9
wandb: Run data is saved locally in /Users/aaggarwal/work/mozmlops/examples/image_classifier/wandb/run-20250422_212150-ew79tcsp
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run dark-violet-1
wandb: ⭐️ View project at https://wandb.ai/mlops-mozilla/test-moz-mlops-team
wandb: 🚀 View run at https://wandb.ai/mlops-mozilla/test-moz-mlops-team/runs/ew79tcsp
Traceback (most recent call last):
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/test_wandb_integration.py", line 147, in <module>
    image_classifier.start()
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/test_wandb_integration.py", line 44, in start
    current.card.append(Markdown("# Weights & Biases"))
    ^^^^^^^
NameError: name 'current' is not defined
wandb: 🚀 View run dark-violet-1 at: https://wandb.ai/mlops-mozilla/test-moz-mlops-team/runs/ew79tcsp
wandb: ⭐️ View project at: https://wandb.ai/mlops-mozilla/test-moz-mlops-team
wandb: Synced 6 W&B file(s), 0 media file(s), 3 artifact file(s) and 1 other file(s)
wandb: Find logs at: ./wandb/run-20250422_212150-ew79tcsp/logs
wandb: WARNING The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require("core")`! See https://wandb.me/wandb-core for more information.

Default Team in my W&B user account: mlops-mozilla, My role in that team: Viewer

Ran the following command on the terminal:
WANDB_API_KEY=<your-api-key-here> WANDB_PROJECT=test-moz-mlops-team python test_wandb_integration.py

and it failed as it didn't allow me to schedule any run in that Team. See detailed console logs below:

downloading and normalizing dataset
wandb: Currently logged in as: aaggarwal (mlops-mozilla). Use `wandb login --relogin` to force relogin
wandb: ERROR Error while calling W&B API: viewer role does not have Create Run permission (<Response [403]>)
wandb: ERROR It appears that you do not have permission to access the requested resource. Please reach out to the project owner to grant you access. If you have the correct permissions, verify that there are no issues with your networking setup.(Error 403: Forbidden)
Traceback (most recent call last):
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/test_wandb_integration.py", line 144, in <module>
    image_classifier.start()
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/test_wandb_integration.py", line 42, in start
    tracking_run = wandb.init(project=wandb_project)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/env_example_imageclassifier/lib/python3.11/site-packages/wandb/sdk/wandb_init.py", line 1243, in init
    wandb._sentry.reraise(e)
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/env_example_imageclassifier/lib/python3.11/site-packages/wandb/analytics/sentry.py", line 155, in reraise
    raise exc.with_traceback(sys.exc_info()[2])
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/env_example_imageclassifier/lib/python3.11/site-packages/wandb/sdk/wandb_init.py", line 1229, in init
    return wi.init()
           ^^^^^^^^^
  File "/Users/aaggarwal/work/mozmlops/examples/image_classifier/env_example_imageclassifier/lib/python3.11/site-packages/wandb/sdk/wandb_init.py", line 833, in init
    raise error
wandb.errors.CommError: It appears that you do not have permission to access the requested resource. Please reach out to the project owner to grant you access. If you have the correct permissions, verify that there are no issues with your networking setup.(Error 403: Forbidden)

This proves that setting the role of a user to Viewer in a W&B Team indeed forbids the user to schedule any run there, effectively marking it as a read-only Team

## Default Team in my W&B user account: moz-mlops, My role in that team: Member

Ran the following command on the terminal:
WANDB_API_KEY=<your-api-key-here> WANDB_PROJECT=test-moz-mlops-team python test_wandb_integration.py

And it logged the run in moz-mlops Team. See the console logs below for details:

downloading and normalizing dataset
wandb: Currently logged in as: aaggarwal (moz-mlops). Use `wandb login --relogin` to force relogin
wandb: Tracking run with wandb version 0.17.9
wandb: Run data is saved locally in /Users/aaggarwal/work/mozmlops/examples/image_classifier/wandb/run-20250423_111522-ze90jhb0
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run prime-snowflake-2
wandb: ⭐️ View project at https://wandb.ai/moz-mlops/test-moz-mlops-team
wandb: 🚀 View run at https://wandb.ai/moz-mlops/test-moz-mlops-team/runs/ze90jhb0
Your training run is tracked [here](https://wandb.ai/moz-mlops/test-moz-mlops-team/runs/ze90jhb0).
Training on: cpu
[1,  2000] loss: 2.195
[1,  4000] loss: 1.843
[1,  6000] loss: 1.653
[1,  8000] loss: 1.539
[1, 10000] loss: 1.466
[1, 12000] loss: 1.435
[2,  2000] loss: 1.374
[2,  4000] loss: 1.341
[2,  6000] loss: 1.316
[2,  8000] loss: 1.310
[2, 10000] loss: 1.277
[2, 12000] loss: 1.251
Finished Training
Tracking trained model via W&B
Evaluating on: cpu
Accuracy of the network on the 10000 test images: 53 %
wandb: 🚀 View run prime-snowflake-2 at: https://wandb.ai/moz-mlops/test-moz-mlops-team/runs/ze90jhb0
wandb: ⭐️ View project at: https://wandb.ai/moz-mlops/test-moz-mlops-team
wandb: Synced 5 W&B file(s), 0 media file(s), 3 artifact file(s) and 1 other file(s)
wandb: Find logs at: ./wandb/run-20250423_111522-ze90jhb0/logs
wandb: WARNING The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require("core")`! See https://wandb.me/wandb-core for more information.

I verified that the corresponding artifacts are getting stored in the GCS bucket connected to moz-mlops Team.

This proves that the new moz-mlops Team that is configured to use Mozilla-managed GCS storage is working as expected.

@abhi-agg

abhi-agg commented May 5, 2025

Copy link
Copy Markdown
Collaborator Author

UPDATE: There has been a new development regarding where we should be provisioning the GCS buckets for W&B workflows. As a result of that:

  1. I deleted the new moz-mlops Team
  2. Provisioned a new GCS bucket inside the “mlops” tenant
  3. Created a new Team with the same name (moz-mlops) using the bucket provisioned in the last step

Details in this comment.

@abhi-agg

abhi-agg commented May 5, 2025

Copy link
Copy Markdown
Collaborator Author

Default Team in my W&B user account: moz-mlops, My role in that team: Member

Ran the following command on the terminal:
WANDB_API_KEY=<your-api-key-here> WANDB_PROJECT=test-moz-mlops-team python test_wandb_integration.py

And it logged the run in moz-mlops Team. See the console logs below for details:

downloading and normalizing dataset
wandb: Currently logged in as: aaggarwal (moz-mlops). Use `wandb login --relogin` to force relogin
wandb: Tracking run with wandb version 0.17.9
wandb: Run data is saved locally in /Users/aaggarwal/work/mozmlops/examples/image_classifier/wandb/run-20250505_094952-6syafwrv
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run civilized-force-1
wandb: ⭐️ View project at https://wandb.ai/moz-mlops/test-moz-mlops-team
wandb: 🚀 View run at https://wandb.ai/moz-mlops/test-moz-mlops-team/runs/6syafwrv
Your training run is tracked [here](https://wandb.ai/moz-mlops/test-moz-mlops-team/runs/6syafwrv).
Training on: cpu
[1,  2000] loss: 2.176
[1,  4000] loss: 1.877
[1,  6000] loss: 1.677
[1,  8000] loss: 1.581
[1, 10000] loss: 1.527
[1, 12000] loss: 1.467
[2,  2000] loss: 1.400
[2,  4000] loss: 1.375
[2,  6000] loss: 1.375
[2,  8000] loss: 1.328
[2, 10000] loss: 1.318
[2, 12000] loss: 1.302
Finished Training
Tracking trained model via W&B
Evaluating on: cpu
Accuracy of the network on the 10000 test images: 53 %
wandb: 🚀 View run civilized-force-1 at: https://wandb.ai/moz-mlops/test-moz-mlops-team/runs/6syafwrv
wandb: ⭐️ View project at: https://wandb.ai/moz-mlops/test-moz-mlops-team
wandb: Synced 5 W&B file(s), 0 media file(s), 3 artifact file(s) and 0 other file(s)
wandb: Find logs at: ./wandb/run-20250505_094952-6syafwrv/logs
wandb: WARNING The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require("core")`! See https://wandb.me/wandb-core for more information.

I verified that the corresponding artifacts are getting stored in the new GCS bucket connected to moz-mlops Team.

This proves that the new moz-mlops Team that is configured to use Mozilla-managed GCS storage is working as expected.

@abhi-agg abhi-agg changed the title Test new "moz-mlops" W&B Team DENG-8307 Test new "moz-mlops" W&B Team May 5, 2025
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