Giter Club home page Giter Club logo

fitlog's Introduction

fastNLP

fastNLP是一款轻量级的自然语言处理(NLP)工具包,目标是减少用户项目中的工程型代码,例如数据处理循环、训练循环、多卡运行等。

fastNLP具有如下的特性:

  • 便捷。在数据处理中可以通过apply函数避免循环、使用多进程提速等;在训练循环阶段可以很方便定制操作。
  • 高效。无需改动代码,实现fp16切换、多卡、ZeRO优化等。
  • 兼容。fastNLP支持多种深度学习框架作为后端。

⚠️ 为了实现对不同深度学习架构的兼容,fastNLP 1.0.0之后的版本重新设计了架构,因此与过去的fastNLP版本不完全兼容, 基于更早的fastNLP代码需要做一定的调整:

fastNLP文档

中文文档

安装指南

fastNLP可以通过以下的命令进行安装

pip install fastNLP>=1.0.0alpha

如果需要安装更早版本的fastNLP请指定版本号,例如

pip install fastNLP==0.7.1

另外,请根据使用的深度学习框架,安装相应的深度学习框架。

Pytorch 下面是使用pytorch来进行文本分类的例子。需要安装torch>=1.6.0。
from fastNLP.io import ChnSentiCorpLoader
from functools import partial
from fastNLP import cache_results
from fastNLP.transformers.torch import BertTokenizer

# 使用cache_results装饰器装饰函数,将prepare_data的返回结果缓存到caches/cache.pkl,再次运行时,如果
#  该文件还存在,将自动读取缓存文件,而不再次运行预处理代码。
@cache_results('caches/cache.pkl')
def prepare_data():
    # 会自动下载数据,并且可以通过文档看到返回的 dataset 应该是包含"raw_words"和"target"两个field的
    data_bundle = ChnSentiCorpLoader().load()
    # 使用tokenizer对数据进行tokenize
    tokenizer = BertTokenizer.from_pretrained('hfl/chinese-bert-wwm')
    tokenize = partial(tokenizer, max_length=256)  # 限制数据的最大长度
    data_bundle.apply_field_more(tokenize, field_name='raw_chars', num_proc=4)  # 会新增"input_ids", "attention_mask"等field进入dataset中
    data_bundle.apply_field(int, field_name='target', new_field_name='labels')  # 将int函数应用到每个target上,并且放入新的labels field中
    return data_bundle
data_bundle = prepare_data()
print(data_bundle.get_dataset('train')[:4])

# 初始化model, optimizer
from fastNLP.transformers.torch import BertForSequenceClassification
from torch import optim
model = BertForSequenceClassification.from_pretrained('hfl/chinese-bert-wwm')
optimizer = optim.AdamW(model.parameters(), lr=2e-5)

# 准备dataloader
from fastNLP import prepare_dataloader
dls = prepare_dataloader(data_bundle, batch_size=32)

# 准备训练
from fastNLP import Trainer, Accuracy, LoadBestModelCallback, TorchWarmupCallback, Event
callbacks = [
    TorchWarmupCallback(warmup=0.1, schedule='linear'),   # 训练过程中调整学习率。
    LoadBestModelCallback()  # 将在训练结束之后,加载性能最优的model
]
# 在训练特定时机加入一些操作, 不同时机能够获取到的参数不一样,可以通过Trainer.on函数的文档查看每个时机的参数
@Trainer.on(Event.on_before_backward())
def print_loss(trainer, outputs):
    if trainer.global_forward_batches % 10 == 0:  # 每10个batch打印一次loss。
        print(outputs.loss.item())

trainer = Trainer(model=model, train_dataloader=dls['train'], optimizers=optimizer,
                  device=0, evaluate_dataloaders=dls['dev'], metrics={'acc': Accuracy()},
                  callbacks=callbacks, monitor='acc#acc',n_epochs=5,
                  # Accuracy的update()函数需要pred,target两个参数,它们实际对应的就是以下的field。
                  evaluate_input_mapping={'labels': 'target'},  # 在评测时,将dataloader中会输入到模型的labels重新命名为target
                  evaluate_output_mapping={'logits': 'pred'}  # 在评测时,将model输出中的logits重新命名为pred
                  )
