Skip to content

Commit 453626f

Browse files
authored
rename shapeful to dimwit (#18)
1 parent b75777a commit 453626f

42 files changed

Lines changed: 152 additions & 155 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎DOCKER.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Docker Setup for Shapeful
1+
# Docker Setup for DimWit
22

3-
This directory contains Docker configuration for running the Shapeful project with NVIDIA GPU support, Python, and JAX.
3+
This directory contains Docker configuration for running the DimWit project with NVIDIA GPU support, Python, and JAX.
44

55
## Prerequisites
66

@@ -30,7 +30,7 @@ This directory contains Docker configuration for running the Shapeful project wi
3030

3131
2. **Access the container:**
3232
```bash
33-
docker-compose exec shapeful bash
33+
docker-compose exec dimwit bash
3434
```
3535

3636
3. **Stop the container:**
@@ -42,7 +42,7 @@ This directory contains Docker configuration for running the Shapeful project wi
4242

4343
1. **Build the GPU image:**
4444
```bash
45-
docker build -t shapeful:latest .
45+
docker build -t dimwit:latest .
4646
```
4747

4848
2. **Run the container:**
@@ -52,7 +52,7 @@ This directory contains Docker configuration for running the Shapeful project wi
5252
-v sbt-cache:/root/.sbt \
5353
-v ivy-cache:/root/.ivy2 \
5454
-p 8888:8888 \
55-
shapeful:latest
55+
dimwit:latest
5656
```
5757

5858
## Verify GPU Access
@@ -168,7 +168,7 @@ Add more ports in `docker-compose.yml` as required.
168168

169169
## CI/CD Images
170170

171-
Shapeful provides two separate Dockerfiles:
171+
dimwit provides two separate Dockerfiles:
172172
- **Dockerfile** - GPU development image with NVIDIA JAX (~8 GB)
173173
- **Dockerfile.ci** - CPU-only CI/CD image with JAX CPU (~2-3 GB)
174174

@@ -186,7 +186,7 @@ The CPU variant is optimized for CI/CD pipelines, eliminating GPU dependencies w
186186
The CI image is automatically built and published to GitHub Container Registry:
187187

188188
```
189-
ghcr.io/marcelluethi/shapeful-ci:latest
189+
ghcr.io/marcelluethi/dimwit-ci:latest
190190
```
191191

192192
Available tags:
@@ -199,16 +199,16 @@ Pull and run the CI image for local testing:
199199

200200
```bash
201201
# Pull the image
202-
docker pull ghcr.io/marcelluethi/shapeful-ci:latest
202+
docker pull ghcr.io/marcelluethi/dimwit-ci:latest
203203
204204
# Run compilation
205-
docker run --rm -v $(pwd):/workspace ghcr.io/marcelluethi/shapeful-ci:latest sbt compile
205+
docker run --rm -v $(pwd):/workspace ghcr.io/marcelluethi/dimwit-ci:latest sbt compile
206206
207207
# Interactive shell
208-
docker run --rm -it -v $(pwd):/workspace ghcr.io/marcelluethi/shapeful-ci:latest bash
208+
docker run --rm -it -v $(pwd):/workspace ghcr.io/marcelluethi/dimwit-ci:latest bash
209209
210210
# Or build locally
211-
docker build -f Dockerfile.ci -t shapeful-ci .
211+
docker build -f Dockerfile.ci -t dimwit-ci .
212212
```
213213

214214
### Automated Workflows
@@ -268,8 +268,8 @@ Runs on every push and pull request:
268268

269269
| Variant | Command | Size | Use Case |
270270
|---------|---------|------|----------|
271-
| GPU Dev | `docker build -t shapeful .` | ~8 GB | Local development with GPU |
272-
| CPU CI | `docker build -f Dockerfile.ci -t shapeful-ci .` | ~2-3 GB | CI/CD pipelines |
271+
| GPU Dev | `docker build -t dimwit .` | ~8 GB | Local development with GPU |
272+
| CPU CI | `docker build -f Dockerfile.ci -t dimwit-ci .` | ~2-3 GB | CI/CD pipelines |
273273

274274
### Rebuilding the CI Image
275275

@@ -283,8 +283,8 @@ When dependencies need updates (e.g., new JAX version, Python upgrade):
283283
3. **Wait for build completion** (~10-15 minutes)
284284
4. **Verify the update**:
285285
```bash
286-
docker pull ghcr.io/marcelluethi/shapeful-ci:latest
287-
docker run --rm ghcr.io/marcelluethi/shapeful-ci:latest pip list | grep jax
286+
docker pull ghcr.io/marcelluethi/dimwit-ci:latest
287+
docker run --rm ghcr.io/marcelluethi/dimwit-ci:latest pip list | grep jax
288288
```
289289

290290
### Troubleshooting CI

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,19 @@ JAX and einops, and efficient implementations of tensor operations using JAX as
2727
## Example
2828

2929
```scala mdoc
30-
import shapeful.*
30+
import dimwit.*
3131

3232
// Labels are simply Scala types
3333
trait Batch derives Label
3434
trait Feature derives Label
3535

3636
// Create a 2D tensor with shape (3, 2), labeled with Batch and Feature
37-
val t = Tensor.of[Float](
37+
val t = Tensor(
3838
Shape(
3939
Axis[Batch] -> 3,
4040
Axis[Feature] -> 2
4141
),
42+
VType[Float],
4243
Array(
4344
1.0f, 2.0f,
4445
3.0f, 4.0f,

‎build.sbt‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import ai.kien.python.Python
22

3-
43
ThisBuild / version := "0.1.0-SNAPSHOT"
54
ThisBuild / scalaVersion := "3.7.0"
65
ThisBuild / organization := "ch.contrafactus"
@@ -15,23 +14,23 @@ ThisBuild / envVars := Map(
1514
lazy val root = (project in file("."))
1615
.aggregate(core, nn, examples)
1716
.settings(
18-
name := "shapeful-root",
17+
name := "dimwit-root"
1918
)
2019

2120
lazy val core = (project in file("core"))
2221
.settings(
23-
name := "shapeful-core",
22+
name := "dimwit-core",
2423
libraryDependencies ++= Seq(
2524
"dev.scalapy" %% "scalapy-core" % "0.5.3",
2625
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
27-
"org.scalatestplus" %% "scalacheck-1-18" % "3.2.19.0" % Test,
26+
"org.scalatestplus" %% "scalacheck-1-18" % "3.2.19.0" % Test
2827
),
29-
fork := true,
28+
fork := true
3029
)
3130

3231
lazy val nn = (project in file("nn"))
3332
.settings(
34-
name := "shapeful-nn",
33+
name := "dimwit-nn"
3534
)
3635
.dependsOn(core)
3736

@@ -40,11 +39,11 @@ lazy val examples = (project in file("examples"))
4039
.dependsOn(core)
4140
.dependsOn(nn)
4241
.settings(
43-
name := "shapeful-examples",
42+
name := "dimwit-examples",
4443
// Examples use the same Scala version and dependencies as main project
4544
libraryDependencies ++= Seq(
4645
"org.scala-lang" %% "toolkit" % "0.1.7",
47-
"dev.scalapy" %% "scalapy-core" % "0.5.3",
46+
"dev.scalapy" %% "scalapy-core" % "0.5.3"
4847
),
4948
fork := true,
5049
// Don't publish examples
@@ -56,6 +55,3 @@ lazy val examples = (project in file("examples"))
5655
Compile / resourceDirectory := baseDirectory.value / "src" / "main" / "resources",
5756
scalafmtFailOnErrors := false
5857
)
59-
60-
61-

core/src/main/scala/shapeful/autodiff/Autodiff.scala renamed to core/src/main/scala/dimwit/autodiff/Autodiff.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package shapeful.autodiff
1+
package dimwit.autodiff
22

3-
import shapeful.tensor.{Tensor, Tensor0, Tensor1, Tensor2, Shape, AxisIndices}
4-
import shapeful.jax.Jax
3+
import dimwit.tensor.{Tensor, Tensor0, Tensor1, Tensor2, Shape, AxisIndices}
4+
import dimwit.jax.Jax
55
import me.shadaj.scalapy.py
66

77
object Autodiff:

core/src/main/scala/shapeful/autodiff/FloatTensorTree.scala renamed to core/src/main/scala/dimwit/autodiff/FloatTensorTree.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package shapeful.autodiff
1+
package dimwit.autodiff
22

3-
import shapeful.tensor.*
3+
import dimwit.tensor.*
44
import scala.deriving.*
55
import scala.compiletime.*
66

core/src/main/scala/shapeful/autodiff/PyTree.scala renamed to core/src/main/scala/dimwit/autodiff/PyTree.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package shapeful.autodiff
1+
package dimwit.autodiff
22

3-
import shapeful.tensor.{Tensor, Shape}
4-
import shapeful.jax.Jax
3+
import dimwit.tensor.{Tensor, Shape}
4+
import dimwit.jax.Jax
55

66
import me.shadaj.scalapy.py
77
import me.shadaj.scalapy.py.SeqConverters
88
import scala.deriving.*
99
import scala.compiletime.*
10-
import shapeful.tensor.Labels
10+
import dimwit.tensor.Labels
1111

1212
trait ToPyTree[P]:
1313
def toPyTree(p: P): Jax.PyAny

core/src/main/scala/shapeful/autodiff/TensorTree.scala renamed to core/src/main/scala/dimwit/autodiff/TensorTree.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package shapeful.autodiff
1+
package dimwit.autodiff
22

3-
import shapeful.tensor.*
3+
import dimwit.tensor.*
44
import scala.deriving.*
55
import scala.compiletime.*
66

core/src/main/scala/shapeful/jax/Einops.scala renamed to core/src/main/scala/dimwit/jax/Einops.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package shapeful.jax
1+
package dimwit.jax
22

33
import me.shadaj.scalapy.py
44
import me.shadaj.scalapy.py.SeqConverters

core/src/main/scala/shapeful/jax/Jax.scala renamed to core/src/main/scala/dimwit/jax/Jax.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package shapeful.jax
1+
package dimwit.jax
22

33
import me.shadaj.scalapy.py
44
import me.shadaj.scalapy.py.SeqConverters

core/src/main/scala/shapeful/jax/JaxDType.scala renamed to core/src/main/scala/dimwit/jax/JaxDType.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package shapeful.jax
1+
package dimwit.jax
22

33
import me.shadaj.scalapy.py
4-
import shapeful.tensor.DType
4+
import dimwit.tensor.DType
55

66
object JaxDType:
77

0 commit comments

Comments
 (0)