【笔记】Bilevel代码

代码部分

环境配置

  • 安装包
conda install pyyaml
export TORCH=1.12.1
export CUDA=cu116
pip install --no-index --upgrade torch-spline-conv==1.2.1 -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install --no-index --upgrade torch-scatter==2.0.9 -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install --no-index --upgrade torch-cluster==1.6.0 -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install --no-index --upgrade torch-sparse==0.6.14 -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install --upgrade torch-geometric==1.7.0
conda install -c anaconda texttable

  • 查看版本的网址:https://pytorch-geometric.com/whl/torch-1.12.1%2Bcu116.html
  • dataloader如果import报错,尝试下面的方法
# from torch._six import container_abcs, string_classes, int_classes
import collections.abc as container_abcs
int_classes = int
string_classes = str
  • 错误:DiGraph object has no attribute nod
pip install networkx==1.11
  • 错误:TypeError: ‘method’ object is not iterable
    忘记怎么解决的了
  • vscode debug json配置
{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python 调试程序: 当前文件",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "env": {            
                "PATH": "${workspaceFolder}/.vscode/conda_env/bin",
                "CONDA_PREFIX": "${workspaceFolder}/.vscode/conda_env"            
            },            
            "args": ["--config", "ppo_bihyb_dag.yaml"],
        }
    ]
}
  • 报错:If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
    去官网下载https://github.com/protocolbuffers/protobuf/releases
tar -xzf protobuf-all-3.19.0.tar.gz
cd protobuf-3.19.0
sudo apt-get update
sudo apt-get install -y build-essential cmake
./configure
make
sudo make install
sudo ldconfig -v
protoc --version
export PATH=$PATH:/usr/local/bin
source ~/.bashrc

结果没有解决,直接把tensorflow注释掉了
在这里插入图片描述

数据形式

dag_dict.py

Data Format: tpch_set, id = dag_data_dict[num_dags][tid][sample_id][dag_id]
维度:# (duration, resources)

  • 10
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值