question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.6.3 introduced a circular dependency with orbax

See original GitHub issue

Provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible also provide a summary of what steps or workarounds you have already tried.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Flax, jax, jaxlib versions (obtain with pip show flax jax jaxlib:
  • Python version:
  • GPU/TPU model and memory:
  • CUDA version (if applicable):

Problem you have encountered:

Flax 0.6.3 added a dependency on orbax, which has a dependency on flax. This is causing https://github.com/tensorflow/tfjs/issues/7159 in the TensorFlow.js repository. TFJS resolves pypi packages using Bazel, which does not support circular dependencies.

Was this change intentional? If so, I can file a bug with rules_python instead, although last time this kind of circular dependency issue arose, it was determined to be a bug in the downstream package. I’m not sure if that true in this case, though.

What you expected to happen:

No circular dependency.

Logs, error messages, etc:

Steps to reproduce:

Whenever possible, please provide a minimal example. Please consider submitting it as a Colab link.

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
cgarciaecommented, Dec 13, 2022

For the future, here are some ideas:

  • Orbax becomes the owner of seralization.py, this makes sense for a check-pointing library. On the Flax side we add some wrappers.
  • Create a new flax-serialization library which both libraries can depend on to avoid the circular dependency.
0reactions
levskayacommented, Dec 14, 2022

We have to maintain control of traversals / flattening nested-dict, struct dataclass, etc. As we use those for more things than just checkpoints. One hope is to enhance JAX pytree calls with the notion of “paths” such that we could remove our hacky state-dict registry altogether - but this is still in discussion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flax 0.6.3 circular dependency in Bazel build #7159 - GitHub
Have I written custom code (as opposed to using a stock example script provided in TensorFlow. · OS Platform and Distribution (e.g., Linux...
Read more >
Circular Dependencies in Spring - Baeldung
A quick writeup on dealing with circular dependencies in Spring: how they occur and several ways to work around them.
Read more >
How to fix nasty circular dependency issues once and for all in ...
Exactly the same problem can be introduced when having circular dependencies between module variables and functions that run during module ...
Read more >
Avoiding circular dependency errors in DAX - SQLBI
A circular dependency is detected whenever two objects reference each other, in such a way that Power BI cannot process the objects.
Read more >
Handling circular dependency errors in AWS CloudFormation
Resource A is dependent on Resource B, and Resource B is dependent on Resource A. When AWS CloudFormation assesses that this type of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found