trainer.run()

# 在测试集合上进行评测
from fastNLP import Evaluator
evaluator = Evaluator(model=model, dataloaders=dls['test'], metrics={'acc': Accuracy()},
                      # Accuracy的update()函数需要pred,target两个参数,它们实际对应的就是以下的field。
                      output_mapping={'logits': 'pred'},
                      input_mapping={'labels': 'target'})
evaluator.run()

更多内容可以参考如下的链接

快速入门

详细使用教程

Paddle 下面是使用paddle来进行文本分类的例子。需要安装paddle>=2.2.0以及paddlenlp>=2.3.3。
from fastNLP.io import ChnSentiCorpLoader
from functools import partial

# 会自动下载数据,并且可以通过文档看到返回的 dataset 应该是包含"raw_words"和"target"两个field的
data_bundle = ChnSentiCorpLoader().load()

# 使用tokenizer对数据进行tokenize
from paddlenlp.transformers import BertTokenizer
tokenizer = BertTokenizer.from_pretrained('hfl/chinese-bert-wwm')
tokenize = partial(tokenizer, max_length=256)  # 限制一下最大长度
data_bundle.apply_field_more(tokenize, field_name='raw_chars', num_proc=4)  # 会新增"input_ids", "attention_mask"等field进入dataset中
data_bundle.apply_field(int, field_name='target', new_field_name='labels')  # 将int函数应用到每个target上,并且放入新的labels field中
print(data_bundle.get_dataset('train')[:4])

# 初始化 model 
from paddlenlp.transformers import BertForSequenceClassification, LinearDecayWithWarmup
from paddle import optimizer, nn
class SeqClsModel(nn.Layer):
    def __init__(self, model_checkpoint, num_labels):
        super(SeqClsModel, self).__init__()
        self.num_labels = num_labels
        self.bert = BertForSequenceClassification.from_pretrained(model_checkpoint)

    def forward(self, input_ids, token_type_ids=None, position_ids=None, attention_mask=None):
        logits = self.bert(input_ids, token_type_ids, position_ids, attention_mask)
        return logits

    def train_step(self, input_ids, labels, token_type_ids=None, position_ids=None, attention_mask=None):
        logits = self(input_ids, token_type_ids, position_ids, attention_mask)
        loss_fct = nn.CrossEntropyLoss()
        loss = loss_fct(logits.reshape((-1, self.num_labels)), labels.reshape((-1, )))
        return {
            "logits": logits,
            "loss": loss,
        }
    
    def evaluate_step(self, input_ids, token_type_ids=None, position_ids=None, attention_mask=None):
        logits = self(input_ids, token_type_ids, position_ids, attention_mask)
        return {
            "logits": logits,
        }

model = SeqClsModel('hfl/chinese-bert-wwm', num_labels=2)

# 准备dataloader
from fastNLP import prepare_dataloader
dls = prepare_dataloader(data_bundle, batch_size=16)

# 训练过程中调整学习率。
scheduler = LinearDecayWithWarmup(2e-5, total_steps=20 * len(dls['train']), warmup=0.1)
optimizer = optimizer.AdamW(parameters=model.parameters(), learning_rate=scheduler)

# 准备训练
from fastNLP import Trainer, Accuracy, LoadBestModelCallback, Event
callbacks = [
    LoadBestModelCallback()  # 将在训练结束之后,加载性能最优的model
]
# 在训练特定时机加入一些操作, 不同时机能够获取到的参数不一样,可以通过Trainer.on函数的文档查看每个时机的参数
@Trainer.on(Event.on_before_backward())
def print_loss(trainer, outputs):
    if trainer.global_forward_batches % 10 == 0:  # 每10个batch打印一次loss。
        print(outputs["loss"].item())

