torch-rb 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/torch/ruby_arg_parser.cpp +27 -2
- data/lib/torch/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 998c7844d24482a76c6bb1a7a60c508bc4f2946688d7a4a3801a9c832bf54379
|
4
|
+
data.tar.gz: 2cdd9b8832159282976a5c8c44098fa1c8501b54cc4e499e908aaf3d9016061e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5f536c8d0ce11a2a885c74e4a99211bff50716f80e1e9da69040f7899ca02a6a6e663e085188e89f1e85238893dafa1552422dbb844144f08c3a56a44084bc4
|
7
|
+
data.tar.gz: 455a356eb60204a02d6fab0041b5fd1ad9ac26e8eefcb383be42dd5a0d4c026586d5c46749e919c0f471708e897265f48c37b5683e86b86d225f957acd6a7049
|
data/CHANGELOG.md
CHANGED
@@ -401,7 +401,7 @@ void FunctionParameter::set_default_str(const std::string& str) {
|
|
401
401
|
if (str != "None") {
|
402
402
|
throw std::runtime_error("default value for Tensor must be none, got: " + str);
|
403
403
|
}
|
404
|
-
} else if (type_ == ParameterType::INT64) {
|
404
|
+
} else if (type_ == ParameterType::INT64 || type_ == ParameterType::SYM_INT) {
|
405
405
|
default_int = atol(str.c_str());
|
406
406
|
} else if (type_ == ParameterType::BOOL) {
|
407
407
|
default_bool = (str == "True" || str == "true");
|
@@ -417,7 +417,7 @@ void FunctionParameter::set_default_str(const std::string& str) {
|
|
417
417
|
default_scalar = as_integer.has_value() ? at::Scalar(as_integer.value()) :
|
418
418
|
at::Scalar(atof(str.c_str()));
|
419
419
|
}
|
420
|
-
} else if (type_ == ParameterType::INT_LIST) {
|
420
|
+
} else if (type_ == ParameterType::INT_LIST || type_ == ParameterType::SYM_INT_LIST) {
|
421
421
|
if (str != "None") {
|
422
422
|
default_intlist = parse_intlist_args(str, size);
|
423
423
|
}
|
@@ -452,6 +452,31 @@ void FunctionParameter::set_default_str(const std::string& str) {
|
|
452
452
|
default_string = parse_string_literal(str);
|
453
453
|
}
|
454
454
|
}
|
455
|
+
// These types weren't handled here before. Adding a default error
|
456
|
+
// led to a lot of test failures so adding this skip for now.
|
457
|
+
// We should correctly handle these though because it might be causing
|
458
|
+
// silent failures.
|
459
|
+
else if (type_ == ParameterType::TENSOR_LIST) {
|
460
|
+
// throw std::runtime_error("Invalid Tensor List");
|
461
|
+
} else if (type_ == ParameterType::GENERATOR) {
|
462
|
+
// throw std::runtime_error("ParameterType::GENERATOR");
|
463
|
+
} else if (type_ == ParameterType::PYOBJECT) {
|
464
|
+
// throw std::runtime_error("ParameterType::PYOBJECT");
|
465
|
+
} else if (type_ == ParameterType::MEMORY_FORMAT) {
|
466
|
+
// throw std::runtime_error("ParameterType::MEMORY_FORMAT");
|
467
|
+
} else if (type_ == ParameterType::DIMNAME) {
|
468
|
+
// throw std::runtime_error("ParameterType::DIMNAME");
|
469
|
+
} else if (type_ == ParameterType::DIMNAME_LIST) {
|
470
|
+
// throw std::runtime_error("ParameterType::DIMNAME_LIST");
|
471
|
+
} else if (type_ == ParameterType::SCALAR_LIST) {
|
472
|
+
// throw std::runtime_error("ParameterType::SCALAR_LIST");
|
473
|
+
} else if (type_ == ParameterType::STORAGE) {
|
474
|
+
// throw std::runtime_error("ParameterType::STORAGE");
|
475
|
+
} else if (type_ == ParameterType::QSCHEME) {
|
476
|
+
// throw std::runtime_error("ParameterType::QSCHEME");
|
477
|
+
} else {
|
478
|
+
throw std::runtime_error("unknown parameter type");
|
479
|
+
}
|
455
480
|
}
|
456
481
|
|
457
482
|
FunctionSignature::FunctionSignature(const std::string& fmt, int index)
|
data/lib/torch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torch-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
237
|
- !ruby/object:Gem::Version
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
|
-
rubygems_version: 3.
|
240
|
+
rubygems_version: 3.5.3
|
241
241
|
signing_key:
|
242
242
|
specification_version: 4
|
243
243
|
summary: Deep learning for Ruby, powered by LibTorch
|