minitorch系列记录——1. 环境安装和机器学习基础

网页主页:https://minitorch.github.io/index.html
github项目地址:https://github.com/minitorch

是2020年cornell大学的一门课程,

课程链接:https://canvas.cornell.edu/courses/20583/assignments/syllabus
讲师介绍:http://rush-nlp.com/
这是一个大学课程的课后作业项目,一共就:

Setup(安装环境)
ML Primer ( 机器学习基础知识复习)
Fundamentals
Autodiff
Tensors
Efficiency
Networks
其中,除了第二部分之外,其他部分在github上都有Public template,每次进行对应module的任务时,都需要先git clone对应的module模块,完成相应的任务

2. 任务要求
要求从这个repo中进行clone,https://github.com/minitorch
作业提交:https://github.com/shaiic/mini-ai-lab
任务提交说明:https://wiki.shaiic.com/pages/viewpage.action?pageId=27688971

1. Setup(环境安装)

网页说明:https://minitorch.github.io/install.html
github项目地址:https://github.com/minitorch/Module-0

个人安装记录:

要求是python3.7以上的版本,本机有conda环境,所以直接用conda创建一个新环境好了
 

# 创建一个名叫 minitorch的新环境
conda create -n minitorch python=3.7

# 切换到刚刚新创建的这个环境里去
conda activate minitorch

# 安装额外需要的一个包
conda install llvmlite

然后根据官网的提示,需要把对应的Module 0的github项目,是一个public template,可以直接use this template,借用这个项目的模板去生成自己的内容。

 然后自己找个目录,新建一个minitorch,以后这个项目都丢到这里,进入这个文件夹,然后打开git的bash,把自己账号下生成的这个module0项目git clone一下就好了,例如,我使用的就是:

cd minitorch
git clone https://github.com/MachineCF/Module0.git
cd Module0

之后一定要删除Module0下面的project的这个文件夹,不然后面执行的安装的时候会报错,下面是报错信息,一定要切记,把这个删除

 error: Multiple top-level packages discovered in a flat-layout: ['project', 'minitorch'].

    To avoid accidental inclusion of unwanted files or directories,
    setuptools will not proceed with this build.

    If you are trying to create a single distribution with multiple packages
    on purpose, you should not rely on automatic discovery.
    Instead, consider the following options:

    1. set up custom discovery (`find` directive with `include` or `exclude`)
    2. use a `src-layout`
    3. explicitly set `py_modules` or `packages` with a list of names

    To find more information, look for "package discovery" on setuptools docs.

 可以直接手动删除,也可以命令行删除

rmdir /S project

 之后就能简单多了

切换环境,我的环境是mini
切换路径到Modele0中


activate mini
python -m pip install -r requirements.txt
python -m pip install -r requirements.extra.txt
python -m pip install -Ue .

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值