trainer = Trainer(model=model, train_dataloader=dls['train'], optimizers=optimizer,
                  device=0, evaluate_dataloaders=dls['dev'], metrics={'acc': Accuracy()},
                  callbacks=callbacks, monitor='acc#acc',
                  # Accuracy的update()函数需要pred,target两个参数,它们实际对应的就是以下的field。
                  evaluate_output_mapping={'logits': 'pred'},
                  evaluate_input_mapping={'labels': 'target'}
                  )
trainer.run()

# 在测试集合上进行评测
from fastNLP import Evaluator
evaluator = Evaluator(model=model, dataloaders=dls['test'], metrics={'acc': Accuracy()},
                      # Accuracy的update()函数需要pred,target两个参数,它们实际对应的就是以下的field。
                      output_mapping={'logits': 'pred'},
                      input_mapping={'labels': 'target'})
evaluator.run()

更多内容可以参考如下的链接

快速入门

详细使用教程

oneflow
jittor

项目结构

fastNLP的项目结构如下:

fastNLP 开源的自然语言处理库
fastNLP.core 实现了核心功能,包括数据处理组件、训练器、测试器等
fastNLP.models 实现了一些完整的神经网络模型
fastNLP.modules 实现了用于搭建神经网络模型的诸多组件
fastNLP.embeddings 实现了将序列index转为向量序列的功能,包括读取预训练embedding等
fastNLP.io 实现了读写功能,包括数据读入与预处理,模型读写,数据与模型自动下载等

fitlog's People

Contributors

foreverfancy avatar pryest avatar willqvq avatar yhcc avatar ztxtech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fitlog's Issues

可以自动搜索参数吗

比如在config里指定dropout = [0.1, 0.2, 0.3]
在代码里使用dropout = fitlog.config['dropout']
然后执行代码,自动执行三次试验,无需手动写循环,或者每次手动改变参数

一个小bug

首先感谢作者,fitlig真的很好用,下面是我在使用中遇到的一个小bug。
当我使用argsparse传入列表参数时:
parser.add_argument("--hidden_dim",type=int,nargs='+')
此时type(args.hidden_dim)是list,但是执行fitlog.add_hyper(args)后,type(args.hidden_dim)为str,如果此时将次参数传入模型会造成错误。虽然这个bug可以规避,但是感觉也算是个小问题。

增加lr可视化的功能

目前的可视化只有loss和metric能否添加上lr的可视化,这样可以清晰的记录lr schedule

无法打开网页

您好,我用fitlog log logs命令后没有网页显示,没有任何响应,输入localhost:5000后也一样。
参考issue中的方法用fitlog log logs/ --ip 127.0.0.1也不行。
重新安装beta版本也不行,一样没有显示。
图片

请问是什么原因?
我的环境是win10,python3.7

fitlog可以在windows下使用吗

我在windows下的anaconda 中安装了fitlog。
fitlog init example初始化时报错
错误信息:
'cp' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

fit_msg、git_msg和memo的edit无法保存

您好:
网页界面上对fit_msg、git_msg和memo进行edit后提示update successfully,但是刷新网页后还是edit之前的状态,有什么特殊操作需要进行么?

是否可以跑实验的时候实时看loss

我有时看看如果不收敛就暂停一半就不跑了,但是我也需要记录log。
在网页端是否可以显示实时的loss变化曲线然后每隔多少秒自己刷新一次

[feature request] 多个project的实验记录之间合并

经常遇到很多个人用同一份code的不同branch在不同的机器上同时进行不同实验的情况,fitlog有没有打算加入合并多个project实验结果的功能?这样可以把大家的log合并在一起观察结果。

在已存在的git仓库内部, 执行fitlog init 会报错

在已存在的git仓库内部, 执行fitlog init 会报错。提示如下:

