Skip to content

Commit

Permalink
Remove workaround needed for evojax.
Browse files Browse the repository at this point in the history
evojax now imports the latest flax, so we do not need to downgrade neither flax nor jax.

PiperOrigin-RevId: 644286978
  • Loading branch information
oteret authored and Selforg Gardener committed Jun 18, 2024
1 parent 8ff6c23 commit 51de342
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,6 @@
"## Imports"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "WpvHmJytfxpq"
},
"source": [
"We need to downgrade jax, unfortunately.\n",
"This is because we are using evojax which needs an old version of flax.\n",
"Old flax is not compatible with new jax ([see this discussion](https://github.com/google/flax/issues/3180))."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JgpxBfCFf7j2"
},
"outputs": [],
"source": [
"# downgrade jax with cuda.\n",
"!pip install \"jax[cuda12_pip]\"==0.4.23 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -72,9 +49,6 @@
"!pip install --upgrade -e git+https://github.com/google-research/[email protected]#egg=self_organising_systems\u0026subdirectory=biomakerca\n",
"# activate the locally installed package (otherwise a runtime restart is required)\n",
"import pkg_resources\n",
"import importlib\n",
"# Reload the resources because we uninstalled and reinstalled some packages.\n",
"importlib.reload(pkg_resources)\n",
"pkg_resources.get_distribution(\"self_organising_systems\").activate()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,11 @@
"## Imports"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "WpvHmJytfxpq"
},
"source": [
"We need to downgrade jax, unfortunately.\n",
"This is because we are using evojax which needs an old version of flax.\n",
"Old flax is not compatible with new jax ([see this discussion](https://github.com/google/flax/issues/3180))."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JgpxBfCFf7j2"
},
"outputs": [],
"source": [
"# downgrade jax with cuda.\n",
"!pip install \"jax[cuda12_pip]\"==0.4.23 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "287RU0sup5J2"
"id": "CnTgss2gWcHY"
},
"outputs": [],
"source": [
Expand All @@ -74,9 +51,6 @@
"!pip install --upgrade -e git+https://github.com/google-research/[email protected]#egg=self_organising_systems\u0026subdirectory=biomakerca\n",
"# activate the locally installed package (otherwise a runtime restart is required)\n",
"import pkg_resources\n",
"import importlib\n",
"# Reload the resources because we uninstalled and reinstalled some packages.\n",
"importlib.reload(pkg_resources)\n",
"pkg_resources.get_distribution(\"self_organising_systems\").activate()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,11 @@
"## Imports"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "WpvHmJytfxpq"
},
"source": [
"We need to downgrade jax, unfortunately.\n",
"This is because we are using evojax which needs an old version of flax.\n",
"Old flax is not compatible with new jax ([see this discussion](https://github.com/google/flax/issues/3180))."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JgpxBfCFf7j2"
},
"outputs": [],
"source": [
"# downgrade jax with cuda.\n",
"!pip install \"jax[cuda12_pip]\"==0.4.23 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "287RU0sup5J2"
"id": "bVM4KsV0Wise"
},
"outputs": [],
"source": [
Expand All @@ -76,9 +53,6 @@
"!pip install --upgrade -e git+https://github.com/google-research/[email protected]#egg=self_organising_systems\u0026subdirectory=biomakerca\n",
"# activate the locally installed package (otherwise a runtime restart is required)\n",
"import pkg_resources\n",
"import importlib\n",
"# Reload the resources because we uninstalled and reinstalled some packages.\n",
"importlib.reload(pkg_resources)\n",
"pkg_resources.get_distribution(\"self_organising_systems\").activate()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,11 @@
"## Imports"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "WpvHmJytfxpq"
},
"source": [
"We need to downgrade jax, unfortunately.\n",
"This is because we are using evojax which needs an old version of flax.\n",
"Old flax is not compatible with new jax ([see this discussion](https://github.com/google/flax/issues/3180))."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JgpxBfCFf7j2"
},
"outputs": [],
"source": [
"# downgrade jax with cuda.\n",
"!pip install \"jax[cuda12_pip]\"==0.4.23 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "287RU0sup5J2"
"id": "_FW4_grEWn4f"
},
"outputs": [],
"source": [
Expand All @@ -73,9 +50,6 @@
"!pip install --upgrade -e git+https://github.com/google-research/[email protected]#egg=self_organising_systems\u0026subdirectory=biomakerca\n",
"# activate the locally installed package (otherwise a runtime restart is required)\n",
"import pkg_resources\n",
"import importlib\n",
"# Reload the resources because we uninstalled and reinstalled some packages.\n",
"importlib.reload(pkg_resources)\n",
"pkg_resources.get_distribution(\"self_organising_systems\").activate()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,11 @@
"## Imports"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "WpvHmJytfxpq"
},
"source": [
"We need to downgrade jax, unfortunately.\n",
"This is because we are using evojax which needs an old version of flax.\n",
"Old flax is not compatible with new jax ([see this discussion](https://github.com/google/flax/issues/3180))."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JgpxBfCFf7j2"
},
"outputs": [],
"source": [
"# downgrade jax with cuda.\n",
"!pip install \"jax[cuda12_pip]\"==0.4.23 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "287RU0sup5J2"
"id": "X_3-KqY3WtXp"
},
"outputs": [],
"source": [
Expand All @@ -72,9 +49,6 @@
"!pip install --upgrade -e git+https://github.com/google-research/[email protected]#egg=self_organising_systems\u0026subdirectory=biomakerca\n",
"# activate the locally installed package (otherwise a runtime restart is required)\n",
"import pkg_resources\n",
"import importlib\n",
"# Reload the resources because we uninstalled and reinstalled some packages.\n",
"importlib.reload(pkg_resources)\n",
"pkg_resources.get_distribution(\"self_organising_systems\").activate()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,11 @@
"## Imports"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "WpvHmJytfxpq"
},
"source": [
"We need to downgrade jax, unfortunately.\n",
"This is because we are using evojax which needs an old version of flax.\n",
"Old flax is not compatible with new jax ([see this discussion](https://github.com/google/flax/issues/3180))."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JgpxBfCFf7j2"
},
"outputs": [],
"source": [
"# downgrade jax with cuda.\n",
"!pip install \"jax[cuda12_pip]\"==0.4.23 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "287RU0sup5J2"
"id": "u0WhscjnW0FO"
},
"outputs": [],
"source": [
Expand All @@ -74,9 +51,6 @@
"!pip install --upgrade -e git+https://github.com/google-research/[email protected]#egg=self_organising_systems\u0026subdirectory=biomakerca\n",
"# activate the locally installed package (otherwise a runtime restart is required)\n",
"import pkg_resources\n",
"import importlib\n",
"# Reload the resources because we uninstalled and reinstalled some packages.\n",
"importlib.reload(pkg_resources)\n",
"pkg_resources.get_distribution(\"self_organising_systems\").activate()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,6 @@
"## Imports"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "WpvHmJytfxpq"
},
"source": [
"We need to downgrade jax, unfortunately.\n",
"This is because we are using evojax which needs an old version of flax.\n",
"Old flax is not compatible with new jax ([see this discussion](https://github.com/google/flax/issues/3180))."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JgpxBfCFf7j2"
},
"outputs": [],
"source": [
"# downgrade jax with cuda.\n",
"!pip install \"jax[cuda12_pip]\"==0.4.23 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -73,9 +50,6 @@
"!pip install --upgrade -e git+https://github.com/google-research/self-organising-systems.git#egg=self_organising_systems\u0026subdirectory=biomakerca\n",
"# activate the locally installed package (otherwise a runtime restart is required)\n",
"import pkg_resources\n",
"import importlib\n",
"# Reload the resources because we uninstalled and reinstalled some packages.\n",
"importlib.reload(pkg_resources)\n",
"pkg_resources.get_distribution(\"self_organising_systems\").activate()"
]
},
Expand Down

0 comments on commit 51de342

Please sign in to comment.