Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enmani/maa-mvp

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

"# MAA MVP"

### 快速开始

本项目提供最小可复现链路:PyTorch 使用 GPU(RTX 4060),JAX 先走 CPU。建议在 Windows 的 Anaconda Prompt 中执行。

### 1. 创建与激活环境

conda create -n maa-mvp python=3.11 -y

conda activate maa-mvp

### 2. 安装依赖

- PyTorch(CUDA 12.x 轮子,已自带运行时)

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124

- JAX(CPU 版)

pip install jax==0.8.1 jaxlib==0.8.1

- 科学计算与优化

pip install numpy scipy pandas matplotlib optax jaxopt flax

- Ladybug / Honeybee(昼光与能耗工作流的 Python 包)

pip install ladybug-core honeybee-core honeybee-radiance honeybee-energy

### 3. 自检(GPU 与后端)

- PyTorch(应为 True 且显示 4060 名称)

python -c "import torch; print('Torch CUDA:', \[torch.cuda.is](http://torch.cuda.is)\_available(), torch.version.cuda); print(torch.cuda.get\_device\_name(0) if \[torch.cuda.is](http://torch.cuda.is)\_available() else 'No CUDA')"

- JAX(当前走 CPU 合理)

python -c "import jax; print('JAX backend:', jax.default\_backend()); print(jax.devices())"

### 4. 目录结构(最小骨架)


maa-mvp/

  ├─ src/

  ├─ notebooks/

  ├─ configs/

  ├─ data/

  │   └─ sample/

  ├─ scripts/

  │   ├─ check\_\[torch.py](http://torch.py)

  │   └─ check\_\[jax.py](http://jax.py)

  ├─ reports/

  ├─ .gitignore

  └─ \[README.md](http://README.md)

示例脚本:

- scripts/check_[torch.py](http://torch.py)

import torch

print("Torch CUDA:", \[torch.cuda.is](http://torch.cuda.is)\_available(), torch.version.cuda)

if \[torch.cuda.is](http://torch.cuda.is)\_available():

    print(torch.cuda.get\_device\_name(0))

- scripts/check_[jax.py](http://jax.py)

import jax

print("JAX backend:", jax.default\_backend())

print(jax.devices())

运行:

python scripts\\check\_\[torch.py](http://torch.py)

python scripts\\check\_\[jax.py](http://jax.py)

### 5. 版本固定与重建环境

- 导出当前环境

conda env export --no-builds > environment.yml

- 在新机器重建

conda env create -f environment.yml

conda activate maa-mvp

### 6. Git 初始化与提交(本地)

git init

git add .

git commit -m "init: mvp skeleton + checks"

可选:

- 打标签

git tag -a v0.1.0 -m "MVP skeleton ready"

git push origin v0.1.0

备注

- Radiance 与 EnergyPlus 主要使用 CPU,请按官方安装包单独安装并将可执行加入 PATH。

- 如需 JAX 使用 GPU,建议在 WSL2 + Ubuntu 环境安装对应的 manylinux CUDA 轮子后再切换。

About

PhD research project-Yan_Di-MAA-Beta_0.1

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.