`$ fitlog init
Traceback (most recent call last):
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 566, in move
os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/zhou/example/.fitlog' -> '/Users/zhou/example/.git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/zhou/miniconda3/bin/fitlog", line 8, in
sys.exit(main_cmd())
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastcmd/init.py", line 49, in main_cmd
cmd_mapcmd
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastcmd/init_cmd.py", line 26, in init_cmd
committer.init_project(name, hide=args["--hide"], git=not args["--no-git"])
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 496, in init_project
self._switch_to_fast_git(pj_path)
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 167, in _switch_to_fast_git
shutil.move(fitlog_path, git_path)
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 580, in move
copy_function(src, real_dst)
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 266, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/zhou/example/.fitlog'`

希望能修复。十分感谢!

error when not employing the commit API

Hello, thanks for providing this wonderful tool.

When I use the tutorial codes in https://fitlog.readthedocs.io/zh/latest/user/quickstart.html and comment out the commit function, it goes wrong.

import fitlog
import random

fitlog.commit(__file__)  # auto commit your codes
fitlog.add_hyper_in_file(__file__)  # record your hyperparameters
######hyper
rand_seed = 12
######hyper
random.seed(rand_seed)
best_acc, best_step, step = 0, 0, 0

for i in range(200):
    step += 1
    if step % 20 == 0:
        loss = random.random()
        acc = random.random()
        fitlog.add_loss(loss, name="Loss", step=step)
        fitlog.add_metric(acc, name="Acc", step=step)
    if step % 100 == 0:
        test_acc = random.random()
        if test_acc > best_acc:
            best_acc = test_acc
            best_step = step
fitlog.add_best_metric({"Test": {"Acc": best_acc, "Step": best_step}})
fitlog.finish()  # finish the logging

Error information is as below,
image

Is it necessary to use the COMMIT API?

trend看train_loss,训练过程中无曲綫,横坐标为0到1

想试用下fitlog工具加在tf-yolov3代码里,由于代码中未计算mAP,只想看下train_loss曲綫。加的代码如下:
fitlog.add_loss(train_step_loss, name="train_loss", step=train_step)
loss.log中信息如下:
image

在网页中打开是这样的
image

image

是我操作有误吗?

UnicodeDecodeError on Windows

When I followed the tutorial of fitlog, I met a bug at step3.
After I typed "fitlog log logs", I came across an error
"UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 36: illegal multibyte sequence"
at
"../fitlog/fastserver/server/log_config_parser.py", line 1042, in _read
for lineno, line in enumerate(fp, start=1):

So I modified the encoding at line 682.
Is there any better solution?

fitlog revert 无法正确回退代码(版本:0.5.8)

您好:
我在代码起始位置加入fitlog.commit(file)后,按照fitlog revert xxx的方式回退代码,提升 Your code is reverted to /data/yubowen/experiments/NA_revert,但是在NA_revert文件夹中并没有代码,请问是什么问题呢?

多个log的曲线显示

目前只能显示单个log的不同metric,实际上往往需要显示同一metric在不同log下对比,请问如何操作?

是否支持自定义logging的级别?

您好,我看到源码中是在create_log_files()里定义了logging的级别,请问是否支持用户再次自定义这一级别呢?因为我不太希望在训练过程中出现很多行loss,因为tqdm已经可以满足这一需求。
谢谢!

能否选择直接使用.git做管理

是否可以有个选项直接使用.git做版本管理,不用.fitlog,这样更加简单一些,我也可以将logs和.fitconfig这些文件一起添加到git上去,如果放在.fitlog中不能提交到git上去,后面如果丢失,实验记录就丢了

RuntimeError: It seems like you are not running under a folder governed by fitlog.

Reach the root or home.
Can not find the config file.
Traceback (most recent call last):
File "train_presum.py", line 22, in
fitlog.commit('file')
File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/fitlog-0.9.13-py3.8.egg/fitlog/init.py", line 95, in commit
_logger.commit(file, fit_msg)
File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/fitlog-0.9.13-py3.8.egg/fitlog/fastlog/logger.py", line 32, in wrapper
return func(*args, **kwargs)
File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/fitlog-0.9.13-py3.8.egg/fitlog/fastlog/logger.py", line 142, in commit
raise RuntimeError("It seems like you are not running under a folder governed by fitlog.\n" + msg['msg'])
RuntimeError: It seems like you are not running under a folder governed by fitlog.
Error: Config file is not found

