Vertigo42
(Ran Suari)
March 3, 2020, 2:03pm
847
Hi,
I installed fastai2 today from github (I used the pip install -e ".[dev]"
), including the fastcore and nbdev.
when I run doc(IndexSplitter) to see the documentation, I get an error that if I want to see the full documentation and hyperlinks I need to pip install nbdev (which I have).
I ran conda list and the nbdev version under the fastai2 enviroment is 0.2.12.
am I missing something?
It was a mistake when we split the notebook in several parts. Fixed now!
2 Likes
You might also need the master version of nbdev since this is a bug I fixed recently.
1 Like
dhoa
(Dien-Hoa)
March 3, 2020, 3:25pm
850
I ran into an error of notebook 43_tabular.learner when running on google colab.
learn.predict(df.iloc[0])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-19-7bebb4d34d49> in <module>()
----> 1 learn.predict(df.iloc[0])
13 frames
/usr/local/lib/python3.6/dist-packages/fastai2/torch_core.py in tensor(x, *rest, **kwargs)
110 else torch.tensor(x, **kwargs) if isinstance(x, (tuple,list))
111 else _array2tensor(x) if isinstance(x, ndarray)
--> 112 else as_tensor(x.values, **kwargs) if isinstance(x, (pd.Series, pd.DataFrame))
113 else as_tensor(x, **kwargs) if hasattr(x, '__array__') or is_iter(x)
114 else _array2tensor(array(x), **kwargs))
TypeError: can't convert np.ndarray of type numpy.object_. The only supported types are: float64, float32, float16, int64, int32, int16, int8, uint8, and bool
I installed fastai2 with:
import os
!pip install git+https://github.com/fastai/fastai2
os._exit(00)
muellerzr
(Zachary Mueller)
March 3, 2020, 4:04pm
851
@dhoa (as it says in the FAQ), you should be using the git version of fastcore too. Try that and see if you still get the error
lgvaz
(Lucas Goulart Vazquez)
March 3, 2020, 5:08pm
852
Are random transforms being applied to the validation set?
I noticed this when running learn.get_preds
when I got slightly different results each time.
muellerzr
(Zachary Mueller)
March 3, 2020, 5:16pm
854
@lgvaz how are you declaring the transforms? (And the block?)
lgvaz
(Lucas Goulart Vazquez)
March 3, 2020, 5:57pm
855
No magic, aug_tfms
as batch_tfms
and GrandparentSplitter
as splitter
in Datablock
1 Like
dhoa
(Dien-Hoa)
March 4, 2020, 8:15am
856
I still get the error. I tried first with
!pip install git+https://github.com/fastai/fastcore
!pip install git+https://github.com/fastai/fastai2
I tried also with the first cell in your walk-through:
!pip install -q feather-format kornia pyarrow wandb nbdev fastprogress fastai2 fastcore --upgrade
!pip install torch==1.3.1
It doesnât work either.
Hi, If you want, you can try my notebook here. It works.
dhoa
(Dien-Hoa)
March 4, 2020, 10:19am
858
Thanks @JonathanSum But I think you forgot to attach your notebook
https://colab.research.google.com/github/JonathanSum/Fastbook_colab/blob/master/01_intro.ipynb
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"jupytext": {
"split_at_heading": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
This file has been truncated. show original
2 Likes
dhoa
(Dien-Hoa)
March 4, 2020, 10:48am
860
Thanks @JonathanSum . However I ran into a problem of tabular notebook that I wrote in this post Fastai v2 chat . I tried to install fastai2 from git repo and pip. Both cases doesnât work. I will take a closed look at your notebook but I think there are not different from mine for installation.
Pablo
March 4, 2020, 11:00am
861
Quick question: what is the status of multifit for v2? Is it possible to make it work in v2 right now even if the official port is not ready yet?
lgvaz
(Lucas Goulart Vazquez)
March 4, 2020, 9:31pm
862
How can I unregister a function in TypeDispatch
?
Example :
I created a new tensor type: class TensorImageX(TensorImage): pass
I now want to inherit from Normalize
and create a class that only normalizes TensorImageX
but not TensorImage
.
@Pablo No one ported it to v2 AFAIK but all the underlying tools are here
@lgvaz Have a look at the doc , itâs all explained here.
2 Likes
Whatâs the best way to create a dataset of tensor inputs and float labels? This feels like it should be very obvious but I havenât been able to get it working. Hereâs what I mean:
This is the sort of thing Iâve been experimenting with to get it working. Any pointers would be much appreciated! I think the toughest thing for me to understand at the moment is what to do with transforms when I donât really have any, except to separate the xs from the ys.
data = list(zip(bitboards, labels))
def get_x(d): return d[0]
def get_y(d): return d[1]
splits = RandomSplitter()(data)
tfms = [[get_x], [get_y, Categorize()]]
dsets = Datasets(data, tfms=tfms, splits=splits)
dls = dsets.dataloaders(bs=4, device='cpu', num_workers=0)
Pablo
March 5, 2020, 8:30am
866
Do keep us posted!
For the time being I think I will try Multifit on V1 with a smaller dataset that we have, to evaluate how promising it is in our case