Support
Quality
Security
License
Reuse
kandi has reviewed Auto-PyTorch and discovered the below as its top functions. This is intended to give you an instant insight into Auto-PyTorch implemented functionality, and help decide if they suit your requirements.
Automatic architecture search and hyperparameter optimization for PyTorch
PyPI Installation
pip install autoPyTorch
Manual Installation
# Following commands assume the user is in a cloned directory of Auto-Pytorch
# We also need to initialize the automl_common repository as follows
# You can find more information about this here:
# https://github.com/automl/automl_common/
git submodule update --init --recursive
# Create the environment
conda create -n auto-pytorch python=3.8
conda activate auto-pytorch
conda install swig
python setup.py install
Examples
from autoPyTorch.api.tabular_classification import TabularClassificationTask
# data and metric imports
import sklearn.model_selection
import sklearn.datasets
import sklearn.metrics
X, y = sklearn.datasets.load_digits(return_X_y=True)
X_train, X_test, y_train, y_test = \
sklearn.model_selection.train_test_split(X, y, random_state=1)
# initialise Auto-PyTorch api
api = TabularClassificationTask()
# Search for an ensemble of machine learning algorithms
api.search(
X_train=X_train,
y_train=y_train,
X_test=X_test,
y_test=y_test,
optimize_metric='accuracy',
total_walltime_limit=300,
func_eval_time_limit_secs=50
)
# Calculate test accuracy
y_pred = api.predict(X_test)
score = api.score(y_pred, y_test)
print("Accuracy score", score)
Contributing
$ git checkout development
Reference
@article{zimmer-tpami21a,
author = {Lucas Zimmer and Marius Lindauer and Frank Hutter},
title = {Auto-PyTorch Tabular: Multi-Fidelity MetaLearning for Efficient and Robust AutoDL},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
year = {2021},
note = {also available under https://arxiv.org/abs/2006.13799},
pages = {3079 - 3090}
}
How can I install Auto-PyTorch on Windows 10 from requirements.txt?
Set-Location install/path
git clone https://github.com/automl/Auto-PyTorch.git
Set-Location Auto-PyTorch
Get-Content requirements.txt | % { pip install $_ }
python setup.py install
QUESTION
How can I install Auto-PyTorch on Windows 10 from requirements.txt?
Asked 2020-Jul-09 at 02:49I have been trying to install Auto-PyTorch, an automatic Neural Network tuning system (more info about installation here: https://github.com/automl/Auto-PyTorch), in a Windows 10 system. The installation steps are as follow:
$ cd install/path
$ git clone https://github.com/automl/Auto-PyTorch.git
$ cd Auto-PyTorch
$ cat requirements.txt | xargs -n 1 -L 1 pip install
$ python setup.py install
However, I can't get around the following line of code:
cat requirements.txt | xargs -n 1 -L 1 pip install
Once I get there, the following Windows PowerShell error is raised:
xargs : The term 'xargs' is not recognized as the name of a cmdlet, function, script file, or
operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:86
+ ... read.CurrentUICulture = 'en-US'; cat requirements.txt | xargs -n 1 -L ...
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (xargs:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Note that I passed the following line of code so that the error is thrown in English (I am Spanish):
[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; cat requirements.txt | xargs -n 1 -L 1 pip install
I'm not an expert on PowerShell, so I would greatly appreciate your help.
Best regards!
ANSWER
Answered 2020-Jul-09 at 02:49Since you're running on Windows PowerShell, only command-line utilities natively available on Windows can be assumed to be available - and xargs
, a Unix utility, is not among them.
(While git
also isn't natively available, it looks like you've already installed it).
Here's a translation of your code into native PowerShell code (note that cd
is a built-in alias for Set-Location
, and, on Windows only, cat
is a built-in alias for Get-Content
; %
is a built-in alias for the ForEach-Object
cmdlet):
Set-Location install/path
git clone https://github.com/automl/Auto-PyTorch.git
Set-Location Auto-PyTorch
Get-Content requirements.txt | % { pip install $_ }
python setup.py install
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
Explore Related Topics
Save this library and start creating your kit