wsl环境下报错

环境:win10 wsl ubuntu20.4 python3.7
fitlog init报权限问题,再执行一次提示成功
Traceback (most recent call last):
File "/mnt/d/Ubuntu/miniconda3/envs/test/bin/fitlog", line 8, in
sys.exit(main_cmd())
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastcmd/init.py", line 49, in main_cmd
cmd_mapcmd
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastcmd/init_cmd.py", line 26, in init_cmd
committer.init_project(name, hide=args["--hide"], git=not args["--no-git"])
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 504, in init_project
shutil.copytree(os.path.join(tools_path, "logs"), os.path.join(pj_path, "logs"))
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/shutil.py", line 368, in copytree
raise Error(errors)
shutil.Error: [('/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastgit/normal/logs', '/mnt/d/Github/extest/logs', "[Errno 13] Permission denied: '/mnt/d/Github/extest/logs'")]

需要几个fitlog.commit(__file__)?

1.是否只要入口函数(比如main.py)里有一个fitlog.commit(file)就可以了,其他文件中不需要?
2.如果一个任务里有两个子任务,需要两个不同的入口函数(main_taskA.py, main_taskB.py),是否每个main里都应该有个fitlog.commit(file)?
3.我想学学你们是怎么操作git自动commit的。通常用gitpython这个库可以操作git,但你们好像没有用到。

是否支持多线程同时记录几个训练过程?

我的程序是多线程的,请问

我可以同时记录几个训练过程吗?
内部有锁吗?我可以在不同的线程log吗?

(PS:关键部分释放了gil所以没有性能问题,因为内存不够所以我想不同超参数的训练可以共享内存,多线程共享内存比较方便。)

argparse结合fitlog的bug

你好,最近我想使用argparse模块和fitlog来进行调参实验,但是发现log日志中hyper.log内容显示的不对。

`
parser = argparse.ArgumentParser(description='Hyper Parameters For Traning')
parser.add_argument('-city', type=str, default='lishui', help='select dataset')
parser.add_argument('-nrnn', type=int, default=128, help='Hidden Dimension')
parser.add_argument('-nmlp', type=int, default=128, help='number of hidden size of MLP')
# parser.add_argument('-nlayers', type=int, default=1, help='Number of layers for RNN')

parser.add_argument('-epoch', type=int, default=1000, help='training epoch')
parser.add_argument('-batch', type=int, default=1024, help='Batch Size')
parser.add_argument('-lr', type=float, default=0.001, help='learning rate')

opt = parser.parse_args()
print(opt)

rand_seed = 123

patience = 50
######hyper
city = opt.city
hidden_size_rnn = opt.nrnn
hidden_size_mlp = opt.nmlp
batch_size = opt.batch
lr = opt.lr
max_epoch = opt.epoch
dropouts = None
######hyper`

例如上面代码所示,我通过命令行传入参数,并通过argparse解析传给主程序,并用fitlog的hyper parameter方式记录超参数。
结果在hyper.log中的内容为:
{"hyper": {"city": "opt.city", "hidden_size_rnn": "opt.nrnn", "hidden_size_mlp": "opt.nmlp", "batch_size": "opt.batch", "lr": "opt.lr", "max_epoch": "opt.epoch", "dropouts": "None"}}

fitlog只是简单把 '='前后的内容变成key和value,而没有解析出具体的值

不能在浏览器显示?

您好,我在服务器上运行fitlog log logs后,
显示:
图片
之后浏览器输入http:192.168.1.124(服务器的IP):5000,显示拒绝连接

fitlog==0.3.2
服务器上安装是通过pip install fitlog进行安装的

