Skip to content

Use legacy Adam on macOS when tensorflow-metal is installed#28

Open
Copilot wants to merge 13 commits into
devfrom
copilot/use-legacy-adam-solver
Open

Use legacy Adam on macOS when tensorflow-metal is installed#28
Copilot wants to merge 13 commits into
devfrom
copilot/use-legacy-adam-solver

Conversation

Copy link
Copy Markdown

Copilot AI commented May 12, 2026

  • Diagnose CI failure: _legacy_adam_class() returns non-None in Keras 3 because attribute access succeeds, but instantiation raises ImportError
  • Fix _legacy_adam_class() to probe actual instantiation so it returns None in Keras 3 environments (no Metal)
  • Test skips correctly in Keras 3 CI; production path on macOS+Metal (Keras 2) unchanged

Copilot AI and others added 7 commits May 12, 2026 06:50
Agent-Logs-Url: https://github.com/DocGarbanzo/donkeycar/sessions/2554f4db-1330-4137-b772-07f64d9a3372

Co-authored-by: DocGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DocGarbanzo/donkeycar/sessions/2554f4db-1330-4137-b772-07f64d9a3372

Co-authored-by: DocGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DocGarbanzo/donkeycar/sessions/2554f4db-1330-4137-b772-07f64d9a3372

Co-authored-by: DocGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DocGarbanzo/donkeycar/sessions/2554f4db-1330-4137-b772-07f64d9a3372

Co-authored-by: DocGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Copy link
Copy Markdown
Owner

@DocGarbanzo DocGarbanzo left a comment

Choose a reason for hiding this comment

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

The tests are bad. We want a test that shows proper convergence on a tf model using adam. Do we not have a small dataset checked in? If not, then create a standalone model similar to the linear model or even just a feed forward nn and prove the convergence there.

@DocGarbanzo DocGarbanzo marked this pull request as ready for review May 12, 2026 07:08
Copilot AI and others added 2 commits May 12, 2026 07:10
Agent-Logs-Url: https://github.com/DocGarbanzo/donkeycar/sessions/93138dfa-e218-44ea-90b5-f7d4f973fc1e

Co-authored-by: DocGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented May 12, 2026

The tests are bad. We want a test that shows proper convergence on a tf model using adam. Do we not have a small dataset checked in? If not, then create a standalone model similar to the linear model ...

Updated tests to use a real standalone TensorFlow model and assert convergence with Adam-based training, including the Metal+legacy Adam path when available (06da212). The previous mock-only optimizer tests were replaced with deterministic fit/loss convergence checks in donkeycar/tests/test_keras_optimizer.py.

…Keras 3 stub

Agent-Logs-Url: https://github.com/DocGarbanzo/donkeycar/sessions/897c325a-e9ac-4052-8e61-9d5b897c4b87

Co-authored-by: DocGarbanzo <47540921+DocGarbanzo@users.noreply.github.com>
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.

2 participants