之后感觉可能是版本太低,因此把就下载了source code,但是下载完后,我应该怎么去安装?
python setup.py
显示:
图片
后面的命令选项我应该填什么?
非常感谢您的回复!!!

save等一系列按键消失

查看完一组实验的曲线再返回主界面。 包括save在内的一系列按钮不见了。同时delete和erase按键也不起任何作用

commit多个文件 & 与git混合使用

您好,我在使用fitlog中产生了一些疑问,烦请解答:

  1. 文档的例子是针对一个main.py进行commit的,如果我在实验中对几个文件都进行了修改,是否需要对所有修改的文件(或者说,所有我希望fitlog记录修改的文件)都进行fitlog.commit呢?
  2. fitlog如何和普通的git混合使用呢?我能或者有需要额外使用git进行add、commit这样的操作吗?还是说我只需要用fitlog进行commit就可以了?

谢谢!

请问如何将for循环和fitlog结合起来

比如我现在有个超参数alpha想从[1, 2...,10]中搜索,我写了一个for循环给我的算法传参数
for alpha in range(1, 11):
fitlog.add_hyper(alpha, 'alpha')
train(..., alpha)
`
在web页面里我发现下一个循环的数值会替换上一次的,没有办法得到10个值的结果。

如何查看fitlog下自动commit的代码变动

工具非常赞,提高了我的调参效率
想请问是否可以直接在网页上查看fitlog.commit的代码版本变动?如果目前工具不支持的话,有什么方案可以推荐吗?

同时跑两个训练脚本,刷新页面hyper会丢失项目

您好,

你们的项目正是我现在需要的日志管理文件,我刚开始使用,非常便利美观。

为了节省时间,通常分开跑不同参数的训练脚本,在同时运行的两个脚本中我调用了figlog,分别创造了两个文件夹(对应前端的两行),我发现刷新浏览器页面之后,hyper会变得奇怪丢失了一些项目,尝试在上方的列选项中重新勾选,发现也不见了一些项目。
目前的解决方法是,使用你们页面上的刷新而不是浏览器的刷新,并且无法对metric使用对比按钮。

是否是我操作错误?
期待你们以后的更新~

Some error happens when initialize table.

你好,首先感谢fitlog。

今天我在使用fitlog的时候,发现了一个问题,可能是当我的实验记录条数(401条)过多,在打开网页的时候,会弹窗报错Some error happens when initialize table。
系统:win10,fitlog版本已经更新到最新。
请问应该如何解决这一问题?
期待您的回复。

请问是否支持python 3.5版本?

我尝试在服务器上安装fitlog, 但出现如下错误:

(venv-torch) zhy@node27:~$ pip install git+https://gitee.com/fastnlp/fitlog
Collecting git+https://gitee.com/fastnlp/fitlog
Cloning https://gitee.com/fastnlp/fitlog to /tmp/pip-req-build-gdyvazpp
Running command git clone -q https://gitee.com/fastnlp/fitlog /tmp/pip-req-build-gdyvazpp
ERROR: Package 'fitlog' requires a different Python: 3.5.2 not in '>=3.6'
WARNING: You are using pip version 19.3.1; however, version 20.3.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

在云上跑, 没有git, 无法使用

能否只让它收集loss, 参数等信息.
我尝试不使用fitlog.commit(file), 但依然无法使用, 会报 ImportError: Failed to initialize: Bad git executable.
好像是导入包时就会判断是否有git.

不使用addbestmetric,metric无法使用compare对比功能

fitlog.add_metric({"dev": {"Acc": acc}}, step=step)
如果只有这一行,则不能用compare对比两次实验的acc曲线,会显示No overlapped metric to compare.

必须是下面的
fitlog.add_metric({"dev": {"Acc": acc}}, step=step)
fitlog.add_best_metric({"dev":{"Acc":best_acc}})
才能有对比界面

memo一刷新就没了

用网页上的刷新键刷新没问题,但是用F5刷新后,自己添加的memo